public function ModuleHandlerTest::testInvokeAll in Drupal 8
Test invoke all.
@covers ::invokeAll
File
- core/
tests/ Drupal/ Tests/ Core/ Extension/ ModuleHandlerTest.php, line 411
Class
- ModuleHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ModuleHandler @runTestsInSeparateProcesses
Namespace
Drupal\Tests\Core\ExtensionCode
public function testInvokeAll() {
$module_handler = $this
->getModuleHandler();
$module_handler
->addModule('module_handler_test_all1', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1');
$module_handler
->addModule('module_handler_test_all2', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2');
$this
->assertEquals([
TRUE,
TRUE,
TRUE,
], $module_handler
->invokeAll('hook', [
TRUE,
]));
}