/** * Test related method */ public function testConstruct() { // assert instance and implementation $this->assertEntity($this->category); $this->assertInstanceOf('\\Pim\\Bundle\\TranslationBundle\\Entity\\TranslatableInterface', $this->category); // assert object properties $this->assertInstanceOf('\\Doctrine\\Common\\Collections\\Collection', $this->category->getChildren()); $this->assertInstanceOf('\\Doctrine\\Common\\Collections\\Collection', $this->category->getProducts()); $this->assertCount(0, $this->category->getChildren()); $this->assertCount(0, $this->category->getProducts()); }
/** * {@inheritDoc} */ public function getChildren() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getChildren', array()); return parent::getChildren(); }