1st draft for rabbitMQ

This commit is contained in:
Nicolas Lœuillet
2016-01-15 08:24:32 +01:00
committed by Jeremy Benoist
parent 59758d8fe5
commit 56c778b415
9 changed files with 173 additions and 11 deletions

View File

@ -27,8 +27,9 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
protected $em;
protected $contentProxy;
protected $logHandler;
protected $producer;
private function getPocketImport($consumerKey = 'ConsumerKey')
private function getPocketImport($consumerKey = 'ConsumerKey', $rabbitMQ = false)
{
$this->user = new User();
@ -65,11 +66,17 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
->with('pocket_consumer_key')
->willReturn($consumerKey);
$this->producer = $this->getMockBuilder('OldSound\RabbitMqBundle\RabbitMq\Producer')
->disableOriginalConstructor()
->getMock();
$pocket = new PocketImportMock(
$this->tokenStorage,
$this->em,
$this->contentProxy,
$config
$config,
$rabbitMQ,
$this->producer
);
$this->logHandler = new TestHandler();