Exemple #1
0
 /**
  * This function constructs the Acl list and checks whether all Rights are
  * registered and returned correctly
  */
 public function testRegisterRights()
 {
     $acl = Phprojekt_Acl::getInstance();
     $this->assertTrue($acl->has(2));
     $this->assertFalse($acl->has(4));
     $this->assertTrue($acl->has(1));
     $this->assertTrue($acl->has(3));
     $this->assertTrue($acl->isAllowed('1', 1, 'write'));
     $this->assertTrue($acl->isAllowed('1', 2, 'write'));
     $this->assertTrue($acl->isAllowed('1', 3, 'write'));
 }
 /**
  * Setter for acl
  *
  * @return void
  */
 private function _setAcl()
 {
     $this->_acl = Phprojekt_Acl::getInstance();
 }
 /**
  *  testGetAcl().
  */
 public function testGetAcl()
 {
     $this->assertSame(Phprojekt_Acl::getInstance(), $this->_object->getAcl());
 }