public function OgAccessHookTest::testNotContentEntity in Organic groups 8
Tests that an entity which is not a group or group content is ignored.
@dataProvider permissionsProvider
File
- tests/
src/ Unit/ OgAccessHookTest.php, line 31
Class
- OgAccessHookTest
- Tests hook implementation of OG related access.
Namespace
Drupal\Tests\og\UnitCode
public function testNotContentEntity($operation) {
$entity = $this
->prophesize(EntityInterface::class);
$access = og_entity_access($entity
->reveal(), $operation, $this->user
->reveal());
// An entity which is not a group or group content should always return
// neutral, since we have no opinion over it.
$this
->assertTrue($access
->isNeutral());
}