function DiscoverServiceProvidersTest::testDiscoverServiceNoContainerYamls

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php \Drupal\Tests\Core\DrupalKernel\DiscoverServiceProvidersTest::testDiscoverServiceNoContainerYamls()
  2. 10 core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php \Drupal\Tests\Core\DrupalKernel\DiscoverServiceProvidersTest::testDiscoverServiceNoContainerYamls()
  3. 11.x 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 46

Class

DiscoverServiceProvidersTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21DrupalKernel.php/class/DrupalKernel/8.9.x" title="The DrupalKernel class is the core of Drupal itself." class="local">\Drupal\Core\DrupalKernel</a> @group DrupalKernel

Namespace

Drupal\Tests\Core\DrupalKernel

Code

public function testDiscoverServiceNoContainerYamls() {
    new Settings([]);
    $kernel = new DrupalKernel('prod', new ClassLoader());
    $kernel->discoverServiceProviders();
    $expect = [
        'app' => [
            'core' => 'core/core.services.yml',
        ],
        'site' => [],
    ];
    $this->assertAttributeSame($expect, 'serviceYamls', $kernel);
}

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