Skip to content

Commit

Permalink
adds tests case run to phing and installs phpunit as dev-require
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlaefer committed Sep 9, 2014
1 parent 221b0cc commit ecd200f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
18 changes: 17 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
<target name="menu">
<echo msg="1) build distribution zip"/>
<echo msg="2) build phpdoc"/>
<echo msg="3) run test suite"/>
<echo msg="x) exit"/>

<input message="Choose" propertyName="choice" validArgs="1,2,x"/>
<input message="Choose" propertyName="choice" validArgs="1,2,3,x"/>

<if>
<equals arg1="${choice}" arg2="1"/>
Expand All @@ -27,6 +28,13 @@
</then>
</elseif>

<elseif>
<equals arg1="${choice}" arg2="3"/>
<then>
<phingcall target="tests"/>
</then>
</elseif>

<elseif>
<equals arg1="${choice}" arg2="x"/>
<then>
Expand Down Expand Up @@ -121,4 +129,12 @@
</phpdoc2>
</target>

<!-- ## tests ## -->
<target name="tests">
<property name="tests.all" value="lib/vendor/phpunit/phpunit/phpunit --bootstrap tests/phpunit_bootstrap.php tests/"/>
<echo msg="Running PHPUnit test cases…"/>
<echo msg="Command run: '${tests.all}'"/>
<exec command="${tests.all}" logoutput="true" />
</target>

</project>
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
},
"require-dev": {
"phpdocumentor/phpdocumentor": "2.6.*",
"phing/phing": "2.*"
"phing/phing": "2.*",
"phpunit/phpunit": "*"
}
}

0 comments on commit ecd200f

Please sign in to comment.