@@ -326,16 +326,16 @@ public function testItDelaysTheMessage()
326326 $ delayExchange ->expects ($ this ->once ())->method ('declareExchange ' );
327327 $ delayExchange ->method ('getName ' )->willReturn ('delay ' );
328328
329- $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue_5000 ' );
329+ $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue__5000 ' );
330330 $ delayQueue ->expects ($ this ->once ())->method ('setArguments ' )->with ([
331331 'x-message-ttl ' => 5000 ,
332332 'x-dead-letter-exchange ' => 'messages ' ,
333333 ]);
334334
335335 $ 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 ' );
337337
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 ' ]]);
339339
340340 $ connection = Connection::fromDsn ('amqp://localhost/%2f/messages ' , [], $ factory );
341341 $ connection ->publish ('{} ' , ['x-some-headers ' => 'foo ' ], 5000 );
@@ -371,22 +371,22 @@ public function testItDelaysTheMessageWithADifferentRoutingKeyAndTTLs()
371371
372372 $ connection = Connection::fromDsn ('amqp://localhost/%2f/messages ' , $ connectionOptions , $ factory );
373373
374- $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue_120000 ' );
374+ $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue__120000 ' );
375375 $ delayQueue ->expects ($ this ->once ())->method ('setArguments ' )->with ([
376376 'x-message-ttl ' => 120000 ,
377377 'x-dead-letter-exchange ' => 'messages ' ,
378378 ]);
379379
380380 $ 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 ' );
382382
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 ' => []]);
384384 $ connection ->publish ('{} ' , [], 120000 );
385385 }
386386
387387 /**
388388 * @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":"********"})
390390 */
391391 public function testObfuscatePasswordInDsn ()
392392 {
@@ -465,7 +465,7 @@ public function testItDelaysTheMessageWithTheInitialSuppliedRoutingKeyAsArgument
465465
466466 $ connection = Connection::fromDsn ('amqp://localhost/%2f/messages ' , $ connectionOptions , $ factory );
467467
468- $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue_120000 ' );
468+ $ delayQueue ->expects ($ this ->once ())->method ('setName ' )->with ('delay_queue_routing_key_120000 ' );
469469 $ delayQueue ->expects ($ this ->once ())->method ('setArguments ' )->with ([
470470 'x-message-ttl ' => 120000 ,
471471 'x-dead-letter-exchange ' => 'messages ' ,
@@ -476,9 +476,9 @@ public function testItDelaysTheMessageWithTheInitialSuppliedRoutingKeyAsArgument
476476 );
477477
478478 $ 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 ' );
480480
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 ' => []]);
482482 $ connection ->publish ('{} ' , [], 120000 , new AmqpStamp ('routing_key ' ));
483483 }
484484
0 commit comments