/** * Asserts that an exception is thrown when trying to invoke a consumer * after closing it. * * @depends testClose * @expectedException BadMethodCallException */ public function testInvokingConsumerAfterClosing() { $consumer = new Consumer($this->queue, $this->loop, 1); $consumer->close(); $consumer(); }
public function close() { if (null !== $this->consumer) { $this->consumer->emit('close_amqp_consumer'); } }