You are here

public function DiscoverServiceProvidersTest::testDiscoverServiceNoContainerYamls in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php \Drupal\Tests\Core\DrupalKernel\DiscoverServiceProvidersTest::testDiscoverServiceNoContainerYamls()

Tests the exception when container_yamls is not set.

File

core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php, line 50
Contains \Drupal\Tests\Core\DrupalKernel\DiscoverServiceProvidersTest.

Class

DiscoverServiceProvidersTest
@coversDefaultClass \Drupal\Core\DrupalKernel @group DrupalKernel

Namespace

Drupal\Tests\Core\DrupalKernel

Code

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);
}