diff --git a/phpunit.php b/phpunit.php index c3b03845..e1a1ebd6 100644 --- a/phpunit.php +++ b/phpunit.php @@ -16,13 +16,16 @@ // -------------------------------------------------------------- // Override the framework paths if testing Laravel. // -------------------------------------------------------------- -if (in_array('build.xml', $_SERVER['argv'])) +foreach ($_SERVER['argv'] as $argument) { - define('APP_PATH', realpath('bundles/laravel-tests/application').DS); + if (strpos($argument, 'build.xml') !== false) + { + define('APP_PATH', realpath('bundles/laravel-tests/application').DS); - define('BUNDLE_PATH', realpath('bundles/laravel-tests/bundles').DS); + define('BUNDLE_PATH', realpath('bundles/laravel-tests/bundles').DS); - define('STORAGE_PATH', realpath('bundles/laravel-tests/storage').DS); + define('STORAGE_PATH', realpath('bundles/laravel-tests/storage').DS); + } } // -------------------------------------------------------------- diff --git a/tests/application/example.test.php b/tests/application/example.test.php new file mode 100644 index 00000000..d7b3fcb2 --- /dev/null +++ b/tests/application/example.test.php @@ -0,0 +1,15 @@ +assertTrue(true); + } + +} \ No newline at end of file