diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:27:18 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:27:18 +0100 |
commit | 3a7cf40aaa678bea1df143d2982d603b7a334eec (patch) | |
tree | 63c1e3ad7f7f401d14411a4d44c523632906afc9 /apps/comments/tests | |
parent | 0568b012672d650c6b5a49e72c4028dde5463c60 (diff) | |
download | nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.tar.gz nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.zip |
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/comments/tests')
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 */ |