You are here

function ModuleHandlerTest::testModuleInvokeAll in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/service_container/Tests/ModuleHandlerTest.php \Drupal\service_container\Tests\ModuleHandlerTest::testModuleInvokeAll()

Test that module_invoke_all() can load a hook defined in hook_hook_info().

File

lib/Drupal/service_container/Tests/ModuleHandlerTest.php, line 112
Contains \Drupal\service_container\Tests\ModuleHandlerTest.

Class

ModuleHandlerTest
Tests the module_handler implementation of the service_container.

Namespace

Drupal\service_container\Tests

Code

function testModuleInvokeAll() {
  $this
    ->moduleInstaller()
    ->install(array(
    'module_test',
  ), FALSE);
  $result = $this
    ->moduleHandler()
    ->invokeAll('test_hook');
  $this
    ->assertEqual('success!', $result['module_test']);
}