public function RenderCacheWebTest::testEmptyView in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/tests/src/Functional/RenderCacheWebTest.php \Drupal\Tests\views\Functional\RenderCacheWebTest::testEmptyView()
- 10 core/modules/views/tests/src/Functional/RenderCacheWebTest.php \Drupal\Tests\views\Functional\RenderCacheWebTest::testEmptyView()
Tests rendering caching of a views block with arguments.
File
- core/
modules/ views/ tests/ src/ Functional/ RenderCacheWebTest.php, line 63
Class
- RenderCacheWebTest
- Tests render caching of blocks provided by views.
Namespace
Drupal\Tests\views\FunctionalCode
public function testEmptyView() {
$this
->drupalGet('<front>');
$this
->assertEqual([], $this
->cssSelect('div.region-header div.views-field-title'));
$this
->drupalGet($this->nodes[0]
->toUrl());
$result = $this
->cssSelect('div.region-header div.views-field-title')[0]
->getText();
$this
->assertEqual('test title 1', $result);
$this
->drupalGet($this->nodes[1]
->toUrl());
$result = $this
->cssSelect('div.region-header div.views-field-title')[0]
->getText();
$this
->assertEqual('test title 2', $result);
$this
->drupalGet($this->nodes[0]
->toUrl());
$result = $this
->cssSelect('div.region-header div.views-field-title')[0]
->getText();
$this
->assertEqual('test title 1', $result);
}