function FieldTypePluginManagerTest::enableAllCoreModules
Same name in other branches
- 9 core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php \Drupal\Tests\field\Kernel\FieldTypePluginManagerTest::enableAllCoreModules()
- 10 core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php \Drupal\Tests\field\Kernel\FieldTypePluginManagerTest::enableAllCoreModules()
- 11.x core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php \Drupal\Tests\field\Kernel\FieldTypePluginManagerTest::enableAllCoreModules()
Enable all core modules.
1 call to FieldTypePluginManagerTest::enableAllCoreModules()
- FieldTypePluginManagerTest::testMainProperty in core/
modules/ field/ tests/ src/ Kernel/ FieldTypePluginManagerTest.php - Tests all field items provide an existing main property.
File
-
core/
modules/ field/ tests/ src/ Kernel/ FieldTypePluginManagerTest.php, line 117
Class
- FieldTypePluginManagerTest
- Tests the field type manager.
Namespace
Drupal\Tests\field\KernelCode
protected function enableAllCoreModules() {
$listing = new ExtensionDiscovery($this->root);
$module_list = $listing->scan('module', FALSE);
/** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
$module_handler = $this->container
->get('module_handler');
$module_list = array_filter(array_keys($module_list), function ($module) use ($module_handler, $module_list) {
return !$module_handler->moduleExists($module) && substr($module_list[$module]->getPath(), 0, 4) === 'core';
});
$this->enableModules($module_list);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.