/** * @Given /^I should get (TRUE|FALSE) when asking the node authorization service if setting the "([^"]*)" property is granted$/ */ public function iShouldGetFalseWhenAskingTheNodeAuthorizationServiceIfSettingThePropertyIsGranted($expectedResult, $propertyName) { if ($this->isolated === true) { $this->callStepInSubProcess(__METHOD__, sprintf(' %s %s %s %s', 'string', escapeshellarg(trim($expectedResult)), 'string', escapeshellarg($propertyName))); } else { if ($expectedResult === 'TRUE') { if ($this->nodeAuthorizationService->isGrantedToEditNodeProperty($this->currentNodes[0], $propertyName) !== true) { Assert::fail('The node authorization service did not return TRUE!'); } } else { if ($this->nodeAuthorizationService->isGrantedToEditNodeProperty($this->currentNodes[0], $propertyName) !== false) { Assert::fail('The node authorization service did not return FALSE!'); } } } }