You are here

public function ProxyServicesPassTest::testContainerWithoutLazyServices in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 40
Contains \Drupal\Tests\Core\DependencyInjection\Compiler\ProxyServicesPassTest.

Class

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

Namespace

Drupal\Tests\Core\DependencyInjection\Compiler

Code

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