function TestRunnerKernel::discoverServiceProviders

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Test/TestRunnerKernel.php \Drupal\Core\Test\TestRunnerKernel::discoverServiceProviders()
  2. 8.9.x core/lib/Drupal/Core/Test/TestRunnerKernel.php \Drupal\Core\Test\TestRunnerKernel::discoverServiceProviders()
  3. 10 core/lib/Drupal/Core/Test/TestRunnerKernel.php \Drupal\Core\Test\TestRunnerKernel::discoverServiceProviders()

Overrides DrupalKernel::discoverServiceProviders

File

core/lib/Drupal/Core/Test/TestRunnerKernel.php, line 97

Class

TestRunnerKernel
Defines a kernel used for running Functional tests and <a href="/api/drupal/core%21scripts%21run-tests.sh/11.x" title="Script for running tests on DrupalCI." class="local">run-tests.sh</a>.

Namespace

Drupal\Core\Test

Code

public function discoverServiceProviders() {
    parent::discoverServiceProviders();
    // The test runner does not require an installed Drupal site to exist.
    // Therefore, its environment is identical to that of the early installer.
    $this->serviceProviderClasses['app']['Test'] = 'Drupal\\Core\\Installer\\InstallerServiceProvider';
    return $this->serviceProviderClasses;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.