function NodeQueryAlterTest::setUp
Same name in other branches
- 9 core/modules/node/tests/src/Functional/NodeQueryAlterTest.php \Drupal\Tests\node\Functional\NodeQueryAlterTest::setUp()
- 8.9.x core/modules/node/tests/src/Functional/NodeQueryAlterTest.php \Drupal\Tests\node\Functional\NodeQueryAlterTest::setUp()
- 11.x core/modules/node/tests/src/Functional/NodeQueryAlterTest.php \Drupal\Tests\node\Functional\NodeQueryAlterTest::setUp()
Overrides NodeTestBase::setUp
File
-
core/
modules/ node/ tests/ src/ Functional/ NodeQueryAlterTest.php, line 48
Class
- NodeQueryAlterTest
- Tests that node access queries are properly altered by the node module.
Namespace
Drupal\Tests\node\FunctionalCode
protected function setUp() : void {
parent::setUp();
node_access_rebuild();
// Create some content.
$this->drupalCreateNode();
$this->drupalCreateNode();
$this->drupalCreateNode();
$this->drupalCreateNode();
// Create user with simple node access permission. The 'node test view'
// permission is implemented and granted by the node_access_test module.
$this->accessUser = $this->drupalCreateUser([
'access content overview',
'access content',
'node test view',
]);
$this->noAccessUser = $this->drupalCreateUser([
'access content overview',
'access content',
]);
$this->noAccessUser2 = $this->drupalCreateUser([
'access content overview',
'access content',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.