Exemple #1
0
 /**
  * Tests if getAssigned returns the correct value.
  *
  */
 public function testGetAssignedReturnsSpecificationArray()
 {
     $target = new Permissions();
     $target->grantAll('testUser');
     $user = new User();
     $user->setId('testUser2');
     $target->grantView($user);
     $expected = array('user:testUser' => array(PermissionsInterface::PERMISSION_ALL => array('testUser')), 'user:testUser2' => array(PermissionsInterface::PERMISSION_VIEW => array('testUser2')));
     $this->assertEquals($expected, $target->getAssigned());
 }