function BackendCompilerPassTest::testProcess

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

Tests the process method.

@dataProvider providerTestProcess

@covers ::process

Parameters

string $expected_class: The expected used class.

\Symfony\Component\DependencyInjection\ContainerBuilder $container: The container.

File

core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/BackendCompilerPassTest.php, line 48

Class

BackendCompilerPassTest
@coversDefaultClass \Drupal\Core\DependencyInjection\Compiler\BackendCompilerPass @group DependencyInjection

Namespace

Drupal\Tests\Core\DependencyInjection\Compiler

Code

public function testProcess($expected_class, ContainerBuilder $container) {
    $this->backendPass
        ->process($container);
    $this->assertEquals($expected_class, get_class($container->get('service')));
}

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