示例#1
0
 /**
  * @covers ::__construct
  * @covers ::beginBatch
  * @covers ::discardBatch
  * @expectedException Exception
  */
 public function testANewBatchCanBeStartedAfterABatchHasAlreadyBeenDiscarded()
 {
     $this->producer->beginBatch();
     $this->producer->discardBatch();
     $this->producer->beginBatch();
     $this->producer->getQueue('some-queue-name')->push(1);
     $consumer = $this->adapter_factory->getConsumer('some-queue-name');
     $consumer->consumeMessage(function () {
     });
 }
示例#2
0
 public function discardBatch()
 {
     $this->producer->discardBatch();
 }