DominionEnterprises\Mongo\QueueTest::ackSendWithHighEarliestGet PHP Method

ackSendWithHighEarliestGet() public method

    public function ackSendWithHighEarliestGet()
    {
        $this->queue->send([]);
        $messageToAck = $this->queue->get([], PHP_INT_MAX, 0);
        $this->queue->ackSend($messageToAck, [], PHP_INT_MAX);
        $expected = ['payload' => [], 'running' => false, 'resetTimestamp' => Queue::MONGO_INT32_MAX, 'earliestGet' => Queue::MONGO_INT32_MAX, 'priority' => 0.0];
        $message = $this->collection->findOne();
        $this->assertLessThanOrEqual(time(), $message['created']->toDateTime()->getTimestamp());
        $this->assertGreaterThan(time() - 10, $message['created']->toDateTime()->getTimestamp());
        unset($message['_id'], $message['created']);
        $message['resetTimestamp'] = (int) $message['resetTimestamp']->__toString();
        $message['earliestGet'] = (int) $message['earliestGet']->__toString();
        $this->assertSame($expected, $message);
    }