From: Bernhard Posselt Date: Mon, 25 Feb 2013 11:47:34 +0000 (+0100) Subject: more tests to fail the version check X-Git-Tag: v5.0.0beta2~14^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8068051ca42395db7386db3f8993276ad1b1007b;p=nextcloud-server.git more tests to fail the version check --- diff --git a/tests/lib/app.php b/tests/lib/app.php index 2bcc34d3321..9cab36903a2 100644 --- a/tests/lib/app.php +++ b/tests/lib/app.php @@ -25,7 +25,7 @@ class Test_App extends PHPUnit_Framework_TestCase { } - public function testIsAppVersionCompatibleMultipleAppNumber(){ + public function testIsAppVersionCompatibleSingleNumber(){ $oc = array(4); $app = '4'; @@ -48,5 +48,19 @@ class Test_App extends PHPUnit_Framework_TestCase { $this->assertFalse(OC_App::isAppVersionCompatible($oc, $app)); } + public function testIsAppVersionCompatibleShouldFailTwoVersionNumbers(){ + $oc = array(4, 3, 1); + $app = '4.4'; + + $this->assertFalse(OC_App::isAppVersionCompatible($oc, $app)); + } + + + public function testIsAppVersionCompatibleShouldFailOneVersionNumbers(){ + $oc = array(4, 3, 1); + $app = '5'; + + $this->assertFalse(OC_App::isAppVersionCompatible($oc, $app)); + } } \ No newline at end of file