function TestDiscovery::getExtensions
Same name in other branches
- 9 core/lib/Drupal/Core/Test/TestDiscovery.php \Drupal\Core\Test\TestDiscovery::getExtensions()
- 8.9.x core/lib/Drupal/Core/Test/TestDiscovery.php \Drupal\Core\Test\TestDiscovery::getExtensions()
- 10 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 425
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.