function OptimizedPhpArrayDumperTest::testGetAliases

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::testGetAliases()
  2. 8.9.x core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::testGetAliases()
  3. 10 core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::testGetAliases()

Tests that alias processing works properly.

@covers ::getAliases

@dataProvider getAliasesDataProvider

File

core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php, line 110

Class

OptimizedPhpArrayDumperTest
@coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper @group DependencyInjection

Namespace

Drupal\Tests\Component\DependencyInjection\Dumper

Code

public function testGetAliases($aliases, $definition_aliases) : void {
    $this->containerDefinition['aliases'] = $definition_aliases;
    $this->containerBuilder
        ->getAliases()
        ->willReturn($aliases);
    $this->assertEquals($this->containerDefinition, $this->dumper
        ->getArray(), 'Expected definition matches dump.');
}

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