diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-12-02 15:14:48 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-12-04 11:40:33 +0100 |
commit | b55ac514ac8a555e0fa14a391fec02d4c675748f (patch) | |
tree | 60efea200403480ee8824d2df2f2d0dd429bf1e9 | |
parent | eb81c52b9517321fb6e8da4c80f04f43ed96e3f7 (diff) | |
download | nextcloud-server-b55ac514ac8a555e0fa14a391fec02d4c675748f.tar.gz nextcloud-server-b55ac514ac8a555e0fa14a391fec02d4c675748f.zip |
no nested xml tags on dependencies
-rw-r--r-- | lib/private/app/dependencyanalyzer.php | 4 | ||||
-rw-r--r-- | tests/data/app/expected-info.json | 18 | ||||
-rw-r--r-- | tests/data/app/valid-info.xml | 6 | ||||
-rw-r--r-- | tests/lib/app/dependencyanalyzer.php | 2 |
4 files changed, 13 insertions, 17 deletions
diff --git a/lib/private/app/dependencyanalyzer.php b/lib/private/app/dependencyanalyzer.php index ae5ecf76cd1..fb4b3761656 100644 --- a/lib/private/app/dependencyanalyzer.php +++ b/lib/private/app/dependencyanalyzer.php @@ -65,11 +65,11 @@ class DependencyAnalyzer { } private function analyseSupportedDatabases() { - if (!isset($this->dependencies['databases'])) { + if (!isset($this->dependencies['database'])) { return; } - $supportedDatabases = $this->dependencies['databases']; + $supportedDatabases = $this->dependencies['database']; if (empty($supportedDatabases)) { return; } diff --git a/tests/data/app/expected-info.json b/tests/data/app/expected-info.json index 8ab6e48ac6d..fc0ab224977 100644 --- a/tests/data/app/expected-info.json +++ b/tests/data/app/expected-info.json @@ -23,16 +23,14 @@ "max-version": "5.5" } }, - "databases": { - "database": [ - { - "@attributes" : { - "min-version": "3.0" - }, - "@value": "sqlite"}, - "mysql" - ] - }, + "database": [ + { + "@attributes" : { + "min-version": "3.0" + }, + "@value": "sqlite"}, + "mysql" + ], "command": [ { "@attributes" : { diff --git a/tests/data/app/valid-info.xml b/tests/data/app/valid-info.xml index 354a39832fb..f01f5fd55ea 100644 --- a/tests/data/app/valid-info.xml +++ b/tests/data/app/valid-info.xml @@ -21,10 +21,8 @@ <ocsid>166047</ocsid> <dependencies> <php min-version="5.4" max-version="5.5"/> - <databases> - <database min-version="3.0">sqlite</database> - <database>mysql</database> - </databases> + <database min-version="3.0">sqlite</database> + <database>mysql</database> <command os="linux">grep</command> <command os="windows">notepad.exe</command> </dependencies> diff --git a/tests/lib/app/dependencyanalyzer.php b/tests/lib/app/dependencyanalyzer.php index 122eb377d55..7d06842e8ad 100644 --- a/tests/lib/app/dependencyanalyzer.php +++ b/tests/lib/app/dependencyanalyzer.php @@ -77,7 +77,7 @@ class DependencyAnalyzer extends \PHPUnit_Framework_TestCase { ) ); if (!is_null($databases)) { - $app['dependencies']['databases'] = $databases; + $app['dependencies']['database'] = $databases; } $analyser = new \OC\App\DependencyAnalyzer($app, $this->platformMock, $this->l10nMock); $missing = $analyser->analyze(); |