Example #1
0
 /**
  * @Given there is :branchName branch on :githubRepoFullName github repo
  *
  * @param $branchName
  * @param $githubRepoFullName
  *
  * @throws \Exception
  */
 public function thereIsBranchOnGithubRepo($branchName, $githubRepoFullName)
 {
     $branch = new GithubBranch();
     $branch->setName($branchName)->setRepo($this->getGithubRepoByFullName($githubRepoFullName));
     $this->save($branch);
 }
Example #2
0
 /**
  * @param $name
  *
  * @return GithubBranch
  */
 private function createBranchObjectFromBranchName($name)
 {
     $branch = new GithubBranch();
     $branch->setName($name);
     return $branch;
 }
 public function it_will_map_property_values_from_remote_to_entity(GithubBranchDataInterface $remote, GithubBranch $entity)
 {
     $remote->getName()->willReturn('name');
     $entity->setName('name')->shouldBeCalled();
     $this->map($remote, $entity)->shouldReturn(true);
 }
 /**
  * @param GithubBranchDataInterface $remote
  * @param GithubBranch              $entity
  *
  * @return bool
  */
 public function map(GithubBranchDataInterface $remote, GithubBranch $entity)
 {
     $entity->setName($remote->getName());
     return true;
 }