protected function SiteAlertTestTrait::assertActiveAlertCount in Site Alert 8
Checks that the database contains the expected number of active alerts.
Parameters
int $expected_count: The expected number of active alerts.
5 calls to SiteAlertTestTrait::assertActiveAlertCount()
- CliCommandsTest::testDisableAllSiteAlerts in tests/
src/ Kernel/ CliCommandsTest.php - Checks that all site alerts can be disabled by passing the 'all' option.
- CliCommandsTest::testDisableSiteAlertByLabel in tests/
src/ Kernel/ CliCommandsTest.php - Checks that a site alert can be disabled by passing the label.
- CliCommandsTest::testEnableSiteAlertByLabel in tests/
src/ Kernel/ CliCommandsTest.php - Checks that a site alert can be enabled by passing the label.
- DrushCommandsTest::testDisableAll in tests/
src/ Functional/ DrushCommandsTest.php - Tests site-alert:disable --all.
- DrushCommandsTest::testDisableWithLabel in tests/
src/ Functional/ DrushCommandsTest.php - Tests site-alert:disable [label].
File
- tests/
src/ Traits/ SiteAlertTestTrait.php, line 91
Class
- SiteAlertTestTrait
- Helper methods for testing the Site Alert module.
Namespace
Drupal\Tests\site_alert\TraitsCode
protected function assertActiveAlertCount(int $expected_count) : void {
$this
->assertEquals($expected_count, $this
->getAlertCount(TRUE));
}