public function ScheduledTransitionsEntityHooksUnitTest::testEntityAccessUnhandled in Scheduled Transitions 8
Same name and namespace in other branches
- 2.x tests/src/Unit/ScheduledTransitionsEntityHooksUnitTest.php \Drupal\Tests\scheduled_transitions\Unit\ScheduledTransitionsEntityHooksUnitTest::testEntityAccessUnhandled()
Tests operation not handled by hook.
@covers ::entityAccess
File
- tests/
src/ Unit/ ScheduledTransitionsEntityHooksUnitTest.php, line 75
Class
- ScheduledTransitionsEntityHooksUnitTest
- Tests entity hooks.
Namespace
Drupal\Tests\scheduled_transitions\UnitCode
public function testEntityAccessUnhandled() : void {
$entityHooks = new ScheduledTransitionsEntityHooks($this->testConfigFactory, $this->testEntityTypeManager, $this->testModerationInformation);
$entity = $this
->createMock(EntityInterface::class);
$operation = $this
->randomMachineName();
$account = $this
->createMock(AccountInterface::class);
$access = $entityHooks
->entityAccess($entity, $operation, $account);
$this
->assertInstanceOf(AccessResultNeutral::class, $access);
}