Pass logger in constructor for importers

This commit is contained in:
Yassine Guedidi
2022-08-27 20:57:18 +02:00
parent 96c8cc25af
commit 51884911f5
10 changed files with 22 additions and 47 deletions

View File

@ -249,19 +249,19 @@ class WallabagV1ImportTest extends TestCase
->expects($this->exactly($dispatched))
->method('dispatch');
$this->logHandler = new TestHandler();
$logger = new Logger('test', [$this->logHandler]);
$wallabag = new WallabagV1Import(
$this->em,
$this->contentProxy,
$this->tagsAssigner,
$dispatcher,
$logger,
$this->fetchingErrorMessageTitle,
$this->fetchingErrorMessage
);
$this->logHandler = new TestHandler();
$logger = new Logger('test', [$this->logHandler]);
$wallabag->setLogger($logger);
if (false === $unsetUser) {
$wallabag->setUser($this->user);
}