setParent() public method

Sets the value of parent.
public setParent ( mixed $parent = null ) : self
$parent mixed the parent
return self
 public function its_unlinkFromUserAction_should_unlink_topic_from_user($request, $repository, $user)
 {
     $topic = new Topic();
     $topic->setId(10);
     $topic->setTitle('test');
     $topic->setParent(null);
     $userId = 1;
     $parameterBag = new ParameterBag();
     $parameterBag->set('links', array(array('object' => $topic)));
     $request->attributes = $parameterBag;
     $repository->findOneBy(array('id' => $userId))->shouldBeCalled()->willReturn($user);
     $this->unlinkFromUserAction($request, $userId)->shouldReturn(null);
 }