You are here

protected function CoreMediaUpdatePath8dot7Test::assertFrontPageMedia in Media entity 8.2

Clicks a link on the front page and checks for some selectors.

Parameters

string $link: Link to click on the frontpage.

array|string $assert_selectors: CSS selectors to check for their existence.

Throws

\Behat\Mink\Exception\ElementNotFoundException

File

tests/src/Functional/CoreMediaUpdatePath8dot7Test.php, line 124

Class

CoreMediaUpdatePath8dot7Test
Tests the media_entity to media update.

Namespace

Drupal\Tests\media_entity\Functional

Code

protected function assertFrontPageMedia($link, $assert_selectors) {
  $this
    ->drupalGet('<front>');
  $this
    ->clickLink($link);
  $assert = $this
    ->assertSession();
  foreach ((array) $assert_selectors as $selector) {
    $assert
      ->elementExists('css', $selector);
  }
}