You are here

protected function IntegrationTest::assertPageNotContainsNodeTeaserWithText in Views Entity Reference Filter 8

Asserts that no node teaser containing the given text is present.

Parameters

string $text: The text that must not be present.

2 calls to IntegrationTest::assertPageNotContainsNodeTeaserWithText()
IntegrationTest::assertPageContainsNodeTeaserWithText in tests/src/Functional/IntegrationTest.php
Asserts that a node teaser containing the given text is present.
IntegrationTest::testFilterWorks in tests/src/Functional/IntegrationTest.php
Tests that the Views Entity Reference Filter works.

File

tests/src/Functional/IntegrationTest.php, line 114

Class

IntegrationTest
Tests the integration between Views Entity Reference Filter and Views.

Namespace

Drupal\Tests\verf\Functional

Code

protected function assertPageNotContainsNodeTeaserWithText($text) {
  $teasers = $this
    ->getSession()
    ->getPage()
    ->findAll('css', '.node--view-mode-teaser');
  foreach ($teasers as $teaser) {
    $this
      ->assertNotContains($text, $teaser
      ->getText());
  }
}