Skip to content

Commit e270521

Browse files
author
alexandresalome
committed
verify Commit::getTree - #59
1 parent 4a26a0a commit e270521

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/Gitonomy/Git/Tests/CommitTest.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,24 @@ public function testGetParents_WithOneParent($repository)
9898
/**
9999
* @dataProvider provideFoobar
100100
*/
101-
public function testGetTree($repository)
101+
public function testGetTreeHash($repository)
102102
{
103103
$commit = $repository->getCommit(self::LONGFILE_COMMIT);
104104

105105
$this->assertEquals('b06890c7b10904979d2f69613c2ccda30aafe262', $commit->getTreeHash(), "Tree hash is correct");
106106
}
107107

108+
/**
109+
* @dataProvider provideFoobar
110+
*/
111+
public function testGetTree($repository)
112+
{
113+
$commit = $repository->getCommit(self::LONGFILE_COMMIT);
114+
115+
$this->assertInstanceOf('Gitonomy\Git\Tree', $commit->getTree(), "Tree is a tree");
116+
$this->assertEquals('b06890c7b10904979d2f69613c2ccda30aafe262', $commit->getTree()->getHash(), "Tree hash is correct");
117+
}
118+
108119
/**
109120
* @dataProvider provideFoobar
110121
*/

0 commit comments

Comments
 (0)