diff options
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 */ |