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()
150150 public function testSeeLinkFailsIfHrefDoesNotMatchExactly ()
151151 {
152152 $ 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 " );
154154 $ this ->module ->amOnPage ('/external_url ' );
155155 $ this ->module ->seeLink ('Next ' , 'https://codeception ' );
156156 }
Original file line number Diff line number Diff line change 77use Codeception \Module \WebDriver ;
88use Codeception \Stub ;
99use Codeception \Stub \Expected ;
10+ use Codeception \Test \Metadata ;
1011use Codeception \Util \Maybe ;
1112use data ;
1213use Facebook \WebDriver \Cookie ;
@@ -581,13 +582,27 @@ public function testCreateCestScreenshotOnFail()
581582 ]),
582583 ]);
583584 $ 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+ );
585594 $ module ->_failed ($ cest , new \PHPUnit \Framework \AssertionFailedError ());
586595 }
587596
588597 public function testCreateTestScreenshotOnFail ()
589598 {
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+ );
591606 $ fakeWd = Stub::make (self ::WEBDRIVER_CLASS , [
592607 'takeScreenshot ' => Expected::once (function ($ filename ) use ($ test ) {
593608 Assert::assertSame (
You can’t perform that action at this time.
0 commit comments