From 25759d715a2ba0d71b8dd36e0633f5cef65fc4e5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 26 May 2015 19:46:44 +0200 Subject: php-phpunit-PHPUnit: ensure compat. with RHSCL --- phpunit-rpm.patch | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'phpunit-rpm.patch') diff --git a/phpunit-rpm.patch b/phpunit-rpm.patch index 7392971..46fd1ea 100644 --- a/phpunit-rpm.patch +++ b/phpunit-rpm.patch @@ -1,7 +1,6 @@ -diff -up ./phpunit.rpm ./phpunit ---- ./phpunit.rpm 2015-01-17 12:24:41.000000000 +0100 -+++ ./phpunit 2015-01-18 08:52:50.896228541 +0100 -@@ -13,22 +13,11 @@ +--- ./phpunit.rpm 2015-05-25 07:18:18.000000000 +0200 ++++ ./phpunit 2015-05-26 19:43:34.101986869 +0200 +@@ -13,22 +13,21 @@ ini_set('date.timezone', 'UTC'); } @@ -10,8 +9,15 @@ diff -up ./phpunit.rpm ./phpunit - 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')) { @@ -21,6 +27,7 @@ diff -up ./phpunit.rpm ./phpunit - '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')); -- cgit