Skip to content
Snippets Groups Projects
Commit 10e6b3f8 authored by Benji Fisher's avatar Benji Fisher
Browse files

Add assertions to testFrontPageCoolCache()

parent 694cb802
No related branches found
No related tags found
1 merge request!9596Add assertions to testFrontPageCoolCache()
......@@ -92,9 +92,20 @@ protected function testFrontPageCoolCache(): void {
$this->clearCaches();
// Now visit a different page to warm non-route-specific caches.
$this->drupalGet('user/login');
$this->collectPerformanceData(function () {
$performance_data = $this->collectPerformanceData(function () {
$this->drupalGet('<front>');
}, 'umamiFrontPageCoolCache');
$this->assertSame(104, $performance_data->getQueryCount());
$this->assertSame(289, $performance_data->getCacheGetCount());
$this->assertSame(90, $performance_data->getCacheSetCount());
$this->assertSame(0, $performance_data->getCacheDeleteCount());
$this->assertSame(83, $performance_data->getCacheTagChecksumCount());
$this->assertSame(91, $performance_data->getCacheTagIsValidCount());
$this->assertSame(0, $performance_data->getCacheTagInvalidationCount());
$this->assertSame(1, $performance_data->getScriptCount());
$this->assertLessThan(7100, $performance_data->getScriptBytes());
$this->assertSame(2, $performance_data->getStylesheetCount());
$this->assertLessThan(40250, $performance_data->getStylesheetBytes());
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment