Skip to content

Commit 5f45158

Browse files
SystemKeeperbackportbot[bot]
authored andcommitted
fix(tests): Add appConfig to push test mock
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
1 parent 37f9815 commit 5f45158

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/Unit/PushTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use OC\Security\IdentityProof\Manager;
1818
use OCA\Notifications\Push;
1919
use OCP\AppFramework\Http;
20+
use OCP\AppFramework\Services\IAppConfig;
2021
use OCP\AppFramework\Utility\ITimeFactory;
2122
use OCP\Authentication\Token\IToken as OCPIToken;
2223
use OCP\Http\Client\IClient;
@@ -48,6 +49,7 @@ class PushTest extends TestCase {
4849
protected IDBConnection $db;
4950
protected INotificationManager&MockObject $notificationManager;
5051
protected IConfig&MockObject $config;
52+
protected IAppConfig&MockObject $appConfig;
5153
protected IProvider&MockObject $tokenProvider;
5254
protected Manager&MockObject $keyManager;
5355
protected IClientService&MockObject $clientService;
@@ -65,6 +67,7 @@ protected function setUp(): void {
6567
$this->db = \OCP\Server::get(IDBConnection::class);
6668
$this->notificationManager = $this->createMock(INotificationManager::class);
6769
$this->config = $this->createMock(IConfig::class);
70+
$this->appConfig = $this->createMock(IAppConfig::class);
6871
$this->tokenProvider = $this->createMock(IProvider::class);
6972
$this->keyManager = $this->createMock(Manager::class);
7073
$this->clientService = $this->createMock(IClientService::class);
@@ -91,6 +94,7 @@ protected function getPush(array $methods = []): Push|MockObject {
9194
$this->db,
9295
$this->notificationManager,
9396
$this->config,
97+
$this->appConfig,
9498
$this->tokenProvider,
9599
$this->keyManager,
96100
$this->clientService,
@@ -109,6 +113,7 @@ protected function getPush(array $methods = []): Push|MockObject {
109113
$this->db,
110114
$this->notificationManager,
111115
$this->config,
116+
$this->appConfig,
112117
$this->tokenProvider,
113118
$this->keyManager,
114119
$this->clientService,

0 commit comments

Comments
 (0)