You are here

public function ModuleHandlerTest::testInvokeAll in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php \Drupal\Tests\Core\Extension\ModuleHandlerTest::testInvokeAll()

Test invoke all.

@covers ::invokeAll

File

core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php, line 391
Contains \Drupal\Tests\Core\Extension\ModuleHandlerTest.

Class

ModuleHandlerTest
@coversDefaultClass \Drupal\Core\Extension\ModuleHandler @group Extension

Namespace

Drupal\Tests\Core\Extension

Code

public function testInvokeAll() {
  $this->moduleHandler
    ->addModule('module_handler_test_all1', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1');
  $this->moduleHandler
    ->addModule('module_handler_test_all2', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2');
  $this
    ->assertEquals(array(
    TRUE,
    TRUE,
    TRUE,
  ), $this->moduleHandler
    ->invokeAll('hook', array(
    TRUE,
  )));
}