Skip to content

Commit

Permalink
[git-tag] Adds more tests for git tag <tag> <commit>
Browse files Browse the repository at this point in the history
  • Loading branch information
kzykhys committed Feb 1, 2014
1 parent 5a06867 commit 4b248eb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/PHPGit/Command/TagCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,19 @@ public function testTagVerify()
$git->tag->verify('v1.0.0');
}

public function testCreateTagFromCommit()
{
$filesystem = new Filesystem();

$git = new Git();
$git->init($this->directory);
$git->setRepository($this->directory);
$filesystem->dumpFile($this->directory . '/README.md', 'hello');
$git->add('.');
$git->commit('Initial commit');
$log = $git->log(null, array('limit' => 1));
$git->tag->create('v1.0.0', $log[0]['hash']);
$this->assertCount(1, $git->tag());
}

}

0 comments on commit 4b248eb

Please sign in to comment.