/** * testCreate */ public function testCreate() { $this->getRepository()->init(); $this->addFile('test'); $this->repository->commit('test', true); $this->assertCount(0, $this->repository->getTags()); Tag::create($this->repository, 'test-tag'); $this->assertCount(1, $this->repository->getTags()); Tag::create($this->repository, 'test-tag2', 'test-tag'); $this->assertCount(2, $this->repository->getTags()); }
/** * Create a new tag * This function change the state of the repository on the filesystem * * @param string $name The new tag name * @param null $startPoint The reference to create the tag from * @param null $message the tag message * * @throws \RuntimeException * @throws \Symfony\Component\Process\Exception\RuntimeException * @return Repository */ public function createTag($name, $startPoint = null, $message = null) { Tag::create($this, $name, $startPoint, $message); return $this; }