/** * {@inheritdoc} */ 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'; }
/** * Tests the exception when container_yamls is not set. */ public function testDiscoverServiceNoContainerYamls() { new Settings([]); $kernel = new DrupalKernel('prod', new \Composer\Autoload\ClassLoader()); $kernel->discoverServiceProviders(); $expect = ['app' => ['core' => 'core/core.services.yml'], 'site' => []]; $this->assertAttributeSame($expect, 'serviceYamls', $kernel); }
/** * Tests the exception when container_yamls is not set. * * @covers ::discoverServiceProviders * @expectedException \Exception */ public function testDiscoverServiceNoContainerYamls() { new Settings([]); $kernel = new DrupalKernel('prod', new \Composer\Autoload\ClassLoader()); $kernel->discoverServiceProviders(); }
/** * {@inheritdoc} */ public function discoverServiceProviders() { parent::discoverServiceProviders(); $this->serviceProviderClasses['app']['update_kernel'] = 'Drupal\\Core\\Update\\UpdateServiceProvider'; }