function NodeAccessTest::testUnsupportedOperation

Same name in other branches
  1. 9 core/modules/node/tests/src/Kernel/NodeAccessTest.php \Drupal\Tests\node\Kernel\NodeAccessTest::testUnsupportedOperation()
  2. 8.9.x core/modules/node/tests/src/Kernel/NodeAccessTest.php \Drupal\Tests\node\Kernel\NodeAccessTest::testUnsupportedOperation()
  3. 10 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 121

Class

NodeAccessTest
Tests basic node_access functionality.

Namespace

Drupal\Tests\node\Kernel

Code

public function testUnsupportedOperation() : void {
    $this->enableModules([
        'node_access_test_empty',
    ]);
    $web_user = $this->drupalCreateUser([
        'access content',
    ]);
    $node = $this->drupalCreateNode();
    $this->assertNodeAccess([
        'random_operation' => FALSE,
    ], $node, $web_user);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.