File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -581,13 +581,17 @@ public function testCreateCestScreenshotOnFail()
581
581
]),
582
582
]);
583
583
$ module = Stub::make (self ::MODULE_CLASS , ['webDriver ' => $ fakeWd ]);
584
- $ cest = new \Codeception \Test \Cest (new \stdClass (), 'login ' , 'someCest.php ' );
584
+ $ cest = new \Codeception \Test \Cest (
585
+ new class { public function login () {}},
586
+ 'login ' ,
587
+ 'someCest.php ' ,
588
+ );
585
589
$ module ->_failed ($ cest , new \PHPUnit \Framework \AssertionFailedError ());
586
590
}
587
591
588
592
public function testCreateTestScreenshotOnFail ()
589
593
{
590
- $ test = Stub::make (\Codeception \Test \Unit ::class, ['getName ' => 'testLogin ' ]);
594
+ $ test = Stub::make (\Codeception \Test \TestCaseWrapper ::class, ['getName ' => 'getSignature ' ]);
591
595
$ fakeWd = Stub::make (self ::WEBDRIVER_CLASS , [
592
596
'takeScreenshot ' => Expected::once (function ($ filename ) use ($ test ) {
593
597
Assert::assertSame (
You can’t perform that action at this time.
0 commit comments