diff options
Diffstat (limited to 'phpunit-rpm.patch')
-rw-r--r-- | phpunit-rpm.patch | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/phpunit-rpm.patch b/phpunit-rpm.patch index efc2c79..6d8265a 100644 --- a/phpunit-rpm.patch +++ b/phpunit-rpm.patch @@ -1,7 +1,7 @@ diff -up ./phpunit.rpm ./phpunit ---- ./phpunit.rpm 2015-08-10 13:22:08.674131079 +0200 -+++ ./phpunit 2015-08-10 13:23:53.882702518 +0200 -@@ -27,24 +27,21 @@ if (!ini_get('date.timezone')) { +--- ./phpunit.rpm 2017-02-05 16:31:31.000000000 +0100 ++++ ./phpunit 2017-02-07 11:56:09.174850687 +0100 +@@ -27,26 +27,27 @@ if (!ini_get('date.timezone')) { ini_set('date.timezone', 'UTC'); } @@ -32,16 +32,23 @@ diff -up ./phpunit.rpm ./phpunit - 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')); ++ 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')); ++ define ('PHPUNIT_COMPOSER_INSTALL', stream_resolve_include_path('PHPUnit/Autoload.php')); } require PHPUNIT_COMPOSER_INSTALL; + +-PHPUnit_TextUI_Command::main(); ++if (class_exists('PHPUnit_TextUI_Command')) { ++ PHPUnit_TextUI_Command::main(); // PHPUnit v5 or older ++} else { ++ PHPUnit\TextUI\Command::main(); // PHPUnit v6 or newer ++} 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 +--- ./tests/bootstrap.php.rpm 2017-02-05 16:31:31.000000000 +0100 ++++ ./tests/bootstrap.php 2017-02-07 11:49:35.123108015 +0100 @@ -1,6 +1,9 @@ <?php // Needed for isolated tests |