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