public function NodeAccessTest::testUnsupportedOperation in Drupal 9
Same name and namespace in other branches
- 8 core/modules/node/tests/src/Kernel/NodeAccessTest.php \Drupal\Tests\node\Kernel\NodeAccessTest::testUnsupportedOperation()
Tests operations not supported by node grants.
File
- core/
modules/ node/ tests/ src/ Kernel/ NodeAccessTest.php, line 119
Class
- NodeAccessTest
- Tests basic node_access functionality.
Namespace
Drupal\Tests\node\KernelCode
public function testUnsupportedOperation() {
$this
->enableModules([
'node_access_test_empty',
]);
$web_user = $this
->drupalCreateUser([
'access content',
]);
$node = $this
->drupalCreateNode();
$this
->assertNodeAccess([
'random_operation' => FALSE,
], $node, $web_user);
}