public function iShouldNotBeGrantedToGetTheProperty($not, $propertyName)
{
if ($this->isolated === true) {
$this->callStepInSubProcess(__METHOD__, sprintf(' %s %s %s %s', 'string', escapeshellarg(trim($not)), 'string', escapeshellarg($propertyName)));
} else {
/** @var NodeInterface $currentNode */
$currentNode = $this->currentNodes[0];
try {
switch ($propertyName) {
case 'name':
$propertyValue = $currentNode->getName();
break;
case 'hidden':
$propertyValue = $currentNode->isHidden();
break;
case 'hiddenBeforeDateTime':
$propertyValue = $currentNode->getHiddenBeforeDateTime();
break;
case 'hiddenAfterDateTime':
$propertyValue = $currentNode->getHiddenAfterDateTime();
break;
case 'hiddenInIndex':
$propertyValue = $currentNode->isHiddenInIndex();
break;
case 'accessRoles':
$propertyValue = $currentNode->getAccessRoles();
break;
default:
$propertyValue = $currentNode->getProperty($propertyName);
break;
}
if ($not === 'not') {
Assert::fail('Property should not be gettable on the current node! But we could read the value: "' . $propertyValue . '"');
}
} catch (\Neos\Flow\Security\Exception\AccessDeniedException $exception) {
if ($not !== 'not') {
throw $exception;
}
}
}
}