Skip to content

Commit d888afd

Browse files
committed
Fix PHPUnit tests
- testFetchTagsCached expected HEAD tag at end of array instead of begin. - testFetchTagsUncached expected HEAD tag at end of array instead of begin. - testSetLabelsRaisesError expected Fatal error instead of Recoverable fatal error.
1 parent 508d26b commit d888afd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/GitChangeLogTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function testFetchTagsCached()
6969
$changelog = new GitChangeLog();
7070

7171
$tags = $changelog->fetchTags();
72-
$this->assertEquals('HEAD', end($tags));
72+
$this->assertEquals('HEAD', reset($tags));
7373
}
7474

7575
public function testFetchTagsUncached()
@@ -78,7 +78,7 @@ public function testFetchTagsUncached()
7878
$changelog->setFromTag('HEAD');
7979

8080
$tags = $changelog->fetchTags(true);
81-
$this->assertEquals('HEAD', end($tags));
81+
$this->assertEquals('HEAD', reset($tags));
8282
}
8383

8484
public function testFetchTagsThrowsExceptionOnInvalidFromTag()
@@ -187,7 +187,7 @@ public function testSetLabelsRaisesError()
187187
{
188188
$changeLog = new GitChangeLog();
189189

190-
$this->expectError();
190+
$this->expectException('Error');
191191
$changeLog->setLabels(new stdClass());
192192
}
193193

0 commit comments

Comments
 (0)