Skip to content

Commit

Permalink
Merge pull request #1358 from NatLibFi/fix-version-test-message
Browse files Browse the repository at this point in the history
Add failure message explaining how to fix Composer/git version mismatch
  • Loading branch information
osma authored Sep 7, 2022
2 parents 5e6da4b + a3b4f25 commit 7e8e7b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public function testGetVersion() {
// make sure that the returned version (which comes from composer.json)
// matches the version from git tags
$git_tag = rtrim(shell_exec('git describe --tags --always'));
$this->assertStringStartsWith("v" . $version, $git_tag);
$this->assertStringStartsWith("v" . $version, $git_tag,
"Composer version '$version' doesn't match git tag '$git_tag'.\n" .
"Please run 'composer update' to update the Composer version.");
}

/**
Expand Down

0 comments on commit 7e8e7b4

Please sign in to comment.