public function UiPageTest::testNoContextCondition in Rules 8.3
Tests that a condition with no context can be configured.
File
- tests/
src/ Functional/ UiPageTest.php, line 148
Class
- UiPageTest
- Tests that the Rules UI pages are reachable.
Namespace
Drupal\Tests\rules\FunctionalCode
public function testNoContextCondition() {
// Setup a rule with one condition.
$this
->testCreateReactionRule();
$this
->clickLink('Add condition');
// The rules_test_true condition does not define context in its annotation.
$this
->fillField('Condition', 'rules_test_true');
$this
->pressButton('Continue');
// Pressing 'Save' will generate an exception and the test will fail if
// Rules does not support conditions without a context.
// Exception: Warning: Invalid argument supplied for foreach().
$this
->pressButton('Save');
}