/** * testTagFromStartPoint */ public function testTagFromStartPoint() { $this->getRepository()->init(); $this->addFile('foo'); $this->repository->commit('commit1', true); Tag::create($this->repository, 'tag1', $this->repository->getCommit()); $tag = new Tag($this->repository, 'tag1'); $this->assertInstanceOf('GitElephant\\Objects\\Tag', $tag); $this->assertEquals($tag->getSha(), $this->repository->getCommit()->getSha()); $branch = Branch::create($this->repository, 'test-branch'); Tag::create($this->repository, 'tag2', $branch); $tag = new Tag($this->repository, 'tag2'); $this->assertEquals($tag->getSha(), $branch->getSha()); }