Reputation: 51
hi im doing a small application in the Zend Framework 1.8 Web Application Development book called storefront.
i have installed PHPUnit, version is PHPUnit 3.6.10 by Sebastian Bergmann. and also i installed apache ant.
as my ebook i create a build folder and run ant command inside of this folder via CMD (folder contain ant.properties,build.xml files)
i got a BUILD FAILED message when execute ant command, there is a message in test section "unrecognized option --report"
here is my build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="StoreFront" default="build" basedir="../">
<target name="getProps">
<property file="${basedir}/build/ant.properties" />
<condition property="script-suffix" value=".bat" else="">
<os family="windows" />
</condition>
<echo message="---- Build Properties ----" />
<echo message="" />
<echo message="OS is ${os.name}" />
<echo message="Basedir is ${basedir}" />
<echo message="Property file is ${basedir}/build/ant.properties" />
<echo message="Script-suffix is ${script-suffix}" />
<echo message="" />
<echo message="---- Storefront Properties ----" />
<echo message="" />
<echo message="Environment is ${environment}" />
</target>
<target name="test" depends="getProps">
<exec dir="${basedir}/tests" executable="phpunit${script-suffix}" failonerror="true">
<arg line="--colors --report ${basedir}/build/report
--log-xml ${basedir}/build/logs/phpunit.xml
--log-pmd ${basedir}/build/logs/phpunit.pmd.xml
--log-metrics ${basedir}/build/logs/phpunit.metrics.xml
--coverage-xml ${basedir}/build/logs/phpunit.coverage.xml
AllTests.php"/>
</exec>
</target>
<target name="configure" depends="getProps">
<copy file="${basedir}/application/application.php.dist"
tofile="${basedir}/application/application.php" overwrite="true" />
<replace file="${basedir}/application/application.php" token="@ENVIRONMENT@" value="${environment}" />
</target>
<target name="buildPreparation">
<mkdir dir="${basedir}/build/logs" />
<mkdir dir="${basedir}/build/report" />
</target>
<target name="clean">
<delete dir="${basedir}/build/logs" />
<delete dir="${basedir}/build/report" />
</target>
<target name="build" depends="buildPreparation,configure,test"/>
</project>
here is the message i got in cmd
C:\wamp\www\storefront\build>ant
Buildfile: C:\wamp\www\storefront\build\build.xml
buildPreparation:
getProps:
[echo] ---- Build Properties ----
[echo]
[echo] OS is Windows 7
[echo] Basedir is C:\wamp\www\storefront
[echo] Property file is C:\wamp\www\storefront/build/ant.properties
[echo] Script-suffix is .bat
[echo]
[echo] ---- Storefront Properties ----
[echo]
[echo] Environment is development
configure:
[copy] Copying 1 file to C:\wamp\www\storefront\application
test:
[exec] PHPUnit 3.6.10 by Sebastian Bergmann.
[exec]
[exec] unrecognized option --report
BUILD FAILED
C:\wamp\www\storefront\build\build.xml:28: exec returned: 1
Total time: 0 seconds
C:\wamp\www\storefront\build>phpunit --version
PHPUnit 3.6.10 by Sebastian Bergmann.
how can i fixed this one im just following steps in the book
Upvotes: 1
Views: 1200
Reputation: 164924
--report
is not a valid command line switch in PHPUnit 3.6.
Please read the manual for valid options - http://www.phpunit.de/manual/current/en/textui.html#textui.clioptions
Upvotes: 2