/** * {@inheritdoc} */ public function call(LocationInterface $location, Request $request) { $reply = $this->invoker->call($this->createMessage($location, $request), $this->exchange, $request->getTopic()); return new Response\Promise(function ($timeout) use($reply) { return $this->createResponse($reply->resolve($timeout)); }, function () use($reply) { $this->invoker->dequeue($reply); }); }
public function testCallReplyResolving() { $message = $this->createMessage(); $this->channel->expects($this->once())->method('basic_publish'); $this->invoker->call($message, '', '')->resolve(10); }