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

Remove dead code in OgAccessHookTest #648

Merged
merged 2 commits into from
Jul 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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());
}

}