Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6b2b2675e8
Fetching contributors…

Cannot retrieve contributors at this time

93 lines (75 sloc) 3.428 kb
<?xml version="1.0" encoding="UTF-8"?>
<project name="Mongo Object" default="doc" basedir=".">
<taskdef classname="phar.PharPackageTask2" name="pharpackage2"/>
<fileset dir="unit-tests" id="unit-tests">
<include name="**/Test*.php" />
</fileset>
<fileset dir="integration-tests" id="integration-tests">
<include name="**/Test*.php" />
<exclude name="MongoTestCase.php" />
</fileset>
<fileset dir="src/Morph" id="classes">
<include name="**/*.php" />
</fileset>
<target name="doc" description="Creates Morph documentation">
<echo msg="Starting Creation of API Documentation" />
<echo msg="Cleaning out old documentation" />
<delete dir="doc/api" quiet="true" includeemptydirs="true" verbose="false"
failonerror="false" />
<mkdir dir="doc" />
<phpdoc title="Morph Documentation" destdir="doc/api" sourcecode="yes"
output="HTML:frames:DOM/default" quiet="true" defaultpackagename="Morph">
<fileset refid="classes" />
<fileset dir="src/tutorials">
<include name="**/*.pkg" />
<include name="**/*.cls" />
</fileset>
</phpdoc>
<echo msg="API Documentation Creation Complete" />
</target>
<target name="unit-test" description="Runs Morph unit tests">
<echo msg="Starting Unit Test Suite" />
<phpunit haltonfailure="false" haltonerror="false">
<formatter type="xml" outfile="test-report.xml" />
<batchtest>
<fileset refid="unit-tests" />
</batchtest>
</phpunit>
<delete dir="doc/test_report" quiet="true" includeemptydirs="true"
verbose="false" failonerror="false" />
<mkdir dir="doc/test_report" />
<phpunitreport infile="test-report.xml" format="frames"
todir="doc/test_report" />
<delete file="test-report.xml" />
<echo msg="Unit Test Suite Complete" />
</target>
<target name="coverage" description="generates unit test coverage report">
<exec command="phpunit --coverage-html doc/coverage/ unit-tests/AllTests.php" checkreturn="false" />
</target>
<target name="integration-test" description="Runs Morph integration tests">
<echo msg="Starting Integration Test Suite" />
<phpunit haltonfailure="false" haltonerror="false" printsummary="true">
<batchtest>
<fileset refid="integration-tests" />
</batchtest>
</phpunit>
<echo msg="Integration Test Suite Complete" />
</target>
<target name="package" description="builds Morph.phar">
<tstamp>
<format property="date.created" pattern="%Y-%m-%d %H:%I:%S" />
<format property="date.year" pattern="%Y" />
<format property="date.build" pattern="%s" />
</tstamp>
<pharpackage2 basedir="./src/Morph" destfile="Morph.phar"
compression="gzip" customStub="./src/Bootstrap.php" alias="Morph">
<fileset refid="classes" />
<metadata>
<element name="Created Date" value="${date.created}" />
<element name="Copyright" value="Jonathan Moss (c) 2008-${date.year}" />
<element name="Build" value="${date.build}" />
</metadata>
</pharpackage2>
</target>
<target name="all" description="builds everything" depends="unit-test, coverage, doc, package" />
</project>
Jump to Line
Something went wrong with that request. Please try again.