Permalink
Browse files

fix spec

  • Loading branch information...
ahilles107 committed Jan 26, 2016
1 parent 14a3d2c commit fee1b11de8ac7f3bee16a5b0d87e56df3e306286
Showing with 6 additions and 1 deletion.
  1. +6 −1 spec/Newscoop/NewscoopBundle/Controller/BackendPublicationsControllerSpec.php
@@ -72,6 +72,7 @@ public function let(
$entityManager->flush(Argument::any())->willReturn(true);
$entityManager->persist(Argument::any())->willReturn(true);
$entityManager->remove(Argument::any())->willReturn(true);
$entityManager->createQuery(Argument::any())->willReturn($query);
$publicationRepository->getPublications()->willReturn($query);
$issueRepository->getIssuesCountForPublication(Argument::type('int'))->willReturn($query);
$sectionRepository->getSectionsCountForPublication(Argument::type('int'))->willReturn($query);
@@ -174,7 +175,8 @@ function it_should_remove_publication(
$form,
$formFactory,
$formView,
$router
$router,
$query
)
{
$user->hasPermission('ManagePub')->willReturn(true);
@@ -195,6 +197,9 @@ function it_should_remove_publication(
$form->createView()->willReturn($formView);
$publication->getId()->willReturn(1);
$query->setParameters(Argument::type('array'))->willReturn($query);
$query->getSingleScalarResult()->willReturn(0);
$query->getResult()->willReturn(true);
$form->handleRequest($request)->willReturn(true);
$form->isValid()->willReturn(true);

0 comments on commit fee1b11

Please sign in to comment.