예제 #1
0
 /**
  * @param \DevBoard\Github\Branch\Entity\GithubBranch  $masterBranch
  * @param \DevBoard\Github\Branch\Entity\GithubBranch  $devBranch
  * @param \Doctrine\Common\Collections\ArrayCollection $collection
  */
 public function it_can_return_branch_if_exists_on_repo($masterBranch, $devBranch, $collection)
 {
     $masterBranch->getName()->willReturn('master')->shouldBeCalled();
     $devBranch->getName()->willReturn('dev')->shouldBeCalled();
     $collection->getIterator()->willReturn(new \ArrayIterator([$masterBranch->getWrappedObject(), $devBranch->getWrappedObject()]));
     $this->setBranches($collection);
     $this->getBranchByName('dev')->shouldReturn($devBranch);
 }