Completed
Push — master ( 5c96bd...157b73 )
by Mihai
03:42
created
Tests/RabbitMq/ConsumerTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $amqpChannel = $this->prepareAMQPChannel();
50 50
         $consumer = $this->getConsumer($amqpConnection, $amqpChannel);
51 51
 
52
-        $callbackFunction = function () use ($processFlag) {
52
+        $callbackFunction = function() use ($processFlag) {
53 53
             return $processFlag;
54 54
         }; // Create a callback function with a return value set by the data provider.
55 55
         $consumer->setCallback($callbackFunction);
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
         if ($expectedMethod) {
63 63
             $amqpChannel->expects($this->any())
64 64
                 ->method('basic_reject')
65
-                ->will($this->returnCallback(function ($delivery_tag, $requeue) use ($expectedMethod, $expectedRequeue) {
65
+                ->will($this->returnCallback(function($delivery_tag, $requeue) use ($expectedMethod, $expectedRequeue) {
66 66
                     Assert::assertSame($expectedMethod, 'basic_reject'); // Check if this function should be called.
67 67
                     Assert::assertSame($requeue, $expectedRequeue); // Check if the message should be requeued.
68 68
                 }));
69 69
 
70 70
             $amqpChannel->expects($this->any())
71 71
                 ->method('basic_ack')
72
-                ->will($this->returnCallback(function ($delivery_tag) use ($expectedMethod) {
72
+                ->will($this->returnCallback(function($delivery_tag) use ($expectedMethod) {
73 73
                     Assert::assertSame($expectedMethod, 'basic_ack'); // Check if this function should be called.
74 74
                 }));
75 75
         } else {
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             ->with(null, false, $consumer->getIdleTimeout())
175 175
             ->will(
176 176
                 $this->returnCallback(
177
-                    function () use ($amqpChannel) {
177
+                    function() use ($amqpChannel) {
178 178
                         /** remove an element on each loop like ... simulate an ACK */
179 179
                         array_splice($amqpChannel->callbacks, 0, 1);
180 180
                     })
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
         $eventDispatcher->expects($this->at(1))
260 260
             ->method('dispatch')
261 261
             ->with($this->isInstanceOf(OnIdleEvent::class), OnIdleEvent::NAME)
262
-            ->willReturnCallback(function (OnIdleEvent $event, $eventName) {
262
+            ->willReturnCallback(function(OnIdleEvent $event, $eventName) {
263 263
                 $event->setForceStop(false);
264 264
 
265 265
                 return $event;
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         $eventDispatcher->expects($this->at(3))
269 269
             ->method('dispatch')
270 270
             ->with($this->isInstanceOf(OnIdleEvent::class), OnIdleEvent::NAME)
271
-            ->willReturnCallback(function (OnIdleEvent $event, $eventName) {
271
+            ->willReturnCallback(function(OnIdleEvent $event, $eventName) {
272 272
                 $event->setForceStop(true);
273 273
 
274 274
                 return $event;
Please login to merge, or discard this patch.