Example #1
0
 /**
  * @covers BackBee\NestedNode\Page::__construct
  */
 public function test__construct()
 {
     $page = new Page();
     $this->assertNotNull($page->getUid());
     $this->assertEquals(0, $page->getLevel());
     $this->assertEquals(0, $page->getPosition());
     $this->assertEquals(Page::STATE_HIDDEN, $page->getState());
     $this->assertFalse($page->isStatic());
     $this->assertEquals(Page::DEFAULT_TARGET, $page->getTarget());
     $this->assertInstanceOf('\\DateTime', $page->getCreated());
     $this->assertInstanceOf('\\DateTime', $page->getModified());
     $this->assertInstanceOf('BackBee\\ClassContent\\ContentSet', $page->getContentSet());
     $this->assertInstanceOf('Doctrine\\Common\\Collections\\ArrayCollection', $page->getRevisions());
     $this->assertInstanceOf('BackBee\\NestedNode\\Section', $page->getSection());
     $this->assertTrue($page->hasMainSection());
     $this->assertEquals($page->getUid(), $page->getSection()->getUid());
 }