You are here

public function ZfExtensionManagerSfContainerTest::testGet in Zircon Profile 8.0

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

@covers ::setContainer @covers ::get

File

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

Class

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

Namespace

Drupal\Tests\Component\Bridge

Code

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