File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,7 @@ public function _initialize()
4747 // we are printing test status and time taken
4848 public function beforeTest (TestEvent $ e )
4949 {
50- $ testName = $ e ->getTest ()->toString ();
51- preg_match ('#\((.*?)\)# ' , $ testName , $ fileName );
52-
53- self ::$ tmpCurrentTest = $ fileName [1 ];
50+ self ::$ tmpCurrentTest = \Codeception \Test \Descriptor::getTestFileName ($ e ->getTest ());
5451 }
5552
5653 // we are printing test status and time taken
@@ -83,9 +80,7 @@ public function afterStep(StepEvent $e)
8380 public function afterTest (TestEvent $ e )
8481 {
8582 $ test = new \stdClass ;
86- $ testName = $ e ->getTest ()->toString ();
87- preg_match ('#\((.*?)\)# ' , $ testName , $ fileName );
88- $ test ->name = $ fileName [1 ];
83+ $ test ->name = \Codeception \Test \Descriptor::getTestFileName ($ e ->getTest ());
8984
9085
9186 // stack overflow: http://stackoverflow.com/questions/16825240/how-to-convert-microtime-to-hhmmssuu
You can’t perform that action at this time.
0 commit comments