diff --git a/.travis.yml b/.travis.yml index a09e130..b73c6ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,4 @@ language: php php: - 5.4 -script: build/build.sh +script: sh build/build.sh diff --git a/build.xml b/build.xml deleted file mode 100644 index fe8adf3..0000000 --- a/build.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build.sh b/build/build.sh index 0b75c51..90e032f 100644 --- a/build/build.sh +++ b/build/build.sh @@ -1,10 +1,13 @@ echo " * Wootook unit testing" -MODULES_DIR="`pwd`/../src/application/modules" +MODULES_DIR="`pwd`/src/application/modules" -for file in "$MODULES_DIR/*" +for file in `find $MODULES_DIR -mindepth 1 -maxdepth 1 -type d` do - echo " * Running ${file} module tests" - phpunit --strict --configuration $MODULES_DIR/${file}/test/$phpunit.xml $MODULES_DIR/${file} + echo " * Running `basename ${file}` module tests (Unit tests)" + phpunit --strict --configuration ${file}/test/phpunit.xml ${file}/test/php/WootookUnit + + #echo " * Running `basename ${file}` module tests (Integration tests)" + #phpunit --strict --configuration ${file}/test/phpunit.xml ${file}/test/php/WootookUnit done diff --git a/src/application/modules/WootookCore/test/bootstrap.php b/src/application/modules/WootookCore/test/bootstrap.php index d7fead5..067d936 100644 --- a/src/application/modules/WootookCore/test/bootstrap.php +++ b/src/application/modules/WootookCore/test/bootstrap.php @@ -2,7 +2,7 @@ spl_autoload_register(function ($class) { static $map; if (!$map) { - $map = include dirname(dirname(dirname(__DIR__))) . '/autoload_classmap.php'; + $map = include dirname(__DIR__) . '/autoload_classmap.php'; } if (!isset($map[$class])) { @@ -11,4 +11,4 @@ spl_autoload_register(function ($class) { return require $map[$class]; }); -require dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/code/core/Wootook.php'; +require dirname(dirname(dirname(__DIR__))) . '/code/core/Wootook.php';