public function testCompositeProperties() { $utilities = $this->getMockBuilder('Faker\\Components\\Engine\\Common\\Utilities')->getMock(); $generator = $this->getMock('\\PHPStats\\Generator\\GeneratorInterface'); $locale = $this->getMock('\\Faker\\Locale\\LocaleInterface'); $event = $this->getMockBuilder('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface')->getMock(); $parent = $this->getMockBuilder('Faker\\Components\\Engine\\Common\\Composite\\CompositeInterface')->getMock(); $parentB = $this->getMockBuilder('Faker\\Components\\Engine\\Common\\Composite\\CompositeInterface')->getMock(); $id = 'tableNode'; $type = new TableNode($id, $event); $type->setParent($parent); $this->assertEquals($id, $type->getId()); $this->assertEquals($event, $type->getEventDispatcher()); $this->assertEquals($parent, $type->getParent()); $type->setParent($parentB); $this->assertEquals($parentB, $type->getParent()); $this->assertEquals(array(), $type->getChildren()); $type->addChild($parentB); }