DominionEnterprises\Mongo\QueueTest::ensureIndexCannotBeCreatedAfterFiveAttempts PHP 메소드

ensureIndexCannotBeCreatedAfterFiveAttempts() 공개 메소드

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);
    }