summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-02-27 02:16:23 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-27 02:16:23 -0800
commit1c6857d92c835d499e37bebd24aaf325373dc7f1 (patch)
treeda9ec165aa9f6fc9241f9505d487723f23b3d146 /tests
parent06141ed95a87e40dded4db6bedc4b643cdfdda0e (diff)
parent876e8bcb551f1770f539af1e2e07efd2571928b7 (diff)
downloadnextcloud-server-1c6857d92c835d499e37bebd24aaf325373dc7f1.tar.gz
nextcloud-server-1c6857d92c835d499e37bebd24aaf325373dc7f1.zip
Merge pull request #14529 from owncloud/intuitive-version-check
Make version check work on the lowest common version denominator
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/app/dependencyanalyzer.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/lib/app/dependencyanalyzer.php b/tests/lib/app/dependencyanalyzer.php
index a79995b78b3..d73bac5a2a7 100644
--- a/tests/lib/app/dependencyanalyzer.php
+++ b/tests/lib/app/dependencyanalyzer.php
@@ -52,7 +52,7 @@ class DependencyAnalyzer extends \PHPUnit_Framework_TestCase {
}));
$this->platformMock->expects($this->any())
->method('getOcVersion')
- ->will( $this->returnValue('8.0.1'));
+ ->will( $this->returnValue('8.0.2'));
$this->l10nMock = $this->getMockBuilder('\OCP\IL10N')
->disableOriginalConstructor()
@@ -183,8 +183,12 @@ class DependencyAnalyzer extends \PHPUnit_Framework_TestCase {
return array(
// no version -> no missing dependency
array(array(), null),
+ array(array(), array('@attributes' => array('min-version' => '8', 'max-version' => '8'))),
+ array(array(), array('@attributes' => array('min-version' => '8.0', 'max-version' => '8.0'))),
+ array(array(), array('@attributes' => array('min-version' => '8.0.2', 'max-version' => '8.0.2'))),
+ array(array('ownCloud 8.0.3 or higher is required.'), array('@attributes' => array('min-version' => '8.0.3'))),
array(array('ownCloud 9 or higher is required.'), array('@attributes' => array('min-version' => '9'))),
- array(array('ownCloud with a version lower than 5.1.2 is required.'), array('@attributes' => array('max-version' => '5.1.2'))),
+ array(array('ownCloud with a version lower than 8.0.1 is required.'), array('@attributes' => array('max-version' => '8.0.1'))),
);
}
@@ -208,7 +212,17 @@ class DependencyAnalyzer extends \PHPUnit_Framework_TestCase {
array(array('@attributes' => array('min-version' => '100.0'), '@value' => 'curl'))),
// curl in version 100.0 does not exist
array(array('Library curl with a version lower than 1.0.0 is required - available version 2.3.4.'),
- array(array('@attributes' => array('max-version' => '1.0.0'), '@value' => 'curl')))
+ array(array('@attributes' => array('max-version' => '1.0.0'), '@value' => 'curl'))),
+ array(array('Library curl with a version lower than 2.3.3 is required - available version 2.3.4.'),
+ array(array('@attributes' => array('max-version' => '2.3.3'), '@value' => 'curl'))),
+ array(array('Library curl with a version higher than 2.3.5 is required - available version 2.3.4.'),
+ array(array('@attributes' => array('min-version' => '2.3.5'), '@value' => 'curl'))),
+ array(array(),
+ array(array('@attributes' => array('min-version' => '2.3.4', 'max-version' => '2.3.4'), '@value' => 'curl'))),
+ array(array(),
+ array(array('@attributes' => array('min-version' => '2.3', 'max-version' => '2.3'), '@value' => 'curl'))),
+ array(array(),
+ array(array('@attributes' => array('min-version' => '2', 'max-version' => '2'), '@value' => 'curl'))),
);
}
@@ -244,6 +258,7 @@ class DependencyAnalyzer extends \PHPUnit_Framework_TestCase {
array(array(), '5.4', '5.5'),
array(array('PHP 5.4.4 or higher is required.'), '5.4.4', null),
array(array('PHP with a version lower than 5.4.2 is required.'), null, '5.4.2'),
+ array(array(), '5.4', '5.4'),
);
}
}