/** * {@inheritdoc} */ public function call(Identity $identity, Request $request) { $url = Url::parse($identity->getUrl(['amqps', 'amqp'])); $reply = $this->invoker->call($this->createRequest($request), $url->getQueryParameter('exchange', $this->exchange), $request->getMethod()); return new 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('publish'); $this->invoker->call($message, '', '')->resolve(10); }