diff -up ./phpunit.rpm ./phpunit --- ./phpunit.rpm 2015-08-10 13:22:08.674131079 +0200 +++ ./phpunit 2015-08-10 13:23:53.882702518 +0200 @@ -22,24 +22,21 @@ if (!ini_get('date.timezone')) { ini_set('date.timezone', 'UTC'); } -foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) { - if (file_exists($file)) { - define('PHPUNIT_COMPOSER_INSTALL', $file); - - break; - } +// Ensure correct include_path for RHSCL +$inc = get_include_path(); +$dirs = explode(':', $inc); +if (!in_array('/usr/share/php', $dirs)) { + $dirs[] = '/usr/share/php'; + set_include_path(implode(':', $dirs)); } +unset ($inc, $dirs); -unset($file); - -if (!defined('PHPUNIT_COMPOSER_INSTALL')) { - fwrite(STDERR, - 'You need to set up the project dependencies using the following commands:' . PHP_EOL . - 'wget http://getcomposer.org/composer.phar' . PHP_EOL . - 'php composer.phar install' . PHP_EOL - ); - - die(1); +// Libraries PATH +if (file_exists('./vendor/phpunit/phpunit/phpunit') && file_exists('./vendor/autoload.php')) { + echo "\n==== Redirecting to composer installed version in vendor/phpunit ====\n\n"; + define ('PHPUNIT_COMPOSER_INSTALL', realpath('./vendor/autoload.php')); +} else { + define ('PHPUNIT_COMPOSER_INSTALL', stream_resolve_include_path('PHPUnit/Autoload.php')); } require PHPUNIT_COMPOSER_INSTALL; diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php --- ./tests/bootstrap.php.rpm 2015-08-10 11:16:56.000000000 +0200 +++ ./tests/bootstrap.php 2015-08-10 13:22:08.674131079 +0200 @@ -1,6 +1,9 @@