public function testConstruct() { $page = new Page(); $this->assertInstanceOf('Doctrine\\Common\\Collections\\Collection', $page->getChildPages()); $this->assertEmpty($page->getChildPages()->toArray()); $slug = new Slug(); $slug->setUrl('/'); $this->assertInstanceOf('Doctrine\\Common\\Collections\\Collection', $page->getSlugs()); $this->assertEquals([$slug], $page->getSlugs()->toArray()); $now = new \DateTime(); $this->assertInstanceOf('DateTime', $page->getCreatedAt()); $this->assertLessThanOrEqual($now, $page->getCreatedAt()); $this->assertInstanceOf('DateTime', $page->getUpdatedAt()); $this->assertLessThanOrEqual($now, $page->getUpdatedAt()); }