diff options
author | Joas Schilling <coding@schilljs.com> | 2018-01-17 13:42:02 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-01-18 10:55:44 +0100 |
commit | 19f7cc9e9243c8ce4f3a5cba2c6fc286b1e32f38 (patch) | |
tree | c87781c3db915aa2bb3a7fe0ff20e4428f423bb3 /apps/updatenotification/tests/Notification/NotifierTest.php | |
parent | 9296116297fb6c46f1f26d745b5fe1f63f6caa2a (diff) | |
download | nextcloud-server-19f7cc9e9243c8ce4f3a5cba2c6fc286b1e32f38.tar.gz nextcloud-server-19f7cc9e9243c8ce4f3a5cba2c6fc286b1e32f38.zip |
Make Update notficiations strict and fix all inspections
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/updatenotification/tests/Notification/NotifierTest.php')
-rw-r--r-- | apps/updatenotification/tests/Notification/NotifierTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/updatenotification/tests/Notification/NotifierTest.php b/apps/updatenotification/tests/Notification/NotifierTest.php index 34486bf5ba5..b1ddf7b478d 100644 --- a/apps/updatenotification/tests/Notification/NotifierTest.php +++ b/apps/updatenotification/tests/Notification/NotifierTest.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -88,7 +89,7 @@ class NotifierTest extends TestCase { } } - public function dataUpdateAlreadyInstalledCheck() { + public function dataUpdateAlreadyInstalledCheck(): array { return [ ['1.1.0', '1.0.0', false], ['1.1.0', '1.1.0', true], @@ -103,7 +104,7 @@ class NotifierTest extends TestCase { * @param string $versionInstalled * @param bool $exception */ - public function testUpdateAlreadyInstalledCheck($versionNotification, $versionInstalled, $exception) { + public function testUpdateAlreadyInstalledCheck(string $versionNotification, string $versionInstalled, bool $exception) { $notifier = $this->getNotifier(); $notification = $this->createMock(INotification::class); @@ -121,7 +122,7 @@ class NotifierTest extends TestCase { } try { - $this->invokePrivate($notifier, 'updateAlreadyInstalledCheck', [$notification, $versionInstalled]); + self::invokePrivate($notifier, 'updateAlreadyInstalledCheck', [$notification, $versionInstalled]); $this->assertFalse($exception); } catch (\Exception $e) { $this->assertTrue($exception); |