public function RealServiceInstantiatorTest::testInstantiateProxy

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/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));
}