You are here

class RealServiceInstantiatorTest in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php \Symfony\Component\DependencyInjection\Tests\LazyProxy\Instantiator\RealServiceInstantiatorTest

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

@covers \Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator

Hierarchy

  • class \Symfony\Component\DependencyInjection\Tests\LazyProxy\Instantiator\RealServiceInstantiatorTest extends \Symfony\Component\DependencyInjection\Tests\LazyProxy\Instantiator\PHPUnit_Framework_TestCase

Expanded class hierarchy of RealServiceInstantiatorTest

See also

\Symfony\Component\DependencyInjection\Instantiator\RealServiceInstantiator}.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php, line 24

Namespace

Symfony\Component\DependencyInjection\Tests\LazyProxy\Instantiator
View source
class RealServiceInstantiatorTest extends \PHPUnit_Framework_TestCase {
  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));
  }

}

Members