From 8068051ca42395db7386db3f8993276ad1b1007b Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 25 Feb 2013 12:47:34 +0100 Subject: [PATCH] more tests to fail the version check --- tests/lib/app.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/lib/app.php b/tests/lib/app.php index 2bcc34d332..9cab36903a 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