File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-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,23 @@ 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 { public function login () {}},
587
+ 'login ' ,
588
+ 'someCest.php ' ,
589
+ );
585
590
$ module ->_failed ($ cest , new \PHPUnit \Framework \AssertionFailedError ());
586
591
}
587
592
588
593
public function testCreateTestScreenshotOnFail ()
589
594
{
590
- $ test = Stub::make (\Codeception \Test \Unit::class, ['getName ' => 'testLogin ' ]);
595
+ $ test = Stub::make (
596
+ \Codeception \Test \TestCaseWrapper::class,
597
+ [
598
+ 'getSignature ' => 'testLogin ' ,
599
+ 'getMetadata ' => new Metadata (),
600
+ ]
601
+ );
591
602
$ fakeWd = Stub::make (self ::WEBDRIVER_CLASS , [
592
603
'takeScreenshot ' => Expected::once (function ($ filename ) use ($ test ) {
593
604
Assert::assertSame (
You can’t perform that action at this time.
0 commit comments