Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #648 from Gizra/remove-dead-code
Browse files Browse the repository at this point in the history
Remove dead code in OgAccessHookTest
  • Loading branch information
pfrenssen authored Jul 3, 2020
2 parents 0568f68 + ee6f892 commit 3975609
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions tests/src/Unit/OgAccessHookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,7 @@ public function testNotContentEntity($operation) {
public function testGetEntityGroups($operation) {
$this->user->hasPermission(OgAccess::ADMINISTER_GROUP_PERMISSION)->willReturn(TRUE);
$user_entity_access = og_entity_access($this->groupContentEntity->reveal(), $operation, $this->user->reveal());

// @todo This is strange, 'view' is not part of the operations supplied by
// ::permissionsProvider(). And why would a group administrator be allowed
// access to all operations, except 'view'? Shouldn't this also return
// 'allowed'?
if ($operation == 'view') {
$this->assertTrue($user_entity_access->isNeutral());
}
else {
$this->assertTrue($user_entity_access->isAllowed());
}
$this->assertTrue($user_entity_access->isAllowed());
}

}

0 comments on commit 3975609

Please sign in to comment.