You are here

public function RequiredByRoleCallbackAlterTestCase::testContribModuleCallback in Required by role 7

Test the hook_required_by_role_callback.

File

tests/required_by_role_test/RequiredByRoleCallbackAlterTestCase.test, line 39
Callback tests.

Class

RequiredByRoleCallbackAlterTestCase

Code

public function testContribModuleCallback() {
  $modules = array(
    'required_by_role_callback_test',
  );
  module_enable($modules);
  $result = _required_by_role_get_callback();
  $callback = 'required_by_role_callback_test_required_callback';
  $message = "The callback function should be {$callback}";
  $this
    ->assertEqual($result, $callback, $message);

  // Disable test modules to avoid set all fields required.
  module_disable($modules);
}