/** * Test an empty Category entity */ public function testEmptyCategory() { $category = new Category(); $this->assertEquals('New Category', $category->__toString()); $this->assertNull($category->getId()); $this->assertNull($category->getTitle()); $this->assertEquals(0, $category->getItems()->count()); $this->assertInstanceOf('\\Doctrine\\Common\\Collections\\ArrayCollection', $category->getItems()); $this->assertNull($category->getCreatedAt()); $this->assertNull($category->getUpdatedAt()); }
/** * {@inheritDoc} */ public function __toString() { $this->__initializer__ && $this->__initializer__->__invoke($this, '__toString', array()); return parent::__toString(); }