mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-23 17:41:01 +00:00
commit
ca8d61b958
4 changed files with 305 additions and 2 deletions
|
@ -258,6 +258,7 @@ class PocketImport implements ImportInterface
|
|||
// flush every 20 entries
|
||||
if (($i % 20) === 0) {
|
||||
$this->em->flush();
|
||||
$this->em->clear($entry);
|
||||
}
|
||||
++$i;
|
||||
}
|
||||
|
|
|
@ -185,6 +185,7 @@ abstract class WallabagImport implements ImportInterface
|
|||
// flush every 20 entries
|
||||
if (($i % 20) === 0) {
|
||||
$this->em->flush();
|
||||
$this->em->clear($entry);
|
||||
}
|
||||
++$i;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$entryRepo->expects($this->exactly(3))
|
||||
$entryRepo->expects($this->exactly(24))
|
||||
->method('findByUrlAndUserId')
|
||||
->will($this->onConsecutiveCalls(false, true, false));
|
||||
|
||||
|
@ -75,7 +75,7 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase
|
|||
$res = $wallabagV2Import->import();
|
||||
|
||||
$this->assertTrue($res);
|
||||
$this->assertEquals(['skipped' => 1, 'imported' => 2], $wallabagV2Import->getSummary());
|
||||
$this->assertEquals(['skipped' => 22, 'imported' => 2], $wallabagV2Import->getSummary());
|
||||
}
|
||||
|
||||
public function testImportAndMarkAllAsRead()
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue