fix(tests)

Signed-off-by: Samuel <faust64@gmail.com>
This commit is contained in:
Samuel 2021-02-11 12:24:38 +01:00
parent 957e287b79
commit 54cb0372c6
1 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,7 @@ use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\ICloudFederationFactory; use OCP\Federation\ICloudFederationFactory;
use OCP\Federation\ICloudFederationProviderManager; use OCP\Federation\ICloudFederationProviderManager;
use OCP\Http\Client\IClientService; use OCP\Http\Client\IClientService;
use OCP\ILogger;
use OCP\OCS\IDiscoveryService; use OCP\OCS\IDiscoveryService;
class NotificationsTest extends \Test\TestCase { class NotificationsTest extends \Test\TestCase {
@ -57,6 +58,9 @@ class NotificationsTest extends \Test\TestCase {
/** @var IEventDispatcher|\PHPUnit\Framework\MockObject\MockObject */ /** @var IEventDispatcher|\PHPUnit\Framework\MockObject\MockObject */
private $eventDispatcher; private $eventDispatcher;
/** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
protected function setUp(): void { protected function setUp(): void {
parent::setUp(); parent::setUp();
@ -65,6 +69,7 @@ class NotificationsTest extends \Test\TestCase {
$this->httpClientService = $this->getMockBuilder('OCP\Http\Client\IClientService')->getMock(); $this->httpClientService = $this->getMockBuilder('OCP\Http\Client\IClientService')->getMock();
$this->addressHandler = $this->getMockBuilder('OCA\FederatedFileSharing\AddressHandler') $this->addressHandler = $this->getMockBuilder('OCA\FederatedFileSharing\AddressHandler')
->disableOriginalConstructor()->getMock(); ->disableOriginalConstructor()->getMock();
$this->logger = $this->createMock(ILogger::class);
$this->cloudFederationProviderManager = $this->createMock(ICloudFederationProviderManager::class); $this->cloudFederationProviderManager = $this->createMock(ICloudFederationProviderManager::class);
$this->cloudFederationFactory = $this->createMock(ICloudFederationFactory::class); $this->cloudFederationFactory = $this->createMock(ICloudFederationFactory::class);
$this->eventDispatcher = $this->createMock(IEventDispatcher::class); $this->eventDispatcher = $this->createMock(IEventDispatcher::class);
@ -82,6 +87,7 @@ class NotificationsTest extends \Test\TestCase {
$this->addressHandler, $this->addressHandler,
$this->httpClientService, $this->httpClientService,
$this->discoveryService, $this->discoveryService,
$this->logger,
$this->jobList, $this->jobList,
$this->cloudFederationProviderManager, $this->cloudFederationProviderManager,
$this->cloudFederationFactory, $this->cloudFederationFactory,
@ -94,6 +100,7 @@ class NotificationsTest extends \Test\TestCase {
$this->addressHandler, $this->addressHandler,
$this->httpClientService, $this->httpClientService,
$this->discoveryService, $this->discoveryService,
$this->logger,
$this->jobList, $this->jobList,
$this->cloudFederationProviderManager, $this->cloudFederationProviderManager,
$this->cloudFederationFactory, $this->cloudFederationFactory,