diff options
Diffstat (limited to 'apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php')
-rw-r--r-- | apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php index 76a8b5befdf..9257fe56e63 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php @@ -42,46 +42,46 @@ use OCP\Notification\INotification; class PushProviderTest extends AbstractNotificationProviderTest { - /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ - protected $logger; + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ + protected $logger; - /** @var L10NFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected $l10nFactory; + /** @var L10NFactory|\PHPUnit\Framework\MockObject\MockObject */ + protected $l10nFactory; - /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ - protected $l10n; + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ + protected $l10n; - /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ - protected $urlGenerator; + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ + protected $urlGenerator; - /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ - protected $config; + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ + protected $config; - /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ - private $manager; + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ + private $manager; - /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ - private $timeFactory; + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ + private $timeFactory; - protected function setUp(): void { - parent::setUp(); + protected function setUp(): void { + parent::setUp(); - $this->config = $this->createMock(IConfig::class); - $this->manager = $this->createMock(IManager::class); - $this->timeFactory = $this->createMock(ITimeFactory::class); + $this->config = $this->createMock(IConfig::class); + $this->manager = $this->createMock(IManager::class); + $this->timeFactory = $this->createMock(ITimeFactory::class); - $this->provider = new PushProvider( - $this->config, - $this->manager, - $this->logger, - $this->l10nFactory, - $this->urlGenerator, - $this->timeFactory - ); - } + $this->provider = new PushProvider( + $this->config, + $this->manager, + $this->logger, + $this->l10nFactory, + $this->urlGenerator, + $this->timeFactory + ); + } - public function testNotificationType():void { - $this->assertEquals(PushProvider::NOTIFICATION_TYPE, 'DISPLAY'); + public function testNotificationType():void { + $this->assertEquals(PushProvider::NOTIFICATION_TYPE, 'DISPLAY'); } public function testNotSend(): void { @@ -110,19 +110,19 @@ class PushProviderTest extends AbstractNotificationProviderTest { $this->provider->send($this->vcalendar->VEVENT, $this->calendarDisplayName, $users); } - public function testSend(): void { - $this->config->expects($this->once()) + public function testSend(): void { + $this->config->expects($this->once()) ->method('getAppValue') ->with('dav', 'sendEventRemindersPush', 'no') ->willReturn('yes'); - $user1 = $this->createMock(IUser::class); - $user1->method('getUID') + $user1 = $this->createMock(IUser::class); + $user1->method('getUID') ->willReturn('uid1'); - $user2 = $this->createMock(IUser::class); + $user2 = $this->createMock(IUser::class); $user2->method('getUID') ->willReturn('uid2'); - $user3 = $this->createMock(IUser::class); + $user3 = $this->createMock(IUser::class); $user3->method('getUID') ->willReturn('uid3'); @@ -161,13 +161,13 @@ class PushProviderTest extends AbstractNotificationProviderTest { ->with($notification3); $this->provider->send($this->vcalendar->VEVENT, $this->calendarDisplayName, $users); - } + } /** * @param string $uid * @param \DateTime $dt */ - private function createNotificationMock(string $uid, \DateTime $dt):INotification { + private function createNotificationMock(string $uid, \DateTime $dt):INotification { $notification = $this->createMock(INotification::class); $notification ->expects($this->once()) |