build.xml

Summary

Maintainability
Test Coverage
<project name="GPIO" default="test">
    <target name="test">
        <phpunit haltonfailure="true" printsummary="true">
            <batchtest>
                <fileset dir="tests">
                    <include name="*Test.php"/>
                </fileset>
            </batchtest>
        </phpunit>
    </target>
    <target name="report">
        <delete dir="build"/>
        <mkdir dir="build/tests"/>
        <mkdir dir="build/coverage"/>
        <coverage-setup database="build/coverage.db">
            <fileset dir="src">
                <include name="**/*.php"/>
                <exclude name="**/*Test.php"/>
            </fileset>
        </coverage-setup>
        <phpunit codecoverage="true">
            <formatter type="xml" todir="build"/>
            <batchtest>
                <fileset dir="src">
                    <include name="**/*Test.php"/>
                </fileset>
            </batchtest>
        </phpunit>
        <phpunitreport infile="reports/testsuites.xml"
            format="frames" todir="reports/tests" pharlocation="vendor/bin/phpunit"/>
        <coverage-report outfile="build/coverage.xml">
            <report todir="build/coverage" title="Demo"/>
        </coverage-report>
    </target>
</project>