You are here

protected function TestDiscovery::getExtensions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/TestDiscovery.php \Drupal\simpletest\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/modules/simpletest/src/TestDiscovery.php
Registers test namespaces of all available extensions.

File

core/modules/simpletest/src/TestDiscovery.php, line 447
Contains \Drupal\simpletest\TestDiscovery.

Class

TestDiscovery
Discovers available tests.

Namespace

Drupal\simpletest

Code

protected function getExtensions() {
  $listing = new ExtensionDiscovery(DRUPAL_ROOT);

  // Ensure that tests in all profiles are discovered.
  $listing
    ->setProfileDirectories(array());
  $extensions = $listing
    ->scan('module', TRUE);
  $extensions += $listing
    ->scan('profile', TRUE);
  $extensions += $listing
    ->scan('theme', TRUE);
  return $extensions;
}