protected function NodeAdminTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 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 55
Class
- NodeAdminTest
- Tests node administration page functionality.
Namespace
Drupal\Tests\node\FunctionalCode
protected function setUp() {
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',
]);
}