Пример #1
0
 public function __construct(ChannelInterface $channel, LoopInterface $loop)
 {
     $this->channel = $channel;
     $this->loop = $loop;
     $this->getLoop()->addReadStream($channel->getConnection()->getSocket(), [$this, 'wait']);
 }
Пример #2
0
 function it_consumes_a_queue(ChannelInterface $channel)
 {
     $queue = 'test';
     $channel->basic_consume($queue, null, false, false, false, false, [$this, 'handleMessage'])->shouldBeCalled();
     $this->consume($queue);
 }