Neos\ContentRepository\Tests\Behavior\Features\Bootstrap\NodeAuthorizationTrait::iShouldGetTrueWhenAskingTheNodeAuthorizationServiceIfEditingThisNodeIsGranted PHP Метод

iShouldGetTrueWhenAskingTheNodeAuthorizationServiceIfEditingThisNodeIsGranted() публичный Метод

    public function iShouldGetTrueWhenAskingTheNodeAuthorizationServiceIfEditingThisNodeIsGranted($expectedResult)
    {
        if ($this->isolated === true) {
            $this->callStepInSubProcess(__METHOD__, sprintf(' %s %s', 'string', escapeshellarg(trim($expectedResult))));
        } else {
            if ($expectedResult === 'TRUE') {
                if ($this->nodeAuthorizationService->isGrantedToEditNode($this->currentNodes[0]) !== true) {
                    Assert::fail('The node authorization service did not return TRUE!');
                }
            } else {
                if ($this->nodeAuthorizationService->isGrantedToEditNode($this->currentNodes[0]) !== false) {
                    Assert::fail('The node authorization service did not return FALSE!');
                }
            }
        }
    }