public function GroupCheckTest::testNoGroup in Organic groups 8
Tests a non-existing group.
@covers ::access
File
- tests/
src/ Unit/ GroupCheckTest.php, line 163
Class
- GroupCheckTest
- Tests the group check access.
Namespace
Drupal\Tests\og\UnitCode
public function testNoGroup() {
$this->entityTypeManager
->getDefinition($this->entityTypeId, FALSE)
->willReturn($this->entityType);
$this->entityTypeManager
->getStorage($this->entityTypeId)
->willReturn($this->entityStorage);
$this->entityStorage
->load($this->entityId)
->willReturn(NULL);
$this
->getAccessResult();
$result = $this
->getAccessResult();
$this
->assertTrue($result
->isForbidden());
}