public function testGetters()
 {
     static::assertEquals('SomeType', $this->entity->getSecurityType());
     static::assertEquals('SomeClass', $this->entity->getClassName());
     static::assertEquals('SomeGroup', $this->entity->getGroup());
     static::assertEquals('SomeLabel', $this->entity->getLabel());
 }
 public function testSerialize()
 {
     $data = serialize($this->entity);
     $emptyEntity = unserialize($data);
     $this->assertEquals('SomeType', $emptyEntity->getSecurityType());
     $this->assertEquals('SomeClass', $emptyEntity->getClassName());
     $this->assertEquals('SomeGroup', $emptyEntity->getGroup());
     $this->assertEquals('SomeLabel', $this->entity->getLabel());
 }
 /**
  * {@inheritdoc}
  */
 public function getAllowedPermissions(ObjectIdentity $oid)
 {
     if ($oid->getType() === ObjectIdentityFactory::ROOT_IDENTITY_TYPE) {
         $result = array_keys($this->permissionToMaskBuilderIdentity);
     } else {
         $config = new EntitySecurityMetadata();
         $result = $config->getPermissions();
         if (empty($result)) {
             $result = array_keys($this->map);
         }
     }
     return $result;
 }