forked from wallabag/wallabag
[#1590] Add JSON import from wallabag v2
This commit is contained in:
@ -21,17 +21,17 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$pocket = new WallabagV1Import($this->em);
|
||||
$wallabag = new WallabagV1Import($this->em);
|
||||
|
||||
$this->logHandler = new TestHandler();
|
||||
$logger = new Logger('test', array($this->logHandler));
|
||||
$pocket->setLogger($logger);
|
||||
$wallabag->setLogger($logger);
|
||||
|
||||
if (false === $unsetUser) {
|
||||
$pocket->setUser($this->user);
|
||||
$wallabag->setUser($this->user);
|
||||
}
|
||||
|
||||
return $pocket;
|
||||
return $wallabag;
|
||||
}
|
||||
|
||||
public function testInit()
|
||||
@ -77,7 +77,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertFalse($res);
|
||||
|
||||
$records = $this->logHandler->getRecords();
|
||||
$this->assertContains('WallabagV1Import: unable to read file', $records[0]['message']);
|
||||
$this->assertContains('WallabagImport: unable to read file', $records[0]['message']);
|
||||
$this->assertEquals('ERROR', $records[0]['level_name']);
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertFalse($res);
|
||||
|
||||
$records = $this->logHandler->getRecords();
|
||||
$this->assertContains('WallabagV1Import: user is not defined', $records[0]['message']);
|
||||
$this->assertContains('WallabagImport: user is not defined', $records[0]['message']);
|
||||
$this->assertEquals('ERROR', $records[0]['level_name']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user