You are here

public function ZfExtensionManagerSfContainerTest::testCanonicalizeName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php \Drupal\Tests\Component\Bridge\ZfExtensionManagerSfContainerTest::testCanonicalizeName()

@covers ::canonicalizeName @dataProvider canonicalizeNameProvider

File

core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php, line 70
Contains \Drupal\Tests\Component\Bridge\ZfExtensionManagerSfContainerTest.

Class

ZfExtensionManagerSfContainerTest
@coversDefaultClass \Drupal\Component\Bridge\ZfExtensionManagerSfContainer @group Bridge

Namespace

Drupal\Tests\Component\Bridge

Code

public function testCanonicalizeName($name, $canonical_name) {
  $service = new \stdClass();
  $service->value = 'myvalue';
  $container = new ContainerBuilder();
  $container
    ->set($canonical_name, $service);
  $bridge = new ZfExtensionManagerSfContainer();
  $bridge
    ->setContainer($container);
  $this
    ->assertTrue($bridge
    ->has($name));
  $this
    ->assertEquals($service, $bridge
    ->get($name));
}