Skip to content

Commit

Permalink
test: Use LoggerInterface instead of ILogger
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Oct 25, 2024
1 parent 239096f commit 7cca1d1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/Integration/ReportToSentryIoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 7cca1d1

Please sign in to comment.