diff options
author | jld3103 <jld3103yt@gmail.com> | 2023-06-19 07:48:03 +0200 |
---|---|---|
committer | jld3103 <jld3103yt@gmail.com> | 2023-06-19 08:12:25 +0200 |
commit | 4cd07d79a75e65865de7b2c8230ed2dd4b7eedef (patch) | |
tree | db9d7661b5989e607880d18e5ff60aed9432f063 /apps/comments/tests | |
parent | 7250b987910b5679e342dd7e938d00a3b69d87cc (diff) | |
download | nextcloud-server-4cd07d79a75e65865de7b2c8230ed2dd4b7eedef.tar.gz nextcloud-server-4cd07d79a75e65865de7b2c8230ed2dd4b7eedef.zip |
comments: Stop using a service alias for controller
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'apps/comments/tests')
-rw-r--r-- | apps/comments/tests/Unit/AppInfo/ApplicationTest.php | 5 | ||||
-rw-r--r-- | apps/comments/tests/Unit/Controller/NotificationsTest.php | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php index 6e3658c0e5b..a0ec722b368 100644 --- a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php +++ b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php @@ -51,11 +51,8 @@ class ApplicationTest extends TestCase { $app = new Application(); $c = $app->getContainer(); - // assert service instances in the container are properly setup - $s = $c->get('NotificationsController'); - $this->assertInstanceOf('OCA\Comments\Controller\Notifications', $s); - $services = [ + 'OCA\Comments\Controller\NotificationsController', 'OCA\Comments\Activity\Filter', 'OCA\Comments\Activity\Listener', 'OCA\Comments\Activity\Provider', diff --git a/apps/comments/tests/Unit/Controller/NotificationsTest.php b/apps/comments/tests/Unit/Controller/NotificationsTest.php index c21101030e8..4ccb553739b 100644 --- a/apps/comments/tests/Unit/Controller/NotificationsTest.php +++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php @@ -25,7 +25,7 @@ */ namespace OCA\Comments\Tests\Unit\Controller; -use OCA\Comments\Controller\Notifications; +use OCA\Comments\Controller\NotificationsController; use OCP\AppFramework\Http\NotFoundResponse; use OCP\AppFramework\Http\RedirectResponse; use OCP\Comments\IComment; @@ -43,7 +43,7 @@ use OCP\Notification\INotification; use Test\TestCase; class NotificationsTest extends TestCase { - /** @var Notifications */ + /** @var NotificationsController */ protected $notificationsController; /** @var ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */ @@ -70,7 +70,7 @@ class NotificationsTest extends TestCase { $this->notificationManager = $this->createMock(IManager::class); $this->urlGenerator = $this->createMock(IURLGenerator::class); - $this->notificationsController = new Notifications( + $this->notificationsController = new NotificationsController( 'comments', $this->createMock(IRequest::class), $this->commentsManager, |