Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add build, phpunit

  • Loading branch information...
commit 6aacb5597199179c4ebac8dec5b172821153d051 1 parent d7f8357
@CloCkWeRX CloCkWeRX authored
Showing with 70 additions and 0 deletions.
  1. +50 −0 build.xml
  2. +20 −0 phpunit.xml
View
50 build.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<project name="Image_Text" default="build" basedir=".">
+ <condition property="phpunit.bin" value="phpunit.bat" else="phpunit">
+ <os family="windows"/>
+ </condition>
+
+ <condition property="pear.bin" value="pear.bat" else="pear">
+ <os family="windows"/>
+ </condition>
+
+ <target name="clean" description="Clean up and create artifact directories">
+ <delete dir="${basedir}/lib" />
+ <delete dir="${basedir}/build/api"/>
+ <delete dir="${basedir}/build/code-browser"/>
+ <delete dir="${basedir}/build/coverage"/>
+ <delete dir="${basedir}/build/logs"/>
+ <delete dir="${basedir}/build/pdepend"/>
+ <delete dir="${basedir}/build"/>
+
+ <mkdir dir="${basedir}/lib/" />
+ <mkdir dir="${basedir}/build"/>
+ <mkdir dir="${basedir}/build/api"/>
+ <mkdir dir="${basedir}/build/code-browser"/>
+ <mkdir dir="${basedir}/build/coverage"/>
+ <mkdir dir="${basedir}/build/logs"/>
+ <mkdir dir="${basedir}/build/pdepend"/>
+ </target>
+
+ <target name="phpcs-ci" description="Find coding standard violations using PHP_CodeSniffer">
+ <exec executable="phpcs" output="/dev/null">
+ <arg value="--report=checkstyle" />
+ <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
+ <arg path="${basedir}/Image/" />
+ </exec>
+ </target>
+
+ <target name="phpunit">
+ <exec dir="${basedir}" executable="${phpunit.bin}" failonerror="true">
+ <arg line="."/>
+ </exec>
+ </target>
+
+ <target name="package">
+ <exec dir="${basedir}/build" executable="${pear.bin}" failonerror="true">
+ <arg line="package ../package.xml"/>
+ </exec>
+ </target>
+
+ <target name="build" depends="clean,phpunit,phpcs-ci,package"/>
+</project>
View
20 phpunit.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<phpunit verbose="true">
+ <logging>
+ <log type="coverage-html" target="build/coverage" title="Image_Text" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70"/>
+ <log type="coverage-clover" target="build/logs/clover.xml"/>
+ <log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false" title="Image_Text"/>
+ </logging>
+ <filter>
+ <blacklist>
+ <directory suffix=".php">/usr/share/php</directory>
+ <directory suffix=".php">tests/unit/</directory>
+ </blacklist>
+ </filter>
+ <testsuites>
+ <testsuite>
+ <directory>tests</directory>
+ <file>*Test.php</file>
+ </testsuite>
+ </testsuites>
+</phpunit>
Please sign in to comment.
Something went wrong with that request. Please try again.