DominionEnterprises\Mongo\QueueTest::ensureIndexCannotBeCreatedAfterFiveAttempts PHP Method

ensureIndexCannotBeCreatedAfterFiveAttempts() public method

Verifies the behaviour of the Queue when it cannot create an index after 5 attempts.
    public function ensureIndexCannotBeCreatedAfterFiveAttempts()
    {
        $mockCollection = $this->getMockBuilder('\\MongoDB\\Collection')->disableOriginalConstructor()->getMock();
        $mockCollection->method('listIndexes')->willReturn([]);
        $queue = new Queue($mockCollection);
        $queue->ensureCountIndex(['type' => 1], false);
    }