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
3434 }
3535
3636 /**
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.
3839 *
3940 * ```php
4041 * <?php
41- * $I->seePageIsAvailable('/dashboard');
42+ * $I->amOnPage('/dashboard');
43+ * $I->seePageIsAvailable();
44+ *
45+ * $I->seePageIsAvailable('/dashboard'); // Same as above
4246 * ```
4347 *
44- * @param string $url
48+ * @param string|null $url
4549 */
46- public function seePageIsAvailable (string $ url ): void
50+ public function seePageIsAvailable (string $ url = null ): void
4751 {
48- $ this ->amOnPage ($ url );
52+ if ($ url !== null ) {
53+ $ this ->amOnPage ($ url );
54+ $ this ->seeInCurrentUrl ($ url );
55+ }
4956 $ this ->seeResponseCodeIsSuccessful ();
50- $ this ->seeInCurrentUrl ($ url );
5157 }
5258
5359 /**
You can’t perform that action at this time.
0 commit comments