Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c79ad79cb5
Fetching contributors…

Cannot retrieve contributors at this time

109 lines (92 sloc) 4.425 kb
<?xml version="1.0" encoding="UTF-8"?>
<project name="Mongo Object" default="api-docs">
<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="MongoUnit/*" />
<exclude name="IntegrationsTests.php" />
</fileset>
<fileset dir="src/Morph" id="classes">
<include name="**/*.php" />
</fileset>
<target name="api-docs" description="Creates Morph documentation">
<echo msg="Starting Creation of API 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 Complete" />
</target>
<target name="unit-report" description="Runs Morph unit tests">
<echo msg="Starting Unit Test Suite" />
<phpunit haltonfailure="false" haltonerror="false" printsummary="true">
<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-report" description="generates unit test coverage report">
<exec command="phpunit --coverage-html doc/coverage/ unit-tests/UnitTests.php" checkreturn="false" />
</target>
<target name="integration-report" description="Runs Morph integration tests">
<echo msg="Starting Integration Test Suite" />
<phpunit haltonfailure="false" haltonerror="false" printsummary="true">
<formatter type="xml" outfile="integration-tests.xml" />
<formatter type="plain" usefile="false" />
<batchtest>
<fileset refid="integration-tests" />
</batchtest>
</phpunit>
<delete dir="doc/integration_report" quiet="true" includeemptydirs="true" verbose="false" failonerror="false" />
<mkdir dir="doc/integration_report" />
<phpunitreport infile="integration-tests.xml" format="frames" todir="doc/integration_report" />
<delete file="integration-tests.xml"/>
<echo msg="Integration Test Suite Complete" />
</target>
<target name="package" description="builds Morph.phar">
<echo message="Building 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>
<echo message="Creating comment free classes export" />
<mkdir dir="./export" />
<copy todir="./export">
<fileset refid="classes" />
<filterchain>
<stripphpcomments />
</filterchain>
</copy>
<delete file="Morph.phar" quiet="true" />
<pharpackage basedir="./export" destfile="Morph.phar" compression="gzip" stub="./src/bootstrap.php" alias="Morph">
<fileset dir="./export">
<include name="**/*.php" />
</fileset>
<metadata>
<element name="Title" value="Morph" />
<element name="Author" value="Jonathan Moss &lt;xirisr@gmail.com&gt;" />
<element name="Description" value="The Morph package provides a high level framework for working with MongoDB" />
<element name="Copyright" value="Jonathan Moss (c) 2008-${date.year}" />
<element name="Build" value="${date.build}" />
<element name="Created Date" value="${date.created}" />
</metadata>
</pharpackage>
<delete dir="./export" quiet="true" includeemptydirs="true" />
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.