File tree 1 file changed +9
-3
lines changed
symfony/phpunit-bridge/5.3/bin
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,15 @@ if (!ini_get('date.timezone')) {
6
6
}
7
7
8
8
if (is_file (dirname (__DIR__ ).'/vendor/phpunit/phpunit/phpunit ' )) {
9
- define ('PHPUNIT_COMPOSER_INSTALL ' , dirname (__DIR__ ).'/vendor/autoload.php ' );
10
- require PHPUNIT_COMPOSER_INSTALL ;
11
- PHPUnit \TextUI \Command::main ();
9
+ if (class_exists (PHPUnit \TextUI \Command::class)) {
10
+ // PHPUnit < 9.x
11
+ define ('PHPUNIT_COMPOSER_INSTALL ' , dirname (__DIR__ ).'/vendor/autoload.php ' );
12
+ require PHPUNIT_COMPOSER_INSTALL ;
13
+ PHPUnit \TextUI \Command::main ();
14
+ } else {
15
+ // PHPUnit >= 10.0
16
+ require dirname (__DIR__ ).'/vendor/phpunit/phpunit/phpunit ' ;
17
+ }
12
18
} else {
13
19
if (!is_file (dirname (__DIR__ ).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php ' )) {
14
20
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`. \n" ;
You can’t perform that action at this time.
0 commit comments