diff options
Diffstat (limited to 'tests/lib/AppConfigTest.php')
-rw-r--r-- | tests/lib/AppConfigTest.php | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/lib/AppConfigTest.php b/tests/lib/AppConfigTest.php index 520dbf66d36..c4da7507752 100644 --- a/tests/lib/AppConfigTest.php +++ b/tests/lib/AppConfigTest.php @@ -40,7 +40,7 @@ class AppConfigTest extends TestCase { $sql->delete('appconfig'); $sql->execute(); - $this->registerAppConfig(new \OC\AppConfig($this->connection)); + $this->overwriteService('AppConfig', new \OC\AppConfig($this->connection)); $sql = $this->connection->getQueryBuilder(); $sql->insert('appconfig') @@ -130,21 +130,10 @@ class AppConfigTest extends TestCase { $sql->execute(); } - $this->registerAppConfig(new \OC\AppConfig(\OC::$server->getDatabaseConnection())); + $this->restoreService('AppConfig'); parent::tearDown(); } - /** - * Register an app config object for testing purposes. - * - * @param \OCP\IAppConfig $appConfig - */ - protected function registerAppConfig($appConfig) { - \OC::$server->registerService('AppConfig', function () use ($appConfig) { - return $appConfig; - }); - } - public function testGetApps() { $config = new \OC\AppConfig(\OC::$server->getDatabaseConnection()); |