no nested xml tags on dependencies

remotes/origin/fix-10825
Thomas Müller 10 years ago
parent eb81c52b95
commit b55ac514ac

@ -65,11 +65,11 @@ class DependencyAnalyzer {
} }
private function analyseSupportedDatabases() { private function analyseSupportedDatabases() {
if (!isset($this->dependencies['databases'])) { if (!isset($this->dependencies['database'])) {
return; return;
} }
$supportedDatabases = $this->dependencies['databases']; $supportedDatabases = $this->dependencies['database'];
if (empty($supportedDatabases)) { if (empty($supportedDatabases)) {
return; return;
} }

@ -23,16 +23,14 @@
"max-version": "5.5" "max-version": "5.5"
} }
}, },
"databases": { "database": [
"database": [ {
{ "@attributes" : {
"@attributes" : { "min-version": "3.0"
"min-version": "3.0" },
}, "@value": "sqlite"},
"@value": "sqlite"}, "mysql"
"mysql" ],
]
},
"command": [ "command": [
{ {
"@attributes" : { "@attributes" : {

@ -21,10 +21,8 @@
<ocsid>166047</ocsid> <ocsid>166047</ocsid>
<dependencies> <dependencies>
<php min-version="5.4" max-version="5.5"/> <php min-version="5.4" max-version="5.5"/>
<databases> <database min-version="3.0">sqlite</database>
<database min-version="3.0">sqlite</database> <database>mysql</database>
<database>mysql</database>
</databases>
<command os="linux">grep</command> <command os="linux">grep</command>
<command os="windows">notepad.exe</command> <command os="windows">notepad.exe</command>
</dependencies> </dependencies>

@ -77,7 +77,7 @@ class DependencyAnalyzer extends \PHPUnit_Framework_TestCase {
) )
); );
if (!is_null($databases)) { if (!is_null($databases)) {
$app['dependencies']['databases'] = $databases; $app['dependencies']['database'] = $databases;
} }
$analyser = new \OC\App\DependencyAnalyzer($app, $this->platformMock, $this->l10nMock); $analyser = new \OC\App\DependencyAnalyzer($app, $this->platformMock, $this->l10nMock);
$missing = $analyser->analyze(); $missing = $analyser->analyze();

Loading…
Cancel
Save