function ContainerBuilderTest::testConstructor

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testConstructor()
  2. 8.9.x core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testConstructor()
  3. 10 core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testConstructor()

Tests constructor and resource tracking disabling.

This test runs in a separate process to ensure the aliased class does not affect any other tests.

@runInSeparateProcess @preserveGlobalState disabled

File

core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php, line 94

Class

ContainerBuilderTest
@coversDefaultClass \Drupal\Core\DependencyInjection\ContainerBuilder @group DependencyInjection

Namespace

Drupal\Tests\Core\DependencyInjection

Code

public function testConstructor() : void {
    class_alias(TestInterface::class, 'Symfony\\Component\\Config\\Resource\\ResourceInterface');
    $container = new ContainerBuilder();
    $this->assertFalse($container->isTrackingResources());
}

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