You are here

public function RealServiceInstantiatorTest::testInstantiateProxy in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php \Symfony\Component\DependencyInjection\Tests\LazyProxy\Instantiator\RealServiceInstantiatorTest::testInstantiateProxy()

File

vendor/symfony/dependency-injection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php, line 26

Class

RealServiceInstantiatorTest
Tests for { @author Marco Pivetta <ocramius@gmail.com>

Namespace

Symfony\Component\DependencyInjection\Tests\LazyProxy\Instantiator

Code

public function testInstantiateProxy() {
  $instantiator = new RealServiceInstantiator();
  $instance = new \stdClass();
  $container = $this
    ->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
  $callback = function () use ($instance) {
    return $instance;
  };
  $this
    ->assertSame($instance, $instantiator
    ->instantiateProxy($container, new Definition(), 'foo', $callback));
}