function NodeAdminTest::setUp
Same name in other branches
- 9 core/modules/node/tests/src/Functional/NodeAdminTest.php \Drupal\Tests\node\Functional\NodeAdminTest::setUp()
- 8.9.x core/modules/node/tests/src/Functional/NodeAdminTest.php \Drupal\Tests\node\Functional\NodeAdminTest::setUp()
- 10 core/modules/node/tests/src/Functional/NodeAdminTest.php \Drupal\Tests\node\Functional\NodeAdminTest::setUp()
Overrides NodeTestBase::setUp
File
-
core/
modules/ node/ tests/ src/ Functional/ NodeAdminTest.php, line 59
Class
- NodeAdminTest
- Tests node administration page functionality.
Namespace
Drupal\Tests\node\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Remove the "view own unpublished content" permission which is set
// by default for authenticated users so we can test this permission
// correctly.
user_role_revoke_permissions(RoleInterface::AUTHENTICATED_ID, [
'view own unpublished content',
]);
$this->adminUser = $this->drupalCreateUser([
'access administration pages',
'access content overview',
'administer nodes',
'bypass node access',
]);
$this->baseUser1 = $this->drupalCreateUser([
'access content overview',
]);
$this->baseUser2 = $this->drupalCreateUser([
'access content overview',
'view own unpublished content',
]);
$this->baseUser3 = $this->drupalCreateUser([
'access content overview',
'bypass node access',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.