spec\Newscoop\GimmeBundle\Controller\UserTopicsControllerSpec::its_unlinkFromUserAction_should_do_nothing_when_links_array_is_wrong PHP Метод

    public function its_unlinkFromUserAction_should_do_nothing_when_links_array_is_wrong($request, $repository, $user)
    {
        $topic = new Topic();
        $topic->setId(10);
        $topic->setTitle('test');
        $topic->setParent(null);
        $userId = 1;
        $parameterBag = new ParameterBag();
        $parameterBag->set('links', array('object' => $topic));
        $request->attributes = $parameterBag;
        $repository->findOneBy(array('id' => $userId))->shouldBeCalled()->willReturn($user);
        $this->unlinkFromUserAction($request, $userId)->shouldReturn(null);
    }