@@ -838,31 +838,36 @@ public function run(TestResult $result = null)
838
838
839
839
$ runEntireClass = $ this ->runClassInSeparateProcess && !$ this ->runTestInSeparateProcess ;
840
840
841
+ $ var = [
842
+ 'composerAutoload ' => $ composerAutoload ,
843
+ 'phar ' => $ phar ,
844
+ 'filename ' => $ class ->getFileName (),
845
+ 'className ' => $ class ->getName (),
846
+ 'runEntireClass ' => $ runEntireClass ,
847
+ 'collectCodeCoverageInformation ' => $ coverage ,
848
+ 'data ' => $ data ,
849
+ 'dataName ' => $ dataName ,
850
+ 'dependencyInput ' => $ dependencyInput ,
851
+ 'constants ' => $ constants ,
852
+ 'globals ' => $ globals ,
853
+ 'include_path ' => $ includePath ,
854
+ 'included_files ' => $ includedFiles ,
855
+ 'iniSettings ' => $ iniSettings ,
856
+ 'isStrictAboutTestsThatDoNotTestAnything ' => $ isStrictAboutTestsThatDoNotTestAnything ,
857
+ 'isStrictAboutOutputDuringTests ' => $ isStrictAboutOutputDuringTests ,
858
+ 'enforcesTimeLimit ' => $ enforcesTimeLimit ,
859
+ 'isStrictAboutTodoAnnotatedTests ' => $ isStrictAboutTodoAnnotatedTests ,
860
+ 'isStrictAboutResourceUsageDuringSmallTests ' => $ isStrictAboutResourceUsageDuringSmallTests ,
861
+ 'codeCoverageFilter ' => $ codeCoverageFilter ,
862
+ 'configurationFilePath ' => $ configurationFilePath
863
+ ];
864
+
865
+ if (!$ runEntireClass ) {
866
+ $ var ['methodName ' ] = $ this ->name ;
867
+ }
868
+
841
869
$ template ->setVar (
842
- [
843
- 'composerAutoload ' => $ composerAutoload ,
844
- 'phar ' => $ phar ,
845
- 'filename ' => $ class ->getFileName (),
846
- 'className ' => $ class ->getName (),
847
- 'methodName ' => $ runEntireClass ? null : $ this ->name ,
848
- 'runEntireClass ' => $ runEntireClass ,
849
- 'collectCodeCoverageInformation ' => $ coverage ,
850
- 'data ' => $ data ,
851
- 'dataName ' => $ dataName ,
852
- 'dependencyInput ' => $ dependencyInput ,
853
- 'constants ' => $ constants ,
854
- 'globals ' => $ globals ,
855
- 'include_path ' => $ includePath ,
856
- 'included_files ' => $ includedFiles ,
857
- 'iniSettings ' => $ iniSettings ,
858
- 'isStrictAboutTestsThatDoNotTestAnything ' => $ isStrictAboutTestsThatDoNotTestAnything ,
859
- 'isStrictAboutOutputDuringTests ' => $ isStrictAboutOutputDuringTests ,
860
- 'enforcesTimeLimit ' => $ enforcesTimeLimit ,
861
- 'isStrictAboutTodoAnnotatedTests ' => $ isStrictAboutTodoAnnotatedTests ,
862
- 'isStrictAboutResourceUsageDuringSmallTests ' => $ isStrictAboutResourceUsageDuringSmallTests ,
863
- 'codeCoverageFilter ' => $ codeCoverageFilter ,
864
- 'configurationFilePath ' => $ configurationFilePath
865
- ]
870
+ $ var
866
871
);
867
872
868
873
$ this ->prepareTemplate ($ template );
0 commit comments