public function ViewsAggregatorStyleTableTest::testViewsAggregatorTableCacheability in Views Aggregator Plus 8
Tests the cacheability of the table display.
File
- tests/
src/ Functional/ Plugin/ ViewsAggregatorStyleTableTest.php, line 251
Class
- ViewsAggregatorStyleTableTest
- Tests the views aggregator result table style plugin.
Namespace
Drupal\Tests\views_aggregator\Functional\PluginCode
public function testViewsAggregatorTableCacheability() {
\Drupal::service('module_installer')
->uninstall([
'page_cache',
]);
$url = 'va-test-style-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));
}