public its_lockUnlockArticle_should_unlock_article ( $request, $article, $query, $number, $language ) |
public function its_lockUnlockArticle_should_unlock_article($request, $article, $query, $number, $language)
{
$article->isLocked()->willReturn(true);
$request->getMethod()->willReturn('DELETE');
$article->setLockUser()->willReturn(null);
$article->setLockTime()->willReturn(null);
$query->getOneOrNullResult()->willReturn($article);
$response = $this->lockUnlockArticle($request, $number, $language);
$response->shouldBeAnInstanceOf('Symfony\\Component\\HttpFoundation\\Response');
$response->getStatusCode()->shouldReturn(204);
}