PHP Class Mongolid\Cursor\CursorTest

Inheritance: extends TestCas\TestCase
Show file Open project: leroy-merlin-br/mongolid

Public Methods

Method Description
tearDown ( )
testShouldCountDocuments ( )
testShouldGetCurrent ( )
testShouldGetCurrentUsingActiveRecordClasses ( )
testShouldGetFirst ( )
testShouldGetFirstWhenEmpty ( )
testShouldImplementKeyMethodFromIterator ( )
testShouldImplementNextMethodFromIterator ( )
testShouldImplementValidMethodFromIterator ( )
testShouldLimitDocumentQuantity ( )
testShouldRefreshTheCursor ( )
testShouldReturnAllResults ( )
testShouldReturnResultsToArray ( )
testShouldRewind ( )
testShouldRewindACursorThatHasAlreadyBeenInitialized ( )
testShouldSerializeAnActiveCursor ( )
testShouldSetNoCursorTimeoutToTrue ( )
testShouldSkipDocuments ( )
testShouldSortDocumentsOfCursor ( )
testShouldWrapMongoDriverCursorWithIteratoriterator ( )

Protected Methods

Method Description
getCursor ( $entitySchema = null, $collection = null, $command = 'find', $params = [[]], $driverCursor = null )
getDriverCollection ( ) Since the MongoDB\Collection is not serializable. This method will emulate an unserializable collection from mongoDb driver.

Method Details

getCursor() protected method

protected getCursor ( $entitySchema = null, $collection = null, $command = 'find', $params = [[]], $driverCursor = null )

getDriverCollection() protected method

Since the MongoDB\Collection is not serializable. This method will emulate an unserializable collection from mongoDb driver.
protected getDriverCollection ( )

tearDown() public method

public tearDown ( )

testShouldCountDocuments() public method

testShouldGetCurrent() public method

testShouldGetCurrentUsingActiveRecordClasses() public method

testShouldGetFirst() public method

public testShouldGetFirst ( )

testShouldGetFirstWhenEmpty() public method

testShouldImplementKeyMethodFromIterator() public method

testShouldImplementNextMethodFromIterator() public method

testShouldImplementValidMethodFromIterator() public method

testShouldLimitDocumentQuantity() public method

testShouldRefreshTheCursor() public method

testShouldReturnAllResults() public method

testShouldReturnResultsToArray() public method

testShouldRewind() public method

public testShouldRewind ( )

testShouldRewindACursorThatHasAlreadyBeenInitialized() public method

testShouldSerializeAnActiveCursor() public method

testShouldSetNoCursorTimeoutToTrue() public method

testShouldSkipDocuments() public method

testShouldSortDocumentsOfCursor() public method

testShouldWrapMongoDriverCursorWithIteratoriterator() public method