File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
ini_set('display_errors', 'stderr');
3
3
set_include_path('{include_path}');
4
- require {autoload};
4
+
5
+ if ({composerAutoload}) {
6
+ require_once {composerAutoload};
7
+ define('PHPUNIT_COMPOSER_INSTALL', {composerAutoload});
8
+ } else {
9
+ require 'PHPUnit/Autoload.php';
10
+ }
11
+
5
12
ob_start();
6
13
7
14
function __phpunit_run_isolated_test()
Original file line number Diff line number Diff line change @@ -736,9 +736,9 @@ public function run(PHPUnit_Framework_TestResult $result = NULL)
736
736
}
737
737
738
738
if (defined ('PHPUNIT_COMPOSER_INSTALL ' )) {
739
- $ autoload = var_export (PHPUNIT_COMPOSER_INSTALL , TRUE );
739
+ $ composerAutoload = var_export (PHPUNIT_COMPOSER_INSTALL , TRUE );
740
740
} else {
741
- $ autoload = '\'PHPUnit/Autoload.php \'' ;
741
+ $ composerAutoload = '\'\'' ;
742
742
}
743
743
744
744
$ data = var_export (serialize ($ this ->data ), TRUE );
@@ -752,7 +752,7 @@ public function run(PHPUnit_Framework_TestResult $result = NULL)
752
752
753
753
$ template ->setVar (
754
754
array (
755
- 'autoload ' => $ autoload ,
755
+ 'composerAutoload ' => $ composerAutoload ,
756
756
'filename ' => $ class ->getFileName (),
757
757
'className ' => $ class ->getName (),
758
758
'methodName ' => $ this ->name ,
You can’t perform that action at this time.
0 commit comments