function StackedKernelPassTest::testProcessWithHttpKernel

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\StackedKernelPassTest::testProcessWithHttpKernel()
  2. 10 core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\StackedKernelPassTest::testProcessWithHttpKernel()
  3. 9 core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\StackedKernelPassTest::testProcessWithHttpKernel()
  4. 8.9.x core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php \Drupal\Tests\Core\DependencyInjection\Compiler\StackedKernelPassTest::testProcessWithHttpKernel()

Tests process with http kernel.

File

core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php, line 108

Class

StackedKernelPassTest
Tests Drupal\Core\DependencyInjection\Compiler\StackedKernelPass.

Namespace

Drupal\Tests\Core\DependencyInjection\Compiler

Code

public function testProcessWithHttpKernel() : void {
  $kernel = new Definition(HttpKernelInterface::class);
  $kernel->setPublic(TRUE);
  $this->containerBuilder
    ->setDefinition('http_kernel', $kernel);
  $this->stackedKernelPass
    ->process($this->containerBuilder);
  $unprocessed_kernel = $this->containerBuilder
    ->getDefinition('http_kernel');
  $this->assertSame($kernel, $unprocessed_kernel);
  $this->assertSame($kernel->getArguments(), $unprocessed_kernel->getArguments());
}

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