public function UiPageTest::testRuleStatusOperations in Rules 8.3
Tests that enabling and disabling a rule works.
File
- tests/
src/ Functional/ UiPageTest.php, line 82
Class
- UiPageTest
- Tests that the Rules UI pages are reachable.
Namespace
Drupal\Tests\rules\FunctionalCode
public function testRuleStatusOperations() {
// Setup an active rule.
$this
->testCreateReactionRule();
$this
->drupalGet('admin/config/workflow/rules');
/** @var \Drupal\Tests\WebAssert $assert */
$assert = $this
->assertSession();
// Test disabling.
$this
->clickLink('Disable');
$assert
->pageTextContains('The reaction rule Test rule has been disabled.');
// Test enabling.
$this
->clickLink('Enable');
$assert
->pageTextContains('The reaction rule Test rule has been enabled.');
}