private function getWallabagV1Import($unsetUser = false)
 {
     $this->user = new User();
     $this->em = $this->getMockBuilder('Doctrine\\ORM\\EntityManager')->disableOriginalConstructor()->getMock();
     $this->contentProxy = $this->getMockBuilder('Wallabag\\CoreBundle\\Helper\\ContentProxy')->disableOriginalConstructor()->getMock();
     $wallabag = new WallabagV1Import($this->em, $this->contentProxy);
     $this->logHandler = new TestHandler();
     $logger = new Logger('test', [$this->logHandler]);
     $wallabag->setLogger($logger);
     if (false === $unsetUser) {
         $wallabag->setUser($this->user);
     }
     return $wallabag;
 }
 private function getWallabagV1Import($unsetUser = false)
 {
     $this->user = new User();
     $this->em = $this->getMockBuilder('Doctrine\\ORM\\EntityManager')->disableOriginalConstructor()->getMock();
     $this->uow = $this->getMockBuilder('Doctrine\\ORM\\UnitOfWork')->disableOriginalConstructor()->getMock();
     $this->em->expects($this->any())->method('getUnitOfWork')->willReturn($this->uow);
     $this->uow->expects($this->any())->method('getScheduledEntityInsertions')->willReturn([]);
     $this->contentProxy = $this->getMockBuilder('Wallabag\\CoreBundle\\Helper\\ContentProxy')->disableOriginalConstructor()->getMock();
     $wallabag = new WallabagV1Import($this->em, $this->contentProxy);
     $this->logHandler = new TestHandler();
     $logger = new Logger('test', [$this->logHandler]);
     $wallabag->setLogger($logger);
     if (false === $unsetUser) {
         $wallabag->setUser($this->user);
     }
     return $wallabag;
 }