示例#1
0
 /**
  * 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());
 }
示例#2
0
 /**
  * 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;
 }