Add disableContentUpdate import option

This commit also decouples the "import" and "update" functions inside
ContentProxy. If a content array is available, it must be passed to the
new importEntry method.
This commit is contained in:
Jerome Charaoui
2016-12-07 15:16:49 -05:00
committed by Jeremy Benoist
parent 1c5da417e4
commit d0e9b3d640
11 changed files with 118 additions and 60 deletions

View File

@ -282,7 +282,7 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
$this->contentProxy
->expects($this->once())
->method('updateEntry')
->method('importEntry')
->willReturn($entry);
$pocketImport->setClient($client);
@ -377,7 +377,7 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
$this->contentProxy
->expects($this->exactly(2))
->method('updateEntry')
->method('importEntry')
->willReturn($entry);
$pocketImport->setClient($client);
@ -450,7 +450,7 @@ JSON;
$this->contentProxy
->expects($this->never())
->method('updateEntry');
->method('importEntry');
$producer = $this->getMockBuilder('OldSound\RabbitMqBundle\RabbitMq\Producer')
->disableOriginalConstructor()
@ -536,7 +536,7 @@ JSON;
$this->contentProxy
->expects($this->never())
->method('updateEntry');
->method('ImportEntry');
$factory = new RedisMockFactory();
$redisMock = $factory->getAdapter('Predis\Client', true);
@ -621,7 +621,7 @@ JSON;
$this->contentProxy
->expects($this->once())
->method('updateEntry')
->method('importEntry')
->will($this->throwException(new \Exception()));
$pocketImport->setClient($client);