Mongolid\Cursor\CacheableCursorTest::testShouldGetCursorFromPreviousIteration PHP Method

testShouldGetCursorFromPreviousIteration() public method

    public function testShouldGetCursorFromPreviousIteration()
    {
        // Arrange
        $documentsFromDb = new ArrayIterator([['name' => 'joe'], ['name' => 'doe']]);
        $cursor = $this->getCachableCursor();
        $this->setProtected($cursor, 'documents', $documentsFromDb);
        // Assert
        $this->assertEquals(new ArrayIterator($documentsFromDb), $this->callProtected($cursor, 'getCursor'));
    }