type: topic
queue_options:
name: 'wallabag.import.pocket'
- callback: wallabag_import.consumer.ampq.pocket
+ callback: wallabag_import.consumer.amqp.pocket
import_readability:
connection: default
exchange_options:
type: topic
queue_options:
name: 'wallabag.import.readability'
- callback: wallabag_import.consumer.ampq.readability
+ callback: wallabag_import.consumer.amqp.readability
import_wallabag_v1:
connection: default
exchange_options:
type: topic
queue_options:
name: 'wallabag.import.wallabag_v1'
- callback: wallabag_import.consumer.ampq.wallabag_v1
+ callback: wallabag_import.consumer.amqp.wallabag_v1
import_wallabag_v2:
connection: default
exchange_options:
type: topic
queue_options:
name: 'wallabag.import.wallabag_v2'
- callback: wallabag_import.consumer.ampq.wallabag_v2
+ callback: wallabag_import.consumer.amqp.wallabag_v2
use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface;
use PhpAmqpLib\Message\AMQPMessage;
-class AMPQEntryConsumer extends AbstractConsumer implements ConsumerInterface
+class AMQPEntryConsumer extends AbstractConsumer implements ConsumerInterface
{
/**
* {@inheritdoc}
# RabbitMQ stuff
services:
- wallabag_import.consumer.ampq.pocket:
- class: Wallabag\ImportBundle\Consumer\AMPQEntryConsumer
+ wallabag_import.consumer.amqp.pocket:
+ class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
- "@doctrine.orm.entity_manager"
- "@wallabag_user.user_repository"
- "@wallabag_import.pocket.import"
- "@logger"
- wallabag_import.consumer.ampq.readability:
- class: Wallabag\ImportBundle\Consumer\AMPQEntryConsumer
+ wallabag_import.consumer.amqp.readability:
+ class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
- "@doctrine.orm.entity_manager"
- "@wallabag_user.user_repository"
- "@wallabag_import.readability.import"
- "@logger"
- wallabag_import.consumer.ampq.wallabag_v1:
- class: Wallabag\ImportBundle\Consumer\AMPQEntryConsumer
+ wallabag_import.consumer.amqp.wallabag_v1:
+ class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
- "@doctrine.orm.entity_manager"
- "@wallabag_user.user_repository"
- "@wallabag_import.wallabag_v1.import"
- "@logger"
- wallabag_import.consumer.ampq.wallabag_v2:
- class: Wallabag\ImportBundle\Consumer\AMPQEntryConsumer
+ wallabag_import.consumer.amqp.wallabag_v2:
+ class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
- "@doctrine.orm.entity_manager"
- "@wallabag_user.user_repository"
namespace Tests\Wallabag\ImportBundle\Consumer\AMQP;
-use Wallabag\ImportBundle\Consumer\AMPQEntryConsumer;
+use Wallabag\ImportBundle\Consumer\AMQPEntryConsumer;
use PhpAmqpLib\Message\AMQPMessage;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\Entry;
-class AMPQEntryConsumerTest extends \PHPUnit_Framework_TestCase
+class AMQPEntryConsumerTest extends \PHPUnit_Framework_TestCase
{
public function testMessageOk()
{
->with(json_decode($body, true))
->willReturn($entry);
- $consumer = new AMPQEntryConsumer(
+ $consumer = new AMQPEntryConsumer(
$em,
$userRepository,
$import
->disableOriginalConstructor()
->getMock();
- $consumer = new AMPQEntryConsumer(
+ $consumer = new AMQPEntryConsumer(
$em,
$userRepository,
$import
->with(json_decode($body, true))
->willReturn(null);
- $consumer = new AMPQEntryConsumer(
+ $consumer = new AMQPEntryConsumer(
$em,
$userRepository,
$import