コード例 #1
0
ファイル: PageTest.php プロジェクト: gobjila/BackBee
 /**
  * @covers BackBee\NestedNode\Page::getInheritedZones
  */
 public function testGetInheritedZones()
 {
     $this->assertEquals(array(), $this->page->getInheritedZones());
     $child = new Page('child', array('title' => 'child', 'url' => 'url'));
     $child->setParent($this->page)->setLayout($this->page->getLayout());
     $this->assertEquals(array($child->getContentSet()->last()->getUid() => $child->getContentSet()->last()), $child->getInheritedZones());
     $this->assertEquals(array($child->getContentSet()->last()->getUid() => $child->getContentSet()->last()), $child->getInheritedZones(false));
     $this->assertEquals(array($child->getContentSet()->last()->getUid() => $child->getContentSet()->last()), $child->getInheritedZones(null));
     $this->assertEquals(array($child->getContentSet()->last()->getUid() => $child->getContentSet()->last()), $child->getInheritedZones('fake'));
     $this->assertEquals(array($child->getContentSet()->last()->getUid()), $child->getInheritedZones(true));
 }