function StyleTableTest::testTableCacheability
Same name in other branches
- 9 core/modules/views/tests/src/Functional/Plugin/StyleTableTest.php \Drupal\Tests\views\Functional\Plugin\StyleTableTest::testTableCacheability()
- 10 core/modules/views/tests/src/Functional/Plugin/StyleTableTest.php \Drupal\Tests\views\Functional\Plugin\StyleTableTest::testTableCacheability()
- 11.x core/modules/views/tests/src/Functional/Plugin/StyleTableTest.php \Drupal\Tests\views\Functional\Plugin\StyleTableTest::testTableCacheability()
Tests the cacheability of the table display.
File
-
core/
modules/ views/ tests/ src/ Functional/ Plugin/ StyleTableTest.php, line 248
Class
- StyleTableTest
- Tests the table style views plugin.
Namespace
Drupal\Tests\views\Functional\PluginCode
public function testTableCacheability() {
\Drupal::service('module_installer')->uninstall([
'page_cache',
]);
$url = 'test-table';
$this->drupalGet($url);
$this->assertSession()
->statusCodeEquals(200);
$this->assertEquals('MISS', $this->drupalGetHeader(DynamicPageCacheSubscriber::HEADER));
$this->drupalGet($url);
$this->assertEquals('HIT', $this->drupalGetHeader(DynamicPageCacheSubscriber::HEADER));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.