Contao\CoreBundle\Test\Framework\ContaoFrameworkTest::testCreateInstance PHP Method

testCreateInstance() public method

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);
    }