DominionEnterprises\Mongo\QueueTest::ackSendWithEarliestGet PHP Method

ackSendWithEarliestGet() public method

Verify earliestGet with ackSend.
public ackSendWithEarliestGet ( ) : void
return void
    public function ackSendWithEarliestGet()
    {
        $message = ['key1' => 0, 'key2' => true];
        $this->queue->send($message);
        $result = $this->queue->get([], PHP_INT_MAX, 0);
        $this->assertSame($message['key1'], $result['key1']);
        $this->assertSame($message['key2'], $result['key2']);
        $this->queue->ackSend($result, ['key1' => 1, 'key2' => 2], strtotime('+ 1 day'));
        $actual = $this->queue->get([], PHP_INT_MAX, 0);
        $this->assertNull($actual);
    }