示例#1
0
 public function testVisibleWithRights()
 {
     $item = new MenuItem();
     $item->obj_rights->setValue(array(MenuFixtures::rightFixture));
     //
     UsersLogin::login(MenuFixtures::loginFixture, MenuFixtures::passwordFixture);
     //
     $this->assertTrue($item->isVisible());
 }
示例#2
0
 public function testGroupAddSupportChildren()
 {
     $correctFixture = array(array('name' => 'Link 1', 'children' => array(array('name' => 'Link 1.1'), array('name' => 'Link 1.2'), array('name' => 'Link 1.3', 'children' => array(array('name' => 'Link 1.3.1'))))), array('name' => 'Link 2'));
     $item = new MenuItem();
     $item->getChildren()->add($correctFixture);
     $titleFixture = $correctFixture[0]['children'][2]['children'][0]['name'];
     $testValue = $item->getChildren()->get(0)->getChildren()->get(2)->getChildren()->get(0)->name;
     $this->assertEquals($titleFixture, $testValue);
 }