protected function WorkspaceArchiveTest::setUp in Deploy - Content Staging 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ WorkspaceArchiveTest.php, line 36
Class
- WorkspaceArchiveTest
- Tests workspace archive functionality.
Namespace
Drupal\Tests\deploy\FunctionalCode
protected function setUp() {
parent::setUp();
$this
->drupalPlaceBlock('system_menu_block:account');
$this
->drupalPlaceBlock('system_messages_block');
$this
->setupWorkspaceSwitcherBlock();
$node_type = NodeType::create([
'type' => 'test',
'label' => 'Test',
]);
$node_type
->save();
node_add_body_field($node_type);
$permissions = [
'create_workspace',
'edit_own_workspace',
'view_own_workspace',
'bypass_entity_access_own_workspace',
'create test content',
'access administration pages',
'access content overview',
'administer content types',
'administer workspaces',
'administer deployments',
'Deploy to Live',
'Deploy to Stage',
];
$test_user = $this
->drupalCreateUser($permissions);
$this
->drupalLogin($test_user);
}