added unit-tests for version-check; implemented settings import/export in API; minor variable declarations

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-11-25 11:17:56 +01:00
parent f6e0298d25
commit c269cd5c5c
9 changed files with 146 additions and 107 deletions

View File

@@ -0,0 +1,20 @@
<?php
use PHPUnit\Framework\TestCase;
/**
*
* @covers Froxlor
*/
class FroxlorTest extends TestCase
{
public function testFroxlorcheckUpdate()
{
global $admin_userdata;
$json_result = Froxlor::getLocal($admin_userdata)->checkUpdate();
$result = json_decode($json_result, true)['data'];
$this->assertEquals(0, $result['isnewerversion']);
$this->assertEquals("You already have the latest version of Froxlor installed.", $result['additional_info']);
}
}