Symfony\Component\DependencyInjection\Tests\DefinitionTest::testTypes PHP Method

testTypes() public method

public testTypes ( )
    public function testTypes()
    {
        $def = new Definition('stdClass');

        $this->assertEquals(array(), $def->getAutowiringTypes());
        $this->assertSame($def, $def->setAutowiringTypes(array('Foo')));
        $this->assertEquals(array('Foo'), $def->getAutowiringTypes());
        $this->assertSame($def, $def->addAutowiringType('Bar'));
        $this->assertTrue($def->hasAutowiringType('Bar'));
        $this->assertSame($def, $def->removeAutowiringType('Foo'));
        $this->assertEquals(array('Bar'), $def->getAutowiringTypes());
    }