function RulesIntegrationTestCase::testAccessCallbacks

Same name and namespace in other branches
  1. 7.x-2.x tests/rules.test \RulesIntegrationTestCase::testAccessCallbacks()

Just make sure the access callback run without errors.

File

d7-tests/rules_integration_test_case.test, line 36

Class

RulesIntegrationTestCase
Tests provided module integration.

Code

function testAccessCallbacks() {
  $cache = rules_get_cache();
  foreach (array(
    'action',
    'condition',
    'event',
  ) as $type) {
    foreach (rules_fetch_data($type . '_info') as $name => $info) {
      if (isset($info['access callback'])) {
        $info['access callback']($type, $name);
      }
    }
  }
}