->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([]);
+
$pocket = new PocketImport(
$this->em,
$this->contentProxy
"status": 1,
"list": {
"229279689": {
+ "status": "1",
+ "favorite": "1",
"resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview"
}
}
$res = $pocketImport->import();
$this->assertTrue($res);
- $this->assertEquals(['skipped' => 1, 'imported' => 0, 'queued' => 0], $pocketImport->getSummary());
+ $this->assertEquals(['skipped' => 0, 'imported' => 1, 'queued' => 0], $pocketImport->getSummary());
}
}