protected function TestDiscovery::getExtensions in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Test/TestDiscovery.php \Drupal\Core\Test\TestDiscovery::getExtensions()
Returns all available extensions.
Return value
\Drupal\Core\Extension\Extension[] An array of Extension objects, keyed by extension name.
1 call to TestDiscovery::getExtensions()
- TestDiscovery::registerTestNamespaces in core/
lib/ Drupal/ Core/ Test/ TestDiscovery.php - Registers test namespaces of all extensions and core test classes.
File
- core/
lib/ Drupal/ Core/ Test/ TestDiscovery.php, line 480
Class
- TestDiscovery
- Discovers available tests.
Namespace
Drupal\Core\TestCode
protected function getExtensions() {
$listing = new ExtensionDiscovery($this->root);
// Ensure that tests in all profiles are discovered.
$listing
->setProfileDirectories([]);
$extensions = $listing
->scan('module', TRUE);
$extensions += $listing
->scan('profile', TRUE);
$extensions += $listing
->scan('theme', TRUE);
return $extensions;
}