function RulesTestCase::testPassingByReference in Rules 8.3
Same name and namespace in other branches
- 7.2 tests/rules.test \RulesTestCase::testPassingByReference()
Test passing arguments by reference to an action.
File
- d7-tests/
rules_test_case.test, line 378 - Rules 7.x tests.
Class
Code
function testPassingByReference() {
// Keeping references of variables is unsupported, though the
// EntityMetadataArrayObject may be used to achieve that.
$array = array(
'foo' => 'bar',
);
$data = new EntityMetadataArrayObject($array);
rules_action('rules_action_test_reference')
->execute($data);
$this
->assertTrue($data['changed'], 'Parameter has been passed by reference');
}