summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CalDAV/Reminder
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 13:53:40 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 13:54:22 +0200
commitafbd9c4e6ed834e713039f2cff88ba3eec03dadb (patch)
tree7d8721cf8fc0329d6b750db63798de67a162b090 /apps/dav/tests/unit/CalDAV/Reminder
parent19e97e86c69ab128191439d6a17dacb5a630cf98 (diff)
downloadnextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.tar.gz
nextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.zip
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/tests/unit/CalDAV/Reminder')
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php10
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php6
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php10
4 files changed, 14 insertions, 14 deletions
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php
index 9257fe56e63..69c34d76b09 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php
@@ -80,7 +80,7 @@ class PushProviderTest extends AbstractNotificationProviderTest {
);
}
- public function testNotificationType():void {
+ public function testNotificationType():void {
$this->assertEquals(PushProvider::NOTIFICATION_TYPE, 'DISPLAY');
}
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php
index f0bd91bf002..2900e24119c 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php
@@ -56,7 +56,7 @@ class NotificationProviderManagerTest extends TestCase {
* @throws ProviderNotAvailableException
* @throws NotificationTypeDoesNotExistException
*/
- public function testGetProviderForUnknownType(): void{
+ public function testGetProviderForUnknownType(): void {
$this->expectException(\OCA\DAV\CalDAV\Reminder\NotificationTypeDoesNotExistException::class);
$this->expectExceptionMessage('Type NOT EXISTENT is not an accepted type of notification');
@@ -67,19 +67,19 @@ class NotificationProviderManagerTest extends TestCase {
* @throws NotificationTypeDoesNotExistException
* @throws ProviderNotAvailableException
*/
- public function testGetProviderForUnRegisteredType(): void{
+ public function testGetProviderForUnRegisteredType(): void {
$this->expectException(\OCA\DAV\CalDAV\Reminder\NotificationProvider\ProviderNotAvailableException::class);
$this->expectExceptionMessage('No notification provider for type AUDIO available');
$this->providerManager->getProvider('AUDIO');
}
- public function testGetProvider(): void{
+ public function testGetProvider(): void {
$provider = $this->providerManager->getProvider('EMAIL');
$this->assertInstanceOf(EmailProvider::class, $provider);
}
- public function testRegisterProvider(): void{
+ public function testRegisterProvider(): void {
$this->providerManager->registerProvider(PushProvider::class);
$provider = $this->providerManager->getProvider('DISPLAY');
$this->assertInstanceOf(PushProvider::class, $provider);
@@ -88,7 +88,7 @@ class NotificationProviderManagerTest extends TestCase {
/**
* @throws \OCP\AppFramework\QueryException
*/
- public function testRegisterBadProvider(): void{
+ public function testRegisterBadProvider(): void {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Invalid notification provider registered');
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php
index 38240182275..568a65b77d3 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php
@@ -61,18 +61,18 @@ class NotifierTest extends TestCase {
$this->l10n = $this->createMock(IL10N::class);
$this->l10n->expects($this->any())
->method('t')
- ->willReturnCallback(function($string, $args) {
+ ->willReturnCallback(function ($string, $args) {
return vsprintf($string, $args);
});
$this->l10n->expects($this->any())
->method('l')
- ->willReturnCallback(function($string, $args) {
+ ->willReturnCallback(function ($string, $args) {
/** \DateTime $args */
return $args->format(\DateTime::ATOM);
});
$this->l10n->expects($this->any())
->method('n')
- ->willReturnCallback(function($textSingular, $textPlural, $count, $args) {
+ ->willReturnCallback(function ($textSingular, $textPlural, $count, $args) {
$text = $count === 1 ? $textSingular : $textPlural;
$text = str_replace('%n', (string)$count, $text);
return vsprintf($text, $args);
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
index 11ecdbc354b..03e953f5c27 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
@@ -501,7 +501,7 @@ EOD;
$provider1->expects($this->once())
->method('send')
- ->with($this->callback(function($vevent) {
+ ->with($this->callback(function ($vevent) {
if ($vevent->DTSTART->getDateTime()->format(\DateTime::ATOM) !== '2016-06-09T00:00:00+00:00') {
return false;
}
@@ -509,7 +509,7 @@ EOD;
}, 'Displayname 123', $user));
$provider2->expects($this->once())
->method('send')
- ->with($this->callback(function($vevent) {
+ ->with($this->callback(function ($vevent) {
if ($vevent->DTSTART->getDateTime()->format(\DateTime::ATOM) !== '2016-06-09T00:00:00+00:00') {
return false;
}
@@ -517,7 +517,7 @@ EOD;
}, 'Displayname 123', $user));
$provider3->expects($this->once())
->method('send')
- ->with($this->callback(function($vevent) {
+ ->with($this->callback(function ($vevent) {
if ($vevent->DTSTART->getDateTime()->format(\DateTime::ATOM) !== '2016-06-09T00:00:00+00:00') {
return false;
}
@@ -525,7 +525,7 @@ EOD;
}, 'Displayname 123', $user));
$provider4->expects($this->once())
->method('send')
- ->with($this->callback(function($vevent) {
+ ->with($this->callback(function ($vevent) {
if ($vevent->DTSTART->getDateTime()->format(\DateTime::ATOM) !== '2016-06-30T00:00:00+00:00') {
return false;
}
@@ -533,7 +533,7 @@ EOD;
}, 'Displayname 123', $user));
$provider5->expects($this->once())
->method('send')
- ->with($this->callback(function($vevent) {
+ ->with($this->callback(function ($vevent) {
if ($vevent->DTSTART->getDateTime()->format(\DateTime::ATOM) !== '2016-07-07T00:00:00+00:00') {
return false;
}