function GroupIncludesTestTrait::setupGroupIncludes
Return value
array[]
2 calls to GroupIncludesTestTrait::setupGroupIncludes()
- HookCollectorPassTest::testGroupIncludes in core/
tests/ Drupal/ Tests/ Core/ Hook/ HookCollectorPassTest.php - @covers ::process @covers ::collectModuleHookImplementations
- ModuleHandlerTest::testGroupIncludes in core/
tests/ Drupal/ Tests/ Core/ Extension/ ModuleHandlerTest.php - @covers ::getHookListeners
File
-
core/
tests/ Drupal/ Tests/ Core/ GroupIncludesTestTrait.php, line 20
Class
- GroupIncludesTestTrait
- @coversDefaultClass \Drupal\Core\Hook\HookCollectorPass @group Hook
Namespace
Drupal\Tests\CoreCode
public static function setupGroupIncludes() : array {
vfsStream::setup('drupal_root');
file_put_contents('vfs://drupal_root/test_module_info.yml', '');
$module_filenames = [
'test_module' => [
'pathname' => 'vfs://drupal_root/test_module_info.yml',
],
];
file_put_contents('vfs://drupal_root/test_module.module', <<<'EOD'
<?php
function test_module_hook_info() {
$hooks['token_info'] = [
'group' => 'tokens',
];
return $hooks;
}
EOD
);
file_put_contents('vfs://drupal_root/test_module.tokens.inc', <<<'EOD'
<?php
function _test_module_helper() {}
EOD
);
return $module_filenames;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.