spec\Newscoop\ArticlesBundle\Services\EditorialCommentsServiceSpec::it_shouldnt_edit_comment PHP Метод

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

public it_shouldnt_edit_comment ( EditorialComment $comment, User $user, User $newUser )
$comment Newscoop\ArticlesBundle\Entity\EditorialComment
$user Newscoop\Entity\User
$newUser Newscoop\Entity\User
    public function it_shouldnt_edit_comment(EditorialComment $comment, User $user, User $newUser)
    {
        $comment->getUser()->willReturn($user);
        $comment->setComment(Argument::type('string'))->willReturn(true);
        $newUser->getId()->willReturn(5);
        $newUser->isAdmin()->willReturn(false);
        $this->shouldThrow('Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException')->during('edit', array('updated comment', $comment, $newUser));
    }