Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/Codeception/Module/Symfony/BrowserAssertionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,26 @@ public function rebootClientKernel(): void
}

/**
* Goes to a page and check that it can be accessed.
* Verifies that a page is available.
* By default it checks the current page, specify the `$url` parameter to change it.
*
* ```php
* <?php
* $I->seePageIsAvailable('/dashboard');
* $I->amOnPage('/dashboard');
* $I->seePageIsAvailable();
*
* $I->seePageIsAvailable('/dashboard'); // Same as above
* ```
*
* @param string $url
* @param string|null $url
*/
public function seePageIsAvailable(string $url): void
public function seePageIsAvailable(string $url = null): void
{
$this->amOnPage($url);
if ($url !== null) {
$this->amOnPage($url);
$this->seeInCurrentUrl($url);
}
$this->seeResponseCodeIsSuccessful();
$this->seeInCurrentUrl($url);
}

/**
Expand Down