コード例 #1
0
 /**
  * {@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';
 }
コード例 #2
0
 /**
  * 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);
 }
コード例 #3
0
 /**
  * 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();
 }
コード例 #4
0
ファイル: UpdateKernel.php プロジェクト: 318io/318-io
 /**
  * {@inheritdoc}
  */
 public function discoverServiceProviders()
 {
     parent::discoverServiceProviders();
     $this->serviceProviderClasses['app']['update_kernel'] = 'Drupal\\Core\\Update\\UpdateServiceProvider';
 }