$page =
$this->
getSession()->
getPage();
$this->
assertFalse($page->
hasField('title[0][value]'
));
$page->
hasContent('The content is being edited in the Vultures workspace. As a result, your changes cannot be saved.'
);
// Check that the node fails validation for API calls.
$violations =
$test_node->
validate();
$this->
assertCount(1,
$violations);
$this->
assertEquals('The content is being edited in the Vultures workspace. As a result, your changes cannot be saved.',
$violations->
get(0
)->
getMessage());
// Switch to the Live version of the site and check that the user still can
// not edit the node.
$this->
switchToLive();
$this->
drupalGet('/node/' .
$test_node->
id() . '/edit'
);
$page =
$this->
getSession()->
getPage();
$this->
assertFalse($page->
hasField('title[0][value]'
));
$page->
hasContent('The content is being edited in the Vultures workspace. As a result, your changes cannot be saved.'
);
// Check that the node fails validation for API calls.
$violations =
$test_node->
validate();
$this->
assertCount(1,
$violations);
$this->
assertEquals('The content is being edited in the Vultures workspace. As a result, your changes cannot be saved.',
$violations->
get(0
)->
getMessage());
// Publish the changes from the 'Vultures' workspace and check that the node