public function __construct(ChannelInterface $channel, LoopInterface $loop) { $this->channel = $channel; $this->loop = $loop; $this->getLoop()->addReadStream($channel->getConnection()->getSocket(), [$this, 'wait']); }
function it_consumes_a_queue(ChannelInterface $channel) { $queue = 'test'; $channel->basic_consume($queue, null, false, false, false, false, [$this, 'handleMessage'])->shouldBeCalled(); $this->consume($queue); }