aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-04-27 21:24:33 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2016-04-28 22:55:15 +0200
commit4c1b55be92c418b168729d71b0e837b504014a49 (patch)
tree0a57a778e64438aeb2d318ba1deec25493aa0878 /tests
parent238dbe9252e50ce38449045a8c2e8115a082bd1a (diff)
downloadnextcloud-server-4c1b55be92c418b168729d71b0e837b504014a49.tar.gz
nextcloud-server-4c1b55be92c418b168729d71b0e837b504014a49.zip
allow app developers to specify the minimum int size
simplify comparison remove additional null fix off by 1 error
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/app/dependencyanalyzer.php24
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/lib/app/dependencyanalyzer.php b/tests/lib/app/dependencyanalyzer.php
index fecba518856..eee0bc29083 100644
--- a/tests/lib/app/dependencyanalyzer.php
+++ b/tests/lib/app/dependencyanalyzer.php
@@ -33,6 +33,9 @@ class DependencyAnalyzer extends TestCase {
->method('getPhpVersion')
->will( $this->returnValue('5.4.3'));
$this->platformMock->expects($this->any())
+ ->method('getIntSize')
+ ->will( $this->returnValue('4'));
+ $this->platformMock->expects($this->any())
->method('getDatabase')
->will( $this->returnValue('mysql'));
$this->platformMock->expects($this->any())
@@ -73,8 +76,9 @@ class DependencyAnalyzer extends TestCase {
* @param string $expectedMissing
* @param string $minVersion
* @param string $maxVersion
+ * @param string $intSize
*/
- public function testPhpVersion($expectedMissing, $minVersion, $maxVersion) {
+ public function testPhpVersion($expectedMissing, $minVersion, $maxVersion, $intSize) {
$app = array(
'dependencies' => array(
'php' => array()
@@ -86,6 +90,9 @@ class DependencyAnalyzer extends TestCase {
if (!is_null($maxVersion)) {
$app['dependencies']['php']['@attributes']['max-version'] = $maxVersion;
}
+ if (!is_null($intSize)) {
+ $app['dependencies']['php']['@attributes']['min-int-size'] = $intSize;
+ }
$missing = $this->analyser->analyze($app);
$this->assertTrue(is_array($missing));
@@ -278,13 +285,14 @@ class DependencyAnalyzer extends TestCase {
*/
function providesPhpVersion() {
return array(
- array(array(), null, null),
- array(array(), '5.4', null),
- array(array(), null, '5.5'),
- 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'),
+ array(array(), null, null, null),
+ array(array(), '5.4', null, null),
+ array(array(), null, '5.5', null),
+ array(array(), '5.4', '5.5', null),
+ array(array('PHP 5.4.4 or higher is required.'), '5.4.4', null, null),
+ array(array('PHP with a version lower than 5.4.2 is required.'), null, '5.4.2', null),
+ array(array('64bit or higher PHP required.'), null, null, 64),
+ array(array(), '5.4', '5.4', null),
);
}
}