public function WorkspaceArchiveTest::testWorkspaceArchive in Deploy - Content Staging 8
Tests Workspace archive as part of deploy.
File
- tests/
src/ Functional/ WorkspaceArchiveTest.php, line 67
Class
- WorkspaceArchiveTest
- Tests workspace archive functionality.
Namespace
Drupal\Tests\deploy\FunctionalCode
public function testWorkspaceArchive() {
$live = $this
->getOneEntityByLabel('workspace', 'Live');
$stage = $this
->getOneEntityByLabel('workspace', 'Stage');
$live
->set('upstream', $stage
->id());
$live
->save();
$this
->switchToWorkspace($stage);
$node = Node::create([
'type' => 'test',
'title' => 'Node title',
]);
$node
->save();
$this
->deployThroughUi($stage, $live, [
'archive' => TRUE,
]);
// Make sure archived workspace is not listed.
$this
->drupalGet('admin/structure/workspace');
$this
->assertSession()
->pageTextNotContains('Stage');
}