function ZfExtensionManagerSfContainerTest::testCanonicalizeName
Same name in this branch
- 9 core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php \Drupal\Tests\Component\Bridge\ZfExtensionManagerSfContainerTest::testCanonicalizeName()
Same name and namespace in other branches
- 8.9.x core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php \Drupal\Tests\Component\Bridge\ZfExtensionManagerSfContainerTest::testCanonicalizeName()
@covers ::canonicalizeName @dataProvider canonicalizeNameProvider
File
-
core/
modules/ aggregator/ tests/ src/ Unit/ ZfExtensionManagerSfContainerTest.php, line 102
Class
- ZfExtensionManagerSfContainerTest
- @coversDefaultClass <a href="/api/drupal/core%21modules%21aggregator%21src%21ZfExtensionManagerSfContainer.php/class/ZfExtensionManagerSfContainer/9" title="Defines a bridge between the Laminas service manager to Symfony container." class="local">\Drupal\aggregator\ZfExtensionManagerSfContainer</a> @group aggregator @group legacy
Namespace
Drupal\Tests\aggregator\UnitCode
public function testCanonicalizeName($name, $canonical_name) {
$service = new \stdClass();
$service->value = 'my_value';
$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));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.