summaryrefslogtreecommitdiffstats
path: root/apps/comments
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-11-28 08:36:10 +0100
committerGitHub <noreply@github.com>2019-11-28 08:36:10 +0100
commit669302e570024c83140ff5c4f4b1489c5a1c66ed (patch)
tree010182798f5c83193554031753e063a8a0b35ca1 /apps/comments
parent125be68311a319f2b839e5aa4ea29cd642cd1e00 (diff)
parente3e782b63df4f1d65c86cb3b204b4bdecf93a6cd (diff)
downloadnextcloud-server-669302e570024c83140ff5c4f4b1489c5a1c66ed.tar.gz
nextcloud-server-669302e570024c83140ff5c4f4b1489c5a1c66ed.zip
Merge pull request #18064 from nextcloud/feature/php74
Add php7.4 support
Diffstat (limited to 'apps/comments')
-rw-r--r--apps/comments/tests/Unit/Activity/ListenerTest.php2
-rw-r--r--apps/comments/tests/Unit/AppInfo/ApplicationTest.php4
-rw-r--r--apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php2
-rw-r--r--apps/comments/tests/Unit/Controller/NotificationsTest.php2
-rw-r--r--apps/comments/tests/Unit/EventHandlerTest.php2
-rw-r--r--apps/comments/tests/Unit/JSSettingsHelperTest.php2
-rw-r--r--apps/comments/tests/Unit/Notification/ListenerTest.php2
-rw-r--r--apps/comments/tests/Unit/Notification/NotifierTest.php32
8 files changed, 24 insertions, 24 deletions
diff --git a/apps/comments/tests/Unit/Activity/ListenerTest.php b/apps/comments/tests/Unit/Activity/ListenerTest.php
index 4454101bb38..162cd2eb747 100644
--- a/apps/comments/tests/Unit/Activity/ListenerTest.php
+++ b/apps/comments/tests/Unit/Activity/ListenerTest.php
@@ -63,7 +63,7 @@ class ListenerTest extends TestCase {
/** @var IShareHelper|\PHPUnit_Framework_MockObject_MockObject */
protected $shareHelper;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->activityManager = $this->createMock(IManager::class);
diff --git a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php
index 6ff3bc54b0d..2117b79350f 100644
--- a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php
+++ b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php
@@ -35,13 +35,13 @@ use Test\TestCase;
* @package OCA\Comments\Tests\Unit\AppInfo
*/
class ApplicationTest extends TestCase {
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
\OC::$server->getUserManager()->createUser('dummy', '456');
\OC::$server->getUserSession()->setUser(\OC::$server->getUserManager()->get('dummy'));
}
- protected function tearDown() {
+ protected function tearDown(): void {
\OC::$server->getUserManager()->get('dummy')->delete();
parent::tearDown();
}
diff --git a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
index 0cc3e3d4b61..a1cc6f915e3 100644
--- a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
+++ b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
@@ -36,7 +36,7 @@ class CommentersSorterTest extends TestCase {
/** @var CommentersSorter */
protected $sorter;
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->commentsManager = $this->createMock(ICommentsManager::class);
diff --git a/apps/comments/tests/Unit/Controller/NotificationsTest.php b/apps/comments/tests/Unit/Controller/NotificationsTest.php
index 9df81f01b02..029a04dcb80 100644
--- a/apps/comments/tests/Unit/Controller/NotificationsTest.php
+++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php
@@ -59,7 +59,7 @@ class NotificationsTest extends TestCase {
/** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
protected $urlGenerator;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->commentsManager = $this->createMock(ICommentsManager::class);
diff --git a/apps/comments/tests/Unit/EventHandlerTest.php b/apps/comments/tests/Unit/EventHandlerTest.php
index b27b851cc5e..c9841a553fb 100644
--- a/apps/comments/tests/Unit/EventHandlerTest.php
+++ b/apps/comments/tests/Unit/EventHandlerTest.php
@@ -40,7 +40,7 @@ class EventHandlerTest extends TestCase {
/** @var NotificationListener|\PHPUnit_Framework_MockObject_MockObject */
protected $notificationListener;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->activityListener = $this->getMockBuilder(ActivityListener::class)
diff --git a/apps/comments/tests/Unit/JSSettingsHelperTest.php b/apps/comments/tests/Unit/JSSettingsHelperTest.php
index ad2f34c7aab..4b580024da4 100644
--- a/apps/comments/tests/Unit/JSSettingsHelperTest.php
+++ b/apps/comments/tests/Unit/JSSettingsHelperTest.php
@@ -34,7 +34,7 @@ class JSSettingsHelperTest extends TestCase {
/** @var JSSettingsHelper */
protected $helper;
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->c = $this->createMock(IServerContainer::class);
diff --git a/apps/comments/tests/Unit/Notification/ListenerTest.php b/apps/comments/tests/Unit/Notification/ListenerTest.php
index e31b227bce8..8d892062688 100644
--- a/apps/comments/tests/Unit/Notification/ListenerTest.php
+++ b/apps/comments/tests/Unit/Notification/ListenerTest.php
@@ -46,7 +46,7 @@ class ListenerTest extends TestCase {
/** @var Listener */
protected $listener;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->notificationManager = $this->createMock(\OCP\Notification\IManager::class);
diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php
index d008c4c3121..617fcaf09b1 100644
--- a/apps/comments/tests/Unit/Notification/NotifierTest.php
+++ b/apps/comments/tests/Unit/Notification/NotifierTest.php
@@ -62,7 +62,7 @@ class NotifierTest extends TestCase {
/** @var string */
protected $lc = 'tlh_KX';
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->l10nFactory = $this->createMock(IFactory::class);
@@ -339,10 +339,10 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
- /**
- * @expectedException \InvalidArgumentException
- */
+
public function testPrepareDifferentApp() {
+ $this->expectException(\InvalidArgumentException::class);
+
$this->folder
->expects($this->never())
->method('getById');
@@ -376,10 +376,10 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
- /**
- * @expectedException \InvalidArgumentException
- */
+
public function testPrepareNotFound() {
+ $this->expectException(\InvalidArgumentException::class);
+
$this->folder
->expects($this->never())
->method('getById');
@@ -414,10 +414,10 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
- /**
- * @expectedException \InvalidArgumentException
- */
+
public function testPrepareDifferentSubject() {
+ $this->expectException(\InvalidArgumentException::class);
+
$displayName = 'Huraga';
/** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
@@ -477,10 +477,10 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
- /**
- * @expectedException \InvalidArgumentException
- */
+
public function testPrepareNotFiles() {
+ $this->expectException(\InvalidArgumentException::class);
+
$displayName = 'Huraga';
/** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
@@ -541,10 +541,10 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
- /**
- * @expectedException \OCP\Notification\AlreadyProcessedException
- */
+
public function testPrepareUnresolvableFileID() {
+ $this->expectException(\OCP\Notification\AlreadyProcessedException::class);
+
$displayName = 'Huraga';
/** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */