From 7cca1d1cdf9f72d90e7119a3ccf8fb6c8ad627c1 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 25 Oct 2024 12:44:39 +0200 Subject: [PATCH] test: Use LoggerInterface instead of ILogger Signed-off-by: Christoph Wurst --- tests/Integration/ReportToSentryIoTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/Integration/ReportToSentryIoTest.php b/tests/Integration/ReportToSentryIoTest.php index d16098d0..60bb9fdc 100644 --- a/tests/Integration/ReportToSentryIoTest.php +++ b/tests/Integration/ReportToSentryIoTest.php @@ -28,14 +28,13 @@ use ChristophWurst\Nextcloud\Testing\TestCase; use Exception; -use OCP\ILogger; +use function OCP\Log\logger; class ReportToSentryIoTest extends TestCase { public function testSendException() { - /** @var ILogger $logger */ - $logger = \OC::$server->query(ILogger::class); - $logger->logException(new Exception('Test is a Sentry CI test')); + $logger = logger('sentry'); + $logger->critical('Test is a Sentry CI test', ['exception' => new Exception('Test is a Sentry CI test')]); $this->addToAssertionCount(1); }