function ContentModerationStateAccessControlHandlerTest::testHandler
Same name in other branches
- 9 core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationStateAccessControlHandlerTest::testHandler()
- 8.9.x core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationStateAccessControlHandlerTest::testHandler()
- 11.x core/modules/content_moderation/tests/src/Kernel/ContentModerationStateAccessControlHandlerTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationStateAccessControlHandlerTest::testHandler()
@covers ::checkAccess @covers ::checkCreateAccess
File
-
core/
modules/ content_moderation/ tests/ src/ Kernel/ ContentModerationStateAccessControlHandlerTest.php, line 46
Class
- ContentModerationStateAccessControlHandlerTest
- @coversDefaultClass \Drupal\content_moderation\ContentModerationStateAccessControlHandler @group content_moderation
Namespace
Drupal\Tests\content_moderation\KernelCode
public function testHandler() : void {
$entity = ContentModerationState::create([]);
$this->assertFalse($this->accessControlHandler
->access($entity, 'view'));
$this->assertFalse($this->accessControlHandler
->access($entity, 'update'));
$this->assertFalse($this->accessControlHandler
->access($entity, 'delete'));
$this->assertFalse($this->accessControlHandler
->createAccess());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.