File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ public function testSeeLinkFailsIfHrefDoesNotMatch()
150
150
public function testSeeLinkFailsIfHrefDoesNotMatchExactly ()
151
151
{
152
152
$ this ->expectException ('PHPUnit\Framework\AssertionFailedError ' );
153
- $ this ->expectExceptionMessage ("No links containing text 'Next' and URL 'http ://codeception' were found in page /external_url " );
153
+ $ this ->expectExceptionMessage ("No links containing text 'Next' and URL 'https ://codeception' were found in page /external_url " );
154
154
$ this ->module ->amOnPage ('/external_url ' );
155
155
$ this ->module ->seeLink ('Next ' , 'https://codeception ' );
156
156
}
Original file line number Diff line number Diff line change 7
7
use Codeception \Module \WebDriver ;
8
8
use Codeception \Stub ;
9
9
use Codeception \Stub \Expected ;
10
+ use Codeception \Test \Metadata ;
10
11
use Codeception \Util \Maybe ;
11
12
use data ;
12
13
use Facebook \WebDriver \Cookie ;
@@ -581,13 +582,27 @@ public function testCreateCestScreenshotOnFail()
581
582
]),
582
583
]);
583
584
$ module = Stub::make (self ::MODULE_CLASS , ['webDriver ' => $ fakeWd ]);
584
- $ cest = new \Codeception \Test \Cest (new \stdClass (), 'login ' , 'someCest.php ' );
585
+ $ cest = new \Codeception \Test \Cest (
586
+ new class {
587
+ public function login ()
588
+ {
589
+ }
590
+ },
591
+ 'login ' ,
592
+ 'someCest.php ' ,
593
+ );
585
594
$ module ->_failed ($ cest , new \PHPUnit \Framework \AssertionFailedError ());
586
595
}
587
596
588
597
public function testCreateTestScreenshotOnFail ()
589
598
{
590
- $ test = Stub::make (\Codeception \Test \Unit::class, ['getName ' => 'testLogin ' ]);
599
+ $ test = Stub::make (
600
+ \Codeception \Test \TestCaseWrapper::class,
601
+ [
602
+ 'getSignature ' => 'testLogin ' ,
603
+ 'getMetadata ' => new Metadata (),
604
+ ]
605
+ );
591
606
$ fakeWd = Stub::make (self ::WEBDRIVER_CLASS , [
592
607
'takeScreenshot ' => Expected::once (function ($ filename ) use ($ test ) {
593
608
Assert::assertSame (
You can’t perform that action at this time.
0 commit comments