Skip to content

Commit

Permalink
fix: Remove references to getLogger and ILogger in the tests
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Sep 19, 2024
1 parent 4136a6d commit bf781ba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/Unit/Controller/PublicFavoritePageControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
use OCP\AppFramework\IAppContainer;
use OCP\IServerContainer;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;

class PublicFavoritePageControllerTest extends TestCase {
/* @var PublicFavoritePageController */
Expand All @@ -54,18 +55,18 @@ class PublicFavoritePageControllerTest extends TestCase {

protected function setUp(): void {
// Begin transaction
$db = OC::$server->query(\OCP\IDBConnection::class);
$db = \OCP\Server::get(\OCP\IDBConnection::class);
$db->beginTransaction();

$this->app = new Application();

$this->container = $this->app->getContainer();
$container = $this->container;

$appName = $container->query('AppName');
$appName = $container->query('appName');

$this->favoritesService = new FavoritesService(
$container->query(IServerContainer::class)->getLogger(),
$container->query(IServerContainer::class)->get(LoggerInterface::class),
$container->query(IServerContainer::class)->getL10N($appName),
$container->query(IServerContainer::class)->getSecureRandom(),
$container->query(\OCP\IDBConnection::class)
Expand All @@ -87,7 +88,7 @@ protected function setUp(): void {
$requestMock,
$sessionMock,
$this->config,
$container->query(\OCP\ILogger::class),
$container->query(LoggerInterface::class),
$this->favoriteShareMapper
);
}
Expand Down

0 comments on commit bf781ba

Please sign in to comment.