function ViewsNoResultsBehaviorTest::testDuplicateText

Same name in other branches
  1. 9 core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php \Drupal\Tests\views\Functional\ViewsNoResultsBehaviorTest::testDuplicateText()
  2. 8.9.x core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php \Drupal\Tests\views\Functional\ViewsNoResultsBehaviorTest::testDuplicateText()
  3. 11.x core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php \Drupal\Tests\views\Functional\ViewsNoResultsBehaviorTest::testDuplicateText()

Tests the view with the text.

File

core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php, line 43

Class

ViewsNoResultsBehaviorTest
Tests no results behavior.

Namespace

Drupal\Tests\views\Functional

Code

public function testDuplicateText() : void {
    $output = $this->drupalGet('admin/content');
    $this->assertEquals(1, substr_count($output, 'No content available.'), 'Only one message should be present');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.