@@ -213,39 +213,38 @@ public function testClientConsumeMessagesFromExplicitlySetQueue(array $enqueueCo
213213 $ this ->assertEquals ($ expectedBody , $ processor ->message ->getBody ());
214214 }
215215
216- // /**
217- // * @dataProvider provideEnqueueConfigs
218- // */
219- // public function testTransportConsumeMessagesCommandShouldConsumeMessage(array $enqueueConfig)
220- // {
221- // $this->customSetUp($enqueueConfig);
222- //
223- // if ($this->getTestQueue() instanceof StompDestination) {
224- // $this->markTestSkipped('The test fails with the exception Stomp\Exception\ErrorFrameException: Error "precondition_failed". '.
225- // 'It happens because of the destination options are different from the one used while creating the dest. Nothing to do about it'
226- // );
227- // }
228- //
229- // $expectedBody = __METHOD__.time();
230- //
231- // $command = static::$container->get('test_enqueue.client.default.consume_messages_command');
232- // $command->setContainer(static::$container);
233- // $processor = static::$container->get('test.message.processor');
234- //
235- // $this->getMessageProducer()->sendEvent(TestProcessor::TOPIC, $expectedBody);
236- //
237- // $tester = new CommandTester($command);
238- // $tester->execute([
239- // '--message-limit' => 1,
240- // '--time-limit' => '+2sec',
241- // '--receive-timeout' => 1000,
242- // '--queue' => [$this->getTestQueue()->getQueueName()],
243- // 'processor-service' => 'test.message.processor',
244- // ]);
245- //
246- // $this->assertInstanceOf(Message::class, $processor->message);
247- // $this->assertEquals($expectedBody, $processor->message->getBody());
248- // }
216+ /**
217+ * @dataProvider provideEnqueueConfigs
218+ */
219+ public function testTransportConsumeMessagesCommandShouldConsumeMessage (array $ enqueueConfig )
220+ {
221+ $ this ->customSetUp ($ enqueueConfig );
222+
223+ if ($ this ->getTestQueue () instanceof StompDestination) {
224+ $ this ->markTestSkipped ('The test fails with the exception Stomp\Exception\ErrorFrameException: Error "precondition_failed". ' .
225+ 'It happens because of the destination options are different from the one used while creating the dest. Nothing to do about it '
226+ );
227+ }
228+
229+ $ expectedBody = __METHOD__ .time ();
230+
231+ $ command = static ::$ container ->get ('test_enqueue.consume_command ' );
232+ $ processor = static ::$ container ->get ('test.message.processor ' );
233+
234+ $ this ->getMessageProducer ()->sendEvent (TestProcessor::TOPIC , $ expectedBody );
235+
236+ $ tester = new CommandTester ($ command );
237+ $ tester ->execute ([
238+ '--message-limit ' => 1 ,
239+ '--time-limit ' => '+2sec ' ,
240+ '--receive-timeout ' => 1000 ,
241+ 'processor ' => 'test.message.processor ' ,
242+ 'queues ' => [$ this ->getTestQueue ()->getQueueName ()],
243+ ]);
244+
245+ $ this ->assertInstanceOf (Message::class, $ processor ->message );
246+ $ this ->assertEquals ($ expectedBody , $ processor ->message ->getBody ());
247+ }
249248
250249 /**
251250 * @return string
0 commit comments