function RulesTestCase::testActionExecutionFails

Same name in other branches
  1. 7.x-2.x tests/rules.test \RulesTestCase::testActionExecutionFails()

Test executing with wrong arguments.

File

d7-tests/rules_test_case.test, line 161

Class

RulesTestCase

Code

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);
    }
}