I have the following Phing configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<project name="ru.fractalizer.phpsweetpdo" default="make-phar-packages" basedir="..">
<target name="run-tests-library" description="Running all the tests">
<phpunit>
<formatter type="plain" usefile="false"/>
<batchtest>
<classpath>.</classpath>
<fileset dir="tests/Library">
<include name="**/*Test*.php"/>
</fileset>
</batchtest>
</phpunit>
</target>
But executing Phing build on this target gives me error:
Execution of target "run-tests-library" failed for the following reason: Z:\Work\PHP\phpSweetPDO\phing\build.xml:5:17: phing.types.Path doesn't support nested text data.
BUILD FAILED Z:\Work\PHP\phpSweetPDO\phing\build.xml:5:17: phing.types.Path doesn't support nested text data. Total time: 9.0173 seconds
I don't understand the message. What exactly is not supported?
5:17 is the line where "<phpunit>"
tag is written.
The problem is your classpath definition:
<classpath>.</classpath>
The nested text is the single .
. You can define a path in various ways:
pathelement
elements.fileset
, dirset
, and other resource collection elements.path
attribute.For your simple case, perhaps
<classpath path="." />
would be the way to go.
See the Path-like Structures section in the the Ant docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With