Skip to content

Commit

Permalink
[#14538] - Corrected version test
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Nov 17, 2019
1 parent 9cd5d68 commit 20b363d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/unit/Version/GetCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,16 @@ public function versionGetIdToGet(UnitTester $I)
$min = intval($id[3] . $id[4]);
$special = $this->numberToSpecial($id[5]);
$specialNo = ($special) ? $id[6] : '';

$expected = "{$major}.{$med}.{$min}";
if (true !== empty($special)) {
$expected .= "-{$special}";
if (true !== empty($specialNo)) {
$expected .= ".{$specialNo}";
}
}

$I->assertEquals(
trim("{$major}.{$med}.{$min}-{$special}.{$specialNo}", "-"),
trim($expected),
Version::get()
);
}
Expand Down

0 comments on commit 20b363d

Please sign in to comment.