Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 17:27:18 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 17:27:18 +0300
commit3a7cf40aaa678bea1df143d2982d603b7a334eec (patch)
tree63c1e3ad7f7f401d14411a4d44c523632906afc9 /apps/comments/tests
parent0568b012672d650c6b5a49e72c4028dde5463c60 (diff)
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/comments/tests')
-rw-r--r--apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php2
-rw-r--r--apps/comments/tests/Unit/JSSettingsHelperTest.php2
-rw-r--r--apps/comments/tests/Unit/Notification/NotifierTest.php30
3 files changed, 17 insertions, 17 deletions
diff --git a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
index 727014b8fcb..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(): void {
+ protected function setUp(): void {
parent::setUp();
$this->commentsManager = $this->createMock(ICommentsManager::class);
diff --git a/apps/comments/tests/Unit/JSSettingsHelperTest.php b/apps/comments/tests/Unit/JSSettingsHelperTest.php
index 4133daef3ce..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(): void {
+ protected function setUp(): void {
parent::setUp();
$this->c = $this->createMock(IServerContainer::class);
diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php
index 1fb1cd7736e..617fcaf09b1 100644
--- a/apps/comments/tests/Unit/Notification/NotifierTest.php
+++ b/apps/comments/tests/Unit/Notification/NotifierTest.php
@@ -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 */