add tests

This commit is contained in:
Thomas Citharel
2016-02-11 15:48:20 +01:00
parent da0a9e01e9
commit eaf9dad777
5 changed files with 75 additions and 12 deletions

View File

@ -57,7 +57,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
->disableOriginalConstructor()
->getMock();
$entryRepo->expects($this->exactly(2))
$entryRepo->expects($this->exactly(3))
->method('findByUrlAndUserId')
->will($this->onConsecutiveCalls(false, true, false));
@ -69,7 +69,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
$res = $wallabagV2Import->import();
$this->assertTrue($res);
$this->assertEquals(['skipped' => 1, 'imported' => 1], $wallabagV2Import->getSummary());
$this->assertEquals(['skipped' => 1, 'imported' => 2], $wallabagV2Import->getSummary());
}
public function testImportBadFile()