1
votes

According to How to use existing phpunit.xml in phing build.xml? It should be work to use phpunit.xml in phing like this

 <phpunit configuration="./phpunit.xml">

but it's mouse, don't know why?

xml like this

<target name="test" description="Run PHPUnit tests" depends="prepare">
            <phpunit printsummary="true" configuration="./phpunit.xml" pharlocation="${pharlocation.dir}" ><!--configuration="./phpunit.xml"-->
                <formatter type="xml" todir="${xmlreport.dir}" outfile="${reportxml.dir}"/>
            </phpunit>
            <phpunitreport infile="${xmlreport.dir}/${reportxml.dir}" format="noframes" todir="${htmlreport.dir}" styledir="${xsl.dir}" />
</target>

run result like this,the phpunit donot run.I confirm the phing has find the phpuntil.xml ,when I change the name to a wrong name,the phing will prompt file donot exist.

autotest > prepare:

autotest > test:

[phpunit] Total tests run: 0, Failures: 0, Errors: 0, Incomplete: 0, Skipped: 0, Time elapsed: 0.00033 s

BUILD FINISHED

Total time: 0.5406 seconds

1
Welcome to SO. Please do not post links to code or images of code-- no one can copy your code to work with it if it is in an image file. Read this to learn more about formatting your questions. You can paste your code into your question, select it, and hit the "{}" button to indent a code block. While you are at it, you might peruse the topics discussed here.ad absurdum
use phing --verbose to see what phpunit command is runcweiske

1 Answers

0
votes

Your Phing version is not compatible with newest PHPUnit namespaces, update Phing to v3.

Source: