public function testConstruct() { $category = new Category(); $this->assertInstanceOf('Doctrine\\Common\\Collections\\Collection', $category->getTitles()); $this->assertEmpty($category->getTitles()->toArray()); $this->assertInstanceOf('Doctrine\\Common\\Collections\\Collection', $category->getChildCategories()); $this->assertEmpty($category->getChildCategories()->toArray()); $this->assertInstanceOf('Doctrine\\Common\\Collections\\Collection', $category->getProducts()); $this->assertEmpty($category->getProducts()->toArray()); $now = new \DateTime(); $this->assertInstanceOf('DateTime', $category->getCreatedAt()); $this->assertLessThanOrEqual($now, $category->getCreatedAt()); $this->assertInstanceOf('DateTime', $category->getUpdatedAt()); $this->assertLessThanOrEqual($now, $category->getUpdatedAt()); }