@@ -326,16 +326,16 @@ public function testItDelaysTheMessage()
326
326
$ delayExchange ->expects ($ this ->once ())->method ('declareExchange ' );
327
327
$ delayExchange ->method ('getName ' )->willReturn ('delay ' );
328
328
329
- $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue_5000 ' );
329
+ $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue__5000 ' );
330
330
$ delayQueue ->expects ($ this ->once ())->method ('setArguments ' )->with ([
331
331
'x-message-ttl ' => 5000 ,
332
332
'x-dead-letter-exchange ' => 'messages ' ,
333
333
]);
334
334
335
335
$ delayQueue ->expects ($ this ->once ())->method ('declareQueue ' );
336
- $ delayQueue ->expects ($ this ->once ())->method ('bind ' )->with ('delay ' , 'delay_5000 ' );
336
+ $ delayQueue ->expects ($ this ->once ())->method ('bind ' )->with ('delay ' , 'delay__5000 ' );
337
337
338
- $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay_5000 ' , AMQP_NOPARAM , ['headers ' => ['x-some-headers ' => 'foo ' ]]);
338
+ $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay__5000 ' , AMQP_NOPARAM , ['headers ' => ['x-some-headers ' => 'foo ' ]]);
339
339
340
340
$ connection = Connection::fromDsn ('amqp://localhost/%2f/messages ' , [], $ factory );
341
341
$ connection ->publish ('{} ' , ['x-some-headers ' => 'foo ' ], 5000 );
@@ -371,22 +371,22 @@ public function testItDelaysTheMessageWithADifferentRoutingKeyAndTTLs()
371
371
372
372
$ connection = Connection::fromDsn ('amqp://localhost/%2f/messages ' , $ connectionOptions , $ factory );
373
373
374
- $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue_120000 ' );
374
+ $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue__120000 ' );
375
375
$ delayQueue ->expects ($ this ->once ())->method ('setArguments ' )->with ([
376
376
'x-message-ttl ' => 120000 ,
377
377
'x-dead-letter-exchange ' => 'messages ' ,
378
378
]);
379
379
380
380
$ delayQueue ->expects ($ this ->once ())->method ('declareQueue ' );
381
- $ delayQueue ->expects ($ this ->once ())->method ('bind ' )->with ('delay ' , 'delay_120000 ' );
381
+ $ delayQueue ->expects ($ this ->once ())->method ('bind ' )->with ('delay ' , 'delay__120000 ' );
382
382
383
- $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay_120000 ' , AMQP_NOPARAM , ['headers ' => []]);
383
+ $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay__120000 ' , AMQP_NOPARAM , ['headers ' => []]);
384
384
$ connection ->publish ('{} ' , [], 120000 );
385
385
}
386
386
387
387
/**
388
388
* @expectedException \AMQPException
389
- * @expectedExceptionMessage Could not connect to the AMQP server. Please verify the provided DSN. ({"delay":{"routing_key_pattern":"delay_%delay%","exchange_name":"delay","queue_name_pattern":"delay_queue_%delay%"},"host":"localhost","port":5672,"vhost":"\/","login":"user","password":"********"})
389
+ * @expectedExceptionMessage Could not connect to the AMQP server. Please verify the provided DSN. ({"delay":{"routing_key_pattern":"delay_%routing_key%_% delay%","exchange_name":"delay","queue_name_pattern":"delay_queue_%routing_key%_ %delay%"},"host":"localhost","port":5672,"vhost":"\/","login":"user","password":"********"})
390
390
*/
391
391
public function testObfuscatePasswordInDsn ()
392
392
{
@@ -465,7 +465,7 @@ public function testItDelaysTheMessageWithTheInitialSuppliedRoutingKeyAsArgument
465
465
466
466
$ connection = Connection::fromDsn ('amqp://localhost/%2f/messages ' , $ connectionOptions , $ factory );
467
467
468
- $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue_120000 ' );
468
+ $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue_routing_key_120000 ' );
469
469
$ delayQueue ->expects ($ this ->once ())->method ('setArguments ' )->with ([
470
470
'x-message-ttl ' => 120000 ,
471
471
'x-dead-letter-exchange ' => 'messages ' ,
@@ -476,9 +476,9 @@ public function testItDelaysTheMessageWithTheInitialSuppliedRoutingKeyAsArgument
476
476
);
477
477
478
478
$ delayQueue ->expects ($ this ->once ())->method ('declareQueue ' );
479
- $ delayQueue ->expects ($ this ->once ())->method ('bind ' )->with ('delay ' , 'delay_120000 ' );
479
+ $ delayQueue ->expects ($ this ->once ())->method ('bind ' )->with ('delay ' , 'delay_routing_key_120000 ' );
480
480
481
- $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay_120000 ' , AMQP_NOPARAM , ['headers ' => []]);
481
+ $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay_routing_key_120000 ' , AMQP_NOPARAM , ['headers ' => []]);
482
482
$ connection ->publish ('{} ' , [], 120000 , new AmqpStamp ('routing_key ' ));
483
483
}
484
484
0 commit comments