function ProxyServicesPassTest::testContainerWithoutLazyServices

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\ProxyServicesPassTest::testContainerWithoutLazyServices()
  2. 8.9.x core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\ProxyServicesPassTest::testContainerWithoutLazyServices()
  3. 11.x core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\ProxyServicesPassTest::testContainerWithoutLazyServices()

@covers ::process

File

core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/ProxyServicesPassTest.php, line 38

Class

ProxyServicesPassTest
@coversDefaultClass \Drupal\Core\DependencyInjection\Compiler\ProxyServicesPass @group DependencyInjection

Namespace

Drupal\Tests\Core\DependencyInjection\Compiler

Code

public function testContainerWithoutLazyServices() : void {
    $container = new ContainerBuilder();
    $container->register('plugin_cache_clearer', 'Drupal\\Core\\Plugin\\CachedDiscoveryClearer');
    $this->proxyServicesPass
        ->process($container);
    $this->assertCount(2, $container->getDefinitions());
    $this->assertEquals('Drupal\\Core\\Plugin\\CachedDiscoveryClearer', $container->getDefinition('plugin_cache_clearer')
        ->getClass());
}

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