public its_lockUnlockArticle_should_return_status_code_403_when_setting_the_same_status_while_locking ( $request, $article, $query, $number, $language ) |
public function its_lockUnlockArticle_should_return_status_code_403_when_setting_the_same_status_while_locking($request, $article, $query, $number, $language)
{
$article->isLocked()->willReturn(true);
$request->getMethod()->willReturn('POST');
$query->getOneOrNullResult()->willReturn($article);
$response = $this->lockUnlockArticle($request, $number, $language);
$response->shouldBeAnInstanceOf('Symfony\\Component\\HttpFoundation\\Response');
$response->getStatusCode()->shouldReturn(403);
}