fix appconfig tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/23780/head
Roeland Jago Douma 5 years ago
parent b3037dee6a
commit c02e6fcae2
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 4
      lib/private/AppConfig.php
  2. 6
      tests/lib/AppConfigTest.php

@ -348,10 +348,10 @@ class AppConfig implements IAppConfig {
$rows = $result->fetchAll();
foreach ($rows as $row) {
if (!isset($this->cache[$row['appid']])) {
$this->cache[$row['appid']] = [];
$this->cache[(string)$row['appid']] = [];
}
$this->cache[$row['appid']][$row['configkey']] = $row['configvalue'];
$this->cache[(string)$row['appid']][(string)$row['configkey']] = (string)$row['configvalue'];
}
$result->closeCursor();

@ -140,11 +140,11 @@ class AppConfigTest extends TestCase {
public function testGetApps() {
$config = new \OC\AppConfig(\OC::$server->getDatabaseConnection());
$this->assertEquals([
$this->assertEqualsCanonicalizing([
'anotherapp',
'someapp',
'testapp',
'123456',
123456,
], $config->getApps());
}
@ -152,7 +152,7 @@ class AppConfigTest extends TestCase {
$config = new \OC\AppConfig(\OC::$server->getDatabaseConnection());
$keys = $config->getKeys('testapp');
$this->assertEquals([
$this->assertEqualsCanonicalizing([
'deletethis',
'depends_on',
'enabled',

Loading…
Cancel
Save