->disableOriginalConstructor()
->getMock();
- $entryRepo->expects($this->exactly(24))
+ $entryRepo->expects($this->exactly(6))
->method('findByUrlAndUserId')
->will($this->onConsecutiveCalls(false, true, false));
$res = $wallabagV2Import->import();
$this->assertTrue($res);
- $this->assertEquals(['skipped' => 22, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary());
+ $this->assertEquals(['skipped' => 4, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary());
}
public function testImportAndMarkAllAsRead()
->getMock();
$producer
- ->expects($this->exactly(24))
+ ->expects($this->exactly(6))
->method('publish');
$wallabagV2Import->setProducer($producer);
$res = $wallabagV2Import->setMarkAsRead(true)->import();
$this->assertTrue($res);
- $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 24], $wallabagV2Import->getSummary());
+ $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 6], $wallabagV2Import->getSummary());
}
public function testImportWithRedis()
$res = $wallabagV2Import->setMarkAsRead(true)->import();
$this->assertTrue($res);
- $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 24], $wallabagV2Import->getSummary());
+ $this->assertEquals(['skipped' => 0, 'imported' => 0, 'queued' => 6], $wallabagV2Import->getSummary());
$this->assertNotEmpty($redisMock->lpop('wallabag_v2'));
}
->disableOriginalConstructor()
->getMock();
- $entryRepo->expects($this->exactly(24))
+ $entryRepo->expects($this->exactly(6))
->method('findByUrlAndUserId')
->will($this->onConsecutiveCalls(false, true, false));
$res = $wallabagV2Import->import();
$this->assertTrue($res);
- $this->assertEquals(['skipped' => 22, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary());
+ $this->assertEquals(['skipped' => 4, 'imported' => 2, 'queued' => 0], $wallabagV2Import->getSummary());
}
}