public function testDeleteKey() { $config = new \OC\AppConfig(\OC::$server->getDatabaseConnection()); $this->assertTrue($config->hasKey('testapp', 'deletethis')); $config->deleteKey('testapp', 'deletethis'); $this->assertFalse($config->hasKey('testapp', 'deletethis')); $sql = \OC::$server->getDatabaseConnection()->getQueryBuilder(); $sql->select('configvalue')->from('appconfig')->where($sql->expr()->eq('appid', $sql->createParameter('appid')))->andWhere($sql->expr()->eq('configkey', $sql->createParameter('configkey')))->setParameter('appid', 'testapp')->setParameter('configkey', 'deletethis'); $query = $sql->execute(); $result = $query->fetch(); $query->closeCursor(); $this->assertFalse($result); }