// Check that the 'test_1' workspace doesn't contain any changes initially.
$this->
drupalGet($test_1->
toUrl()->
toString());
$assert_session->
pageTextContains('This workspace has no changes.'
);
// Check that the 'Switch to this workspace' action link is not displayed on
// the manage page of the currently active workspace.
$assert_session->
linkNotExists('Switch to this workspace'
);
$this->
drupalGet($test_2->
toUrl()->
toString());
$assert_session->
linkExists('Switch to this workspace'
);
// Create some test content.
$this->
createNodeThroughUi('Node 1', 'test'
);
$this->
createNodeThroughUi('Node 2', 'test'
);
$edit =
[ 'name[0][value]' => 'Term 1',
];
$this->
drupalGet('admin/structure/taxonomy/manage/' .
$vocabulary->
id() . '/add'
);
$this->
submitForm($edit, 'Save'
);
$this->
drupalGet($test_1->
toUrl()->
toString());
$assert_session->
pageTextContains('2 content items, 1 taxonomy term'
);
$assert_session->
linkExists('Node 1'
);
$assert_session->
linkExists('Node 2'
);