public function EntityPagerTest::testsCount in Entity Pager 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/EntityPagerTest.php \Drupal\Tests\entity_pager\Functional\EntityPagerTest::testsCount()
Tests the count markup.
File
- tests/src/ Functional/ EntityPagerTest.php, line 250 
Class
- EntityPagerTest
- Tests the entity pager view style.
Namespace
Drupal\Tests\entity_pager\FunctionalCode
public function testsCount() {
  $this
    ->drupalPlaceBlock('views_block:entity_pager_example-entity_pager_example_block', [
    'id' => 'test',
  ]);
  $this
    ->drupalGet($this->nodes[1]
    ->toUrl());
  $assert = $this
    ->assertSession();
  // Assert result count is displayed.
  $assert
    ->pageTextContains('2 of 5');
  // Assert toggling 'display_count' removes count text.
  $this
    ->updateExampleView([
    'display_count' => FALSE,
  ]);
  $this
    ->drupalGet($this
    ->getUrl());
  $assert
    ->pageTextNotContains('2 of 5');
}