Esempio n. 1
0
 /**
  * @param GithubRepo $githubRepo
  * @param Tag        $tagValueObject
  *
  * @return GithubTag
  */
 public function createFromValueObject(GithubRepo $githubRepo, Tag $tagValueObject)
 {
     $githubTag = new GithubTag();
     $githubTag->setRepo($githubRepo);
     $this->mapper->map($tagValueObject, $githubTag);
     return $githubTag;
 }
Esempio n. 2
0
 /**
  * @param GithubTagDataInterface $remote
  * @param GithubTag              $entity
  *
  * @return bool
  */
 public function map(GithubTagDataInterface $remote, GithubTag $entity)
 {
     $entity->setName($remote->getName());
     return true;
 }
 public function it_will_map_property_values_from_remote_to_entity(GithubTagDataInterface $remote, GithubTag $entity)
 {
     $remote->getName()->willReturn('name');
     $entity->setName('name')->shouldBeCalled();
     $this->map($remote, $entity)->shouldReturn(true);
 }
Esempio n. 4
0
 /**
  * @Given there is :tagName tag on :githubRepoFullName github repo
  *
  * @param $tagName
  * @param $githubRepoFullName
  *
  * @throws \Exception
  */
 public function thereIsTagOnGithubRepo($tagName, $githubRepoFullName)
 {
     $tag = new GithubTag();
     $tag->setName($tagName)->setRepo($this->getGithubRepoByFullName($githubRepoFullName));
     $this->save($tag);
 }
Esempio n. 5
0
 /**
  * @param $name
  *
  * @return GithubTag
  */
 private function createTagObjectFromTagName($name)
 {
     $tag = new GithubTag();
     $tag->setName($name);
     return $tag;
 }