Started implementing Continuous Integration

This commit is contained in:
Abel Hoogeveen 2015-03-18 19:37:35 +01:00
parent 91740236e7
commit ab1ee28e40
5 changed files with 59 additions and 8 deletions

29
build.xml Normal file
View File

@ -0,0 +1,29 @@
<project name="FuzeWorks" default="build" basedir=".">
<target name="clean">
<delete dir="${basedir}/build" />
<delete dir="${basedir}/source/.git" />
</target>
<target name="prepare">
<mkdir dir="${basedir}/build/logs" />
<mkdir dir="${basedir}/build/clover" />
</target>
<target name="phpunit">
<exec dir="${basedir}" executable="php" failonerror="true">
<arg value="phpunit.phar"/>
<arg line="--configuration phpunit.xml
--log-junit ${basedir}/build/logs/phpunit.xml
--coverage-clover ${basedir}/build/logs/clover.xml
--coverage-html ${basedir}/build/clover" />
</exec>
</target>
<target name="zip">
<exec dir="${basedir}" executable="zip" failonerror="true">
<arg line="-r ${basedir}/build/fuzeworks-core.zip . -x build\* tests\*" />
</exec>
</target>
<target name="build" depends="clean,prepare,phpunit,zip" />
</project>

View File

@ -1,14 +1,7 @@
<?php
// Include framework
if (!defined('FUZEPATH')) {
define( 'FUZEPATH', dirname(__FILE__) . '/' );
}
require_once( dirname(__FILE__) . "/Core/System/class.core.php");
require('load.php');
// Load it
$core = new Core();
$core->init();
$core->loadMod('router');
$core->mods->router->setPath( (isset($_GET['path']) ? $_GET['path'] : null) );
$core->mods->router->route();

13
load.php Normal file
View File

@ -0,0 +1,13 @@
<?php
// Include framework
if (!defined('FUZEPATH')) {
define( 'FUZEPATH', dirname(__FILE__) . '/' );
}
require_once( dirname(__FILE__) . "/Core/System/class.core.php");
// Load it
$core = new Core();
$core->init();
?>

9
phpunit.xml Normal file
View File

@ -0,0 +1,9 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd"
bootstrap="load.php">
<testsuites>
<testsuite name="FuzeWorks Core Tests">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>

7
tests/coreTest.php Normal file
View File

@ -0,0 +1,7 @@
<?php
class CoreTest extends PHPUnit_Framework_TestCase {
public function testCanBeNegated() {
}
}