Contao\CoreBundle\Test\Framework\ContaoFrameworkTest::testCreateInstance PHP 메소드

testCreateInstance() 공개 메소드

Tests the createInstance method.
public testCreateInstance ( )
    public function testCreateInstance()
    {
        $reflection = new \ReflectionClass('Contao\\CoreBundle\\Framework\\ContaoFramework');
        $framework = $reflection->newInstanceWithoutConstructor();
        $class = 'Contao\\CoreBundle\\Test\\Fixtures\\Adapter\\LegacyClass';
        $instance = $framework->createInstance($class, [1, 2]);
        $this->assertInstanceOf($class, $instance);
        $this->assertEquals([1, 2], $instance->constructorArgs);
    }