You are here

public function DrushCommandsTest::testDisableWithLabel in Site Alert 8

Tests site-alert:disable [label].

File

tests/src/Functional/DrushCommandsTest.php, line 123

Class

DrushCommandsTest
Execute drush commands on site_alert.

Namespace

Drupal\Tests\site_alert\Functional

Code

public function testDisableWithLabel() : void {
  $this
    ->drush('site-alert:create', [
    'automated-test-alert',
    'A site alert test.',
  ], []);
  $this
    ->assertActiveAlertCount(1);
  $this
    ->drush('site-alert:disable', [
    'automated-test-alert',
  ]);
  $this
    ->assertErrorOutputEquals("[success] Disabled site alert 'automated-test-alert'.");
  $this
    ->assertAlertCount(1);
  $this
    ->assertActiveAlertCount(0);
}