Skip to content

Commit

Permalink
fix update-check unit-tests now that the current testing version is a…
Browse files Browse the repository at this point in the history
…t 2.1.0-dev1

Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Jun 8, 2023
1 parent ed72fd1 commit e0fa64f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/Froxlor/FroxlorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ public function testFroxlorcheckUpdate()

$json_result = Froxlor::getLocal($admin_userdata)->checkUpdate();
$result = json_decode($json_result, true)['data'];
$this->assertEquals(0, $result['isnewerversion']);
if (defined('DEV_FROXLOR') && DEV_FROXLOR == 1) {
$this->assertEquals("You already have the latest testing-version of Froxlor installed.", $result['additional_info']);
} else {
$this->assertEquals("You already have the latest version of Froxlor installed.", $result['additional_info']);
$this->assertContains($result['isnewerversion'] ?? -1, [0,1]);
$this->assertNotEmpty($result['version']);
if ($result['isnewerversion'] == 0) {
if (defined('DEV_FROXLOR') && DEV_FROXLOR == 1) {
$this->assertEquals("You already have the latest testing-version of Froxlor installed.", $result['additional_info']);
} else {
$this->assertEquals("You already have the latest version of Froxlor installed.", $result['additional_info']);
}
}
}
}

0 comments on commit e0fa64f

Please sign in to comment.