public function iShouldNotBeGrantedToSetAnyOfTheNodesAttributes($not = '')
{
if ($this->isolated === true) {
$this->callStepInSubProcess(__METHOD__, sprintf(' %s %s', 'string', escapeshellarg(trim($not))));
} else {
try {
$this->currentNodes[0]->setName('some-new-name');
if ($not === 'not') {
Assert::fail('Name should not be settable on the current node!');
}
} catch (AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
try {
$this->currentNodes[0]->removeProperty('title');
if ($not === 'not') {
Assert::fail('Title should not be removable on the current node!');
}
} catch (AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
try {
$this->currentNodes[0]->setContentObject($this->currentNodes[0]->getNodeData());
if ($not === 'not') {
Assert::fail('Content object should not be settable on the current node!');
}
} catch (AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
try {
$this->currentNodes[0]->unsetContentObject();
if ($not === 'not') {
Assert::fail('Content object should not be unsettable on the current node!');
}
} catch (AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
try {
$nodeTypeManager = $this->getObjectManager()->get(\Neos\ContentRepository\Domain\Service\NodeTypeManager::class);
$this->currentNodes[0]->setNodeType($nodeTypeManager->getNodeType('Neos.Neos:Node'));
if ($not === 'not') {
Assert::fail('NodeType should not be settable on the current node!');
}
} catch (AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
try {
$this->currentNodes[0]->setHidden(true);
if ($not === 'not') {
Assert::fail('Hidden flag should not be settable on the current node!');
}
} catch (AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
try {
$this->currentNodes[0]->setHiddenBeforeDateTime(new \DateTime());
if ($not === 'not') {
Assert::fail('Hidden before should not be settable on the current node!');
}
} catch (AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
try {
$this->currentNodes[0]->setHiddenAfterDateTime(new \DateTime());
if ($not === 'not') {
Assert::fail('Hidden after should not be settable on the current node!');
}
} catch (AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
try {
$this->currentNodes[0]->setHiddenInIndex(true);
if ($not === 'not') {
Assert::fail('Hidden in index should not be settable on the current node!');
}
} catch (AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
try {
$this->currentNodes[0]->setAccessRoles(array());
if ($not === 'not') {
Assert::fail('Access roles in index should not be settable on the current node!');
}
} catch (AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
}
}