public setComment ( text $comment ) : self | ||
$comment | text | the comment |
return | self |
public function setComment($comment)
{
$this->comment = $comment;
return $this;
}
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)); }