RemoteServiceCommunicationTest.php 768 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\MessageQueue\UseCase;
  7. use Magento\TestModuleSynchronousAmqp\Api\ServiceInterface;
  8. class RemoteServiceCommunicationTest extends QueueTestCaseAbstract
  9. {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. protected $consumers = ['RemoteServiceTestConsumer'];
  14. public function testRemoteServiceCommunication()
  15. {
  16. $input = 'Input value';
  17. /** @var ServiceInterface $generatedRemoteService */
  18. $generatedRemoteService = $this->objectManager->get(ServiceInterface::class);
  19. $response = $generatedRemoteService->execute($input);
  20. $this->assertEquals($input . ' processed by RPC handler', $response);
  21. }
  22. }