You are here

public function MediaEntityContext::assertMediaItemPage in Lightning Media 8

Same name and namespace in other branches
  1. 8.2 tests/contexts/MediaEntityContext.behat.inc \Acquia\LightningExtension\Context\MediaEntityContext::assertMediaItemPage()
  2. 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 32

Class

MediaEntityContext

Namespace

Acquia\LightningExtension\Context

Code

public function assertMediaItemPage() {
  $this
    ->assertSession()
    ->addressMatches('/\\/media\\/[0-9]+$/');
  try {
    $this
      ->assertSession()
      ->statusCodeEquals(200);
  } catch (UnsupportedDriverActionException $e) {

    // This isn't a critically important assertion, so don't worry about it.
  }
}