public function RulesTestCase::testActionExecutionFails in Rules 7.2
Same name and namespace in other branches
- 8.3 d7-tests/rules_test_case.test \RulesTestCase::testActionExecutionFails()
Tests executing with wrong arguments.
File
- tests/
rules.test, line 193 - Rules tests.
Class
- RulesTestCase
- Rules test cases.
Code
public function testActionExecutionFails() {
$action = rules_action('rules_node_publish_action');
try {
$action
->execute();
$this
->fail("Execution hasn't created an exception.");
} catch (RulesEvaluationException $e) {
$this
->pass("RulesEvaluationException was thrown: " . $e);
}
}