You are here

function RulesTestCase::testActionExecutionFails in Rules 8.3

Same name and namespace in other branches
  1. 7.2 tests/rules.test \RulesTestCase::testActionExecutionFails()

Test executing with wrong arguments.

File

d7-tests/rules_test_case.test, line 161
Rules 7.x tests.

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