Support phpunit-old.phar
authorReedy <reedy@wikimedia.org>
Sun, 27 Dec 2015 20:21:51 +0000 (20:21 +0000)
committerReedy <reedy@wikimedia.org>
Sun, 27 Dec 2015 20:26:05 +0000 (20:26 +0000)
Bug: T122485
Change-Id: Ic21c6c1ca5afaac0e298cf0259f5dc273dfec128

tests/phpunit/phpunit.php

index 29ff1a0..5f43ef5 100755 (executable)
@@ -250,9 +250,16 @@ if ( class_exists( 'PHPUnit_TextUI_Command' ) ) {
 } else {
        foreach ( array(
                                stream_resolve_include_path( 'phpunit.phar' ),
+                               stream_resolve_include_path( 'phpunit-old.phar' ),
                                'PHPUnit/Runner/Version.php',
                                'PHPUnit/Autoload.php'
                        ) as $includePath ) {
+
+               if ( $includePath === false ) {
+                       // stream_resolve_include_path can return false
+                       continue;
+               }
+
                // @codingStandardsIgnoreStart
                @include_once $includePath;
                // @codingStandardsIgnoreEnd