public function MediaEntityContext::assertMediaItemPage in Lightning Media 8.2
Same name and namespace in other branches
- 8 tests/contexts/MediaEntityContext.behat.inc \Acquia\LightningExtension\Context\MediaEntityContext::assertMediaItemPage()
- 8.3 tests/contexts/MediaEntityContext.behat.inc \Acquia\LightningExtension\Context\MediaEntityContext::assertMediaItemPage()
Asserts that we are visiting a media entity.
@Then I should be visiting a media item
File
- tests/
contexts/ MediaEntityContext.behat.inc, line 40
Class
- MediaEntityContext
- Contains step definitions for interacting with media entities.
Namespace
Acquia\LightningExtension\ContextCode
public function assertMediaItemPage() {
$this
->assertSession()
->addressMatches('#^/media/([\\w-]+/)?\\d+$#');
try {
$this
->assertSession()
->statusCodeEquals(200);
} catch (UnsupportedDriverActionException $e) {
// This isn't a critically important assertion, so don't worry about it.
}
}