Merge remote-tracking branch 'origin/main' into 2.1.x

This commit is contained in:
Michael Kaufmann
2023-06-08 12:34:29 +02:00

View File

@@ -19,11 +19,14 @@ class FroxlorTest extends TestCase
$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']);
}
}
}
}