public function DrushCommandsTest::testDisableAll in Site Alert 8
Tests site-alert:disable --all.
File
- tests/
src/ Functional/ DrushCommandsTest.php, line 139
Class
- DrushCommandsTest
- Execute drush commands on site_alert.
Namespace
Drupal\Tests\site_alert\FunctionalCode
public function testDisableAll() : void {
$this
->drush('site-alert:create', [
'automated-test-alert',
'A test site alert.',
], []);
$this
->drush('site-alert:create', [
'automated-test-alert-2',
'Another test site alert.',
], []);
$this
->assertActiveAlertCount(2);
$this
->drush('site-alert:disable', [], []);
$this
->assertErrorOutputEquals("[success] All active site alerts have been disabled.");
$this
->assertAlertCount(2);
$this
->assertActiveAlertCount(0);
}