public function testCallNotEnqueuedIfThereIsAnError() { $message = $this->createMessage(); $exchange = 'foo'; $routingKey = 'bar'; $this->channel->expects($this->once())->method('basic_publish')->willThrowException(new \Exception('expected exception')); try { $this->invoker->call($message, $exchange, $routingKey); } catch (\Exception $e) { } $this->assertEmpty($this->invoker->getUnresolved()); }