File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
src/Codeception/Module/Symfony Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -34,20 +34,26 @@ public function rebootClientKernel(): void
34
34
}
35
35
36
36
/**
37
- * Goes to a page and check that it can be accessed.
37
+ * Verifies that a page is available.
38
+ * By default it checks the current page, specify the `$url` parameter to change it.
38
39
*
39
40
* ```php
40
41
* <?php
41
- * $I->seePageIsAvailable('/dashboard');
42
+ * $I->amOnPage('/dashboard');
43
+ * $I->seePageIsAvailable();
44
+ *
45
+ * $I->seePageIsAvailable('/dashboard'); // Same as above
42
46
* ```
43
47
*
44
- * @param string $url
48
+ * @param string|null $url
45
49
*/
46
- public function seePageIsAvailable (string $ url ): void
50
+ public function seePageIsAvailable (string $ url = null ): void
47
51
{
48
- $ this ->amOnPage ($ url );
52
+ if ($ url !== null ) {
53
+ $ this ->amOnPage ($ url );
54
+ $ this ->seeInCurrentUrl ($ url );
55
+ }
49
56
$ this ->seeResponseCodeIsSuccessful ();
50
- $ this ->seeInCurrentUrl ($ url );
51
57
}
52
58
53
59
/**
You can’t perform that action at this time.
0 commit comments