public function ModuleHandlerTest::testInvokeModuleEnabled in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php \Drupal\Tests\Core\Extension\ModuleHandlerTest::testInvokeModuleEnabled()
Test invoke methods when module is enabled.
@covers ::invoke
File
- core/
tests/ Drupal/ Tests/ Core/ Extension/ ModuleHandlerTest.php, line 287 - Contains \Drupal\Tests\Core\Extension\ModuleHandlerTest.
Class
- ModuleHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ModuleHandler @group Extension
Namespace
Drupal\Tests\Core\ExtensionCode
public function testInvokeModuleEnabled() {
$this
->assertTrue($this->moduleHandler
->invoke('module_handler_test', 'hook', array(
TRUE,
)), 'Installed module runs hook.');
$this
->assertFalse($this->moduleHandler
->invoke('module_handler_test', 'hook', array(
FALSE,
)), 'Installed module runs hook.');
$this
->assertNull($this->moduleHandler
->invoke('module_handler_test_fake', 'hook', array(
FALSE,
)), 'Installed module runs hook.');
}