@@ -266,7 +266,7 @@ public function testItSetupsTheConnectionWithDefaults()
266
266
);
267
267
268
268
$ amqpExchange ->expects ($ this ->once ())->method ('declareExchange ' );
269
- $ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with ('body ' , null , AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 2 ]);
269
+ $ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with ('body ' , null , \ AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 2 ]);
270
270
$ amqpQueue ->expects ($ this ->once ())->method ('declareQueue ' );
271
271
$ amqpQueue ->expects ($ this ->once ())->method ('bind ' )->with (self ::DEFAULT_EXCHANGE_NAME , null );
272
272
@@ -289,7 +289,7 @@ public function testItSetupsTheConnection()
289
289
$ factory ->method ('createQueue ' )->will ($ this ->onConsecutiveCalls ($ amqpQueue0 , $ amqpQueue1 ));
290
290
291
291
$ amqpExchange ->expects ($ this ->once ())->method ('declareExchange ' );
292
- $ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with ('body ' , 'routing_key ' , AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 2 ]);
292
+ $ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with ('body ' , 'routing_key ' , \ AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 2 ]);
293
293
$ amqpQueue0 ->expects ($ this ->once ())->method ('declareQueue ' );
294
294
$ amqpQueue0 ->expects ($ this ->exactly (2 ))->method ('bind ' )->withConsecutive (
295
295
[self ::DEFAULT_EXCHANGE_NAME , 'binding_key0 ' ],
@@ -326,7 +326,7 @@ public function testBindingArguments()
326
326
$ factory ->method ('createQueue ' )->willReturn ($ amqpQueue );
327
327
328
328
$ amqpExchange ->expects ($ this ->once ())->method ('declareExchange ' );
329
- $ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with ('body ' , null , AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 2 ]);
329
+ $ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with ('body ' , null , \ AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 2 ]);
330
330
$ amqpQueue ->expects ($ this ->once ())->method ('declareQueue ' );
331
331
$ amqpQueue ->expects ($ this ->exactly (1 ))->method ('bind ' )->withConsecutive (
332
332
[self ::DEFAULT_EXCHANGE_NAME , null , ['x-match ' => 'all ' ]]
@@ -439,7 +439,7 @@ public function testItDelaysTheMessage()
439
439
$ delayQueue ->expects ($ this ->once ())->method ('declareQueue ' );
440
440
$ delayQueue ->expects ($ this ->once ())->method ('bind ' )->with ('delays ' , 'delay_messages__5000 ' );
441
441
442
- $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay_messages__5000 ' , AMQP_NOPARAM , ['headers ' => ['x-some-headers ' => 'foo ' ], 'delivery_mode ' => 2 ]);
442
+ $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay_messages__5000 ' , \ AMQP_NOPARAM , ['headers ' => ['x-some-headers ' => 'foo ' ], 'delivery_mode ' => 2 ]);
443
443
444
444
$ connection = Connection::fromDsn ('amqp://localhost ' , [], $ factory );
445
445
$ connection ->publish ('{} ' , ['x-some-headers ' => 'foo ' ], 5000 );
@@ -481,7 +481,7 @@ public function testItDelaysTheMessageWithADifferentRoutingKeyAndTTLs()
481
481
$ delayQueue ->expects ($ this ->once ())->method ('declareQueue ' );
482
482
$ delayQueue ->expects ($ this ->once ())->method ('bind ' )->with ('delays ' , 'delay_messages__120000 ' );
483
483
484
- $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay_messages__120000 ' , AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 2 ]);
484
+ $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay_messages__120000 ' , \ AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 2 ]);
485
485
$ connection ->publish ('{} ' , [], 120000 );
486
486
}
487
487
@@ -513,10 +513,10 @@ public function testAmqpStampHeadersAreUsed()
513
513
$ amqpExchange = $ this ->createMock (\AMQPExchange::class)
514
514
);
515
515
516
- $ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with ('body ' , null , AMQP_NOPARAM , ['headers ' => ['Foo ' => 'X ' , 'Bar ' => 'Y ' ], 'delivery_mode ' => 2 ]);
516
+ $ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with ('body ' , null , \ AMQP_NOPARAM , ['headers ' => ['Foo ' => 'X ' , 'Bar ' => 'Y ' ], 'delivery_mode ' => 2 ]);
517
517
518
518
$ connection = Connection::fromDsn ('amqp://localhost ' , [], $ factory );
519
- $ connection ->publish ('body ' , ['Foo ' => 'X ' ], 0 , new AmqpStamp (null , AMQP_NOPARAM , ['headers ' => ['Bar ' => 'Y ' ]]));
519
+ $ connection ->publish ('body ' , ['Foo ' => 'X ' ], 0 , new AmqpStamp (null , \ AMQP_NOPARAM , ['headers ' => ['Bar ' => 'Y ' ]]));
520
520
}
521
521
522
522
public function testAmqpStampDelireryModeIsUsed ()
@@ -528,10 +528,10 @@ public function testAmqpStampDelireryModeIsUsed()
528
528
$ amqpExchange = $ this ->createMock (\AMQPExchange::class)
529
529
);
530
530
531
- $ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with ('body ' , null , AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 1 ]);
531
+ $ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with ('body ' , null , \ AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 1 ]);
532
532
533
533
$ connection = Connection::fromDsn ('amqp://localhost ' , [], $ factory );
534
- $ connection ->publish ('body ' , [], 0 , new AmqpStamp (null , AMQP_NOPARAM , ['delivery_mode ' => 1 ]));
534
+ $ connection ->publish ('body ' , [], 0 , new AmqpStamp (null , \ AMQP_NOPARAM , ['delivery_mode ' => 1 ]));
535
535
}
536
536
537
537
public function testItCanPublishWithTheDefaultRoutingKey ()
@@ -600,7 +600,7 @@ public function testItDelaysTheMessageWithTheInitialSuppliedRoutingKeyAsArgument
600
600
$ delayQueue ->expects ($ this ->once ())->method ('declareQueue ' );
601
601
$ delayQueue ->expects ($ this ->once ())->method ('bind ' )->with ('delays ' , 'delay_messages_routing_key_120000 ' );
602
602
603
- $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay_messages_routing_key_120000 ' , AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 2 ]);
603
+ $ delayExchange ->expects ($ this ->once ())->method ('publish ' )->with ('{} ' , 'delay_messages_routing_key_120000 ' , \ AMQP_NOPARAM , ['headers ' => [], 'delivery_mode ' => 2 ]);
604
604
$ connection ->publish ('{} ' , [], 120000 , new AmqpStamp ('routing_key ' ));
605
605
}
606
606
@@ -616,12 +616,12 @@ public function testItCanPublishWithCustomFlagsAndAttributes()
616
616
$ amqpExchange ->expects ($ this ->once ())->method ('publish ' )->with (
617
617
'body ' ,
618
618
'routing_key ' ,
619
- AMQP_IMMEDIATE ,
619
+ \ AMQP_IMMEDIATE ,
620
620
['delivery_mode ' => 2 , 'headers ' => ['type ' => DummyMessage::class]]
621
621
);
622
622
623
623
$ connection = Connection::fromDsn ('amqp://localhost ' , [], $ factory );
624
- $ connection ->publish ('body ' , ['type ' => DummyMessage::class], 0 , new AmqpStamp ('routing_key ' , AMQP_IMMEDIATE , ['delivery_mode ' => 2 ]));
624
+ $ connection ->publish ('body ' , ['type ' => DummyMessage::class], 0 , new AmqpStamp ('routing_key ' , \ AMQP_IMMEDIATE , ['delivery_mode ' => 2 ]));
625
625
}
626
626
}
627
627
0 commit comments