Ejemplo n.º 1
0
 /**
  * It should be possible to filter out pages based on ACL roles that are
  * constructed directly when setting in the helper, without fetching it
  * from the existing ACL
  *
  */
 public function testShouldBeAbleToUseConstructedAclRolesNotFromAclObject()
 {
     $oldAcl = $this->_helper->getAcl();
     $oldRole = $this->_helper->getRole();
     $acl = $this->_getAcl();
     $this->_helper->setAcl($acl['acl']);
     $this->_helper->setRole(new Zend_Acl_Role('member'));
     $expected = file_get_contents($this->_files . '/menu_acl_role_interface.html');
     $this->assertEquals($expected, $this->_helper->toString());
     $this->_helper->setAcl($oldAcl);
     $this->_helper->setRole($oldRole);
 }
Ejemplo n.º 2
0
 /**
  * It should be possible to filter out pages based on ACL roles
  *
  */
 public function testShouldBeAbleToUseAclRoles()
 {
     $oldAcl = $this->_helper->getAcl();
     $oldRole = $this->_helper->getRole();
     $acl = $this->_getAcl();
     $this->_helper->setAcl($acl['acl']);
     $this->_helper->setRole($acl['role']);
     $expected = file_get_contents($this->_files . '/menu_acl.html');
     $this->assertEquals($expected, $this->_helper->toString());
     $this->_helper->setAcl($oldAcl);
     $this->_helper->setRole($oldRole);
 }