Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-03-18 12:43:54 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2020-03-18 20:59:49 +0300
commitdc7913efcdefbf1791a5a3f2815b818b9a21c0ee (patch)
treeeeae6f1d66b860d99de08a25fcfc5c9d8faef733 /tests
parent570f3c77989120d92efbbd7a8bc5ad39288d7222 (diff)
Fix recursive calls in logging via server methods
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AppTest.php9
-rw-r--r--tests/lib/User/UserTest.php8
2 files changed, 9 insertions, 8 deletions
diff --git a/tests/lib/AppTest.php b/tests/lib/AppTest.php
index 4ef370cd349..412db90849b 100644
--- a/tests/lib/AppTest.php
+++ b/tests/lib/AppTest.php
@@ -9,6 +9,7 @@
namespace Test;
+use OC\App\AppManager;
use OC\App\InfoParser;
use OC\AppConfig;
use OCP\IAppConfig;
@@ -546,8 +547,8 @@ class AppTest extends \Test\TestCase {
* @param IAppConfig $appConfig app config mock
*/
private function registerAppConfig(AppConfig $appConfig) {
- $this->overwriteService('AppConfig', $appConfig);
- $this->overwriteService('AppManager', new \OC\App\AppManager(
+ $this->overwriteService(AppConfig::class, $appConfig);
+ $this->overwriteService(AppManager::class, new \OC\App\AppManager(
\OC::$server->getUserSession(),
\OC::$server->getConfig(),
$appConfig,
@@ -562,8 +563,8 @@ class AppTest extends \Test\TestCase {
* Restore the original app config service.
*/
private function restoreAppConfig() {
- $this->restoreService('AppConfig');
- $this->restoreService('AppManager');
+ $this->restoreService(AppConfig::class);
+ $this->restoreService(AppManager::class);
// Remove the cache of the mocked apps list with a forceRefresh
\OC_App::getEnabledApps();
diff --git a/tests/lib/User/UserTest.php b/tests/lib/User/UserTest.php
index adcb2adec58..8431f14f8a2 100644
--- a/tests/lib/User/UserTest.php
+++ b/tests/lib/User/UserTest.php
@@ -559,15 +559,15 @@ class UserTest extends TestCase {
->method('markProcessed');
}
- $this->overwriteService('NotificationManager', $notificationManager);
- $this->overwriteService('CommentsManager', $commentsManager);
+ $this->overwriteService(\OCP\Notification\IManager::class, $notificationManager);
+ $this->overwriteService(\OCP\Comments\ICommentsManager::class, $commentsManager);
$this->overwriteService(AllConfig::class, $config);
$this->assertSame($result, $user->delete());
$this->restoreService(AllConfig::class);
- $this->restoreService('CommentsManager');
- $this->restoreService('NotificationManager');
+ $this->restoreService(\OCP\Comments\ICommentsManager::class);
+ $this->restoreService(\OCP\Notification\IManager::class);
$this->assertEquals($expectedHooks, $hooksCalled);
}