コード例 #1
0
ファイル: GithubTagFactory.php プロジェクト: brankol/devboard
 /**
  * @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;
 }
コード例 #2
0
 /**
  * @param GithubTagDataInterface $remote
  * @param GithubTag              $entity
  *
  * @return bool
  */
 public function map(GithubTagDataInterface $remote, GithubTag $entity)
 {
     $entity->setName($remote->getName());
     return true;
 }
コード例 #3
0
 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);
 }
コード例 #4
0
ファイル: FixtureContext.php プロジェクト: brankol/devboard
 /**
  * @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);
 }
コード例 #5
0
ファイル: DataTrait.php プロジェクト: brankol/devboard
 /**
  * @param $name
  *
  * @return GithubTag
  */
 private function createTagObjectFromTagName($name)
 {
     $tag = new GithubTag();
     $tag->setName($name);
     return $tag;
 }