diff --git a/core/modules/system/lib/Drupal/system/Tests/DrupalKernel/DrupalKernelSiteTest.php b/core/modules/system/lib/Drupal/system/Tests/DrupalKernel/DrupalKernelSiteTest.php index 2384497..4dafc3e 100644 --- a/core/modules/system/lib/Drupal/system/Tests/DrupalKernel/DrupalKernelSiteTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/DrupalKernel/DrupalKernelSiteTest.php @@ -29,25 +29,28 @@ public static function getInfo() { * Tests services.yml in site directory. */ public function testServicesYml() { - // A service provider class always has precedence over services.yml files. - // The most common swappable core services are overridden by - // \Drupal\simpletest\TestServiceProvider already (which proxies into - // \Drupal\simpletest\DrupalUnitTestBase::buildContainer()). Due to those - // overrides, there are not many options of swappable services left, so this - // test does not test an override, but simply adds a dummy service instead. $this->assertFalse($this->container->has('site.service.yml')); + // A service provider class always has precedence over services.yml files. + // DrupalUnitTestBase::buildContainer() swaps out many services with + // in-memory implementations already, so those cannot be tested. + $this->assertIdentical(get_class($this->container->get('cache.backend.database')), 'Drupal\Core\Cache\DatabaseBackendFactory'); $class = __CLASS__; $doc = <<siteDirectory . '/services.yml', $doc); $this->rebuildContainer(); $this->assertTrue($this->container->has('site.service.yml')); + $this->assertIdentical(get_class($this->container->get('cache.backend.database')), 'Drupal\Core\Cache\MemoryBackendFactory'); } }