public function testConfirmMode() { $client = new Client(); $client->connect(); $channel = $client->channel(); $deliveryTag = null; $channel->confirmSelect(function (MethodBasicAckFrame $frame) use(&$deliveryTag, $client) { if ($frame->deliveryTag === $deliveryTag) { $deliveryTag = null; $client->stop(); } }); $deliveryTag = $channel->publish("."); $client->run(1); $this->assertNull($deliveryTag); }