public function StyleTableTest::testTableCacheability in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Functional/Plugin/StyleTableTest.php \Drupal\Tests\views\Functional\Plugin\StyleTableTest::testTableCacheability()
- 9 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
->assertSession()
->responseHeaderEquals(DynamicPageCacheSubscriber::HEADER, 'MISS');
$this
->drupalGet($url);
$this
->assertSession()
->responseHeaderEquals(DynamicPageCacheSubscriber::HEADER, 'HIT');
}