protected function SiteAlertCacheTest::assertSiteAlertCount in Site Alert 8
Asserts that the expected number of site alerts is visible on the page.
Parameters
int $count: The expected number of site alerts.
1 call to SiteAlertCacheTest::assertSiteAlertCount()
- SiteAlertCacheTest::testPageCache in tests/
src/ Functional/ SiteAlertCacheTest.php - Tests that the page cache varies correctly by the currently active alerts.
File
- tests/
src/ Functional/ SiteAlertCacheTest.php, line 195
Class
- SiteAlertCacheTest
- Tests that the page cache correctly varies on the active site alerts.
Namespace
Drupal\Tests\site_alert\FunctionalCode
protected function assertSiteAlertCount($count) {
$alerts = $this
->getSession()
->getPage()
->findAll('css', '.site-alert div.text');
$this
->assertCount($count, $alerts);
}