public function StyleSummaryTest::testSummaryView in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/Plugin/StyleSummaryTest.php \Drupal\views\Tests\Plugin\StyleSummaryTest::testSummaryView()
Tests a summary view.
File
- core/
modules/ views/ src/ Tests/ Plugin/ StyleSummaryTest.php, line 56 - Contains \Drupal\views\Tests\Plugin\StyleSummaryTest.
Class
- StyleSummaryTest
- Tests the summary style plugin.
Namespace
Drupal\views\Tests\PluginCode
public function testSummaryView() {
$this
->drupalGet('test-summary');
$summary_list = $this
->cssSelect('ul.views-summary li');
$this
->assertEqual(4, count($summary_list));
foreach ($summary_list as $summary_list_item) {
$this
->assertEqual('(5)', trim((string) $summary_list_item));
}
$summary_links = $this
->cssSelect('ul.views-summary a');
$this
->assertEqual(4, count($summary_links));
foreach ($summary_links as $index => $summary_link) {
$this
->assertEqual('type' . $index, trim((string) $summary_link));
}
$this
->clickLink('type1');
$entries = $this
->cssSelect('div.view-content div.views-row');
$this
->assertEqual(2, count($entries));
}