WatchFunctionalTest
extends FunctionalTestCase
in package
Base class for Operation functional tests.
Tags
Table of Contents
- INTERRUPTED = 11601
- NOT_PRIMARY = 10107
- $manager : Manager
- $configuredFailPoints : array<string|int, mixed>
- $defaultOptions : array<string|int, mixed>
- $wireVersionForStartAtOperationTime : int
- assertMatchesDocument() : void
- Asserts that a document has expected values for some fields.
- assertSameDocument() : void
- Asserts that a document has expected values for all fields.
- assertSameDocuments() : void
- configureFailPoint() : void
- Configure a fail point for the test.
- createTestClient() : Client
- createTestManager() : Manager
- dataDescription() : string
- Compatibility method as PHPUnit 9 no longer includes this method.
- getUri() : string
- Return the connection URI.
- provideInvalidArrayValues() : mixed
- provideInvalidDocumentValues() : mixed
- provideTypeMapOptionsAndExpectedChangeDocument() : mixed
- setUp() : void
- tearDown() : void
- testErrorDuringAggregateCommandDoesNotCauseResume() : void
- Prose test 4: "ChangeStream will not attempt to resume on any error encountered while executing an aggregate command."
- testGetResumeToken() : void
- Prose test 1: "ChangeStream must continuously track the last seen resumeToken"
- testGetResumeTokenReturnsOriginalResumeTokenOnEmptyBatch() : void
- Prose test 12 For a ChangeStream under these conditions: - Running against a server <4.0.7.
- testGetResumeTokenWithPostBatchResumeToken() : void
- Prose test 1: "ChangeStream must continuously track the last seen resumeToken"
- testInitialCursorIsNotClosed() : void
- Prose test 7: "Ensure that a cursor returned from an aggregate command with a cursor id and an initial empty batch is not closed on the driver side."
- testKey() : void
- testMaxAwaitTimeMS() : void
- testNextAdvancesKey() : void
- testNextResumesAfterConnectionException() : void
- testNoChangeAfterResumeBeforeInsert() : void
- testNonEmptyPipeline() : void
- testOriginalReadPreferenceIsPreservedOnResume() : void
- Prose test 6: "ChangeStream will perform server selection before attempting to resume, using initial readPreference"
- testResumeAfterOption() : void
- testResumeBeforeReceivingAnyResultsIncludesPostBatchResumeToken() : void
- testResumeBeforeReceivingAnyResultsIncludesStartAtOperationTime() : void
- Prose test 9: "$changeStream stage for ChangeStream against a server >=4.0 and <4.0.7 that has not received any results yet MUST include a startAtOperationTime option when resuming a changestream."
- testResumeMultipleTimesInSuccession() : void
- testResumeRepeatsOriginalPipelineAndOptions() : void
- Prose test 3: "ChangeStream will automatically resume one time on a resumable error (including not primary) with the initial pipeline and options, except for the addition/update of a resumeToken."
- testResumeTokenBehaviour() : void
- Prose test 14 For a ChangeStream under these conditions: - The batch is not empty.
- testResumeTokenInvalidTypeClientSideError() : void
- Prose test 2: "ChangeStream will throw an exception if the server response is missing the resume token (if wire version is < 8, this is a driver-side error; for 8+, this is a server-side error)"
- testResumeTokenInvalidTypeServerSideError() : void
- Prose test 2: "ChangeStream will throw an exception if the server response is missing the resume token (if wire version is < 8, this is a driver-side error; for 8+, this is a server-side error)"
- testResumeTokenNotFoundClientSideError() : void
- Prose test 2: "ChangeStream will throw an exception if the server response is missing the resume token (if wire version is < 8, this is a driver-side error; for 8+, this is a server-side error)"
- testResumeTokenNotFoundDoesNotAdvanceKey() : void
- testResumeTokenNotFoundServerSideError() : void
- Prose test 2: "ChangeStream will throw an exception if the server response is missing the resume token (if wire version is < 8, this is a driver-side error; for 8+, this is a server-side error)"
- testResumingChangeStreamWithoutPreviousResultsIncludesStartAfterOption() : void
- Prose test 17: "$changeStream stage for ChangeStream started with startAfter against a server >=4.1.1 that has not received any results yet MUST include a startAfter option and MUST NOT include a resumeAfter option when resuming a change stream."
- testResumingChangeStreamWithPreviousResultsIncludesResumeAfterOption() : void
- Prose test 18: "$changeStream stage for ChangeStream started with startAfter against a server >=4.1.1 that has received at least one result MUST include a resumeAfter option and MUST NOT include a startAfter option when resuming a change stream."
- testRewindExtractsResumeTokenAndNextResumes() : void
- testRewindMultipleTimesWithNoResults() : void
- testRewindMultipleTimesWithResults() : void
- testSessionFreed() : void
- testSessionPersistsAfterResume() : void
- testStartAfterOption() : void
- testTypeMapOption() : void
- assertCollectionCount() : void
- assertCollectionDoesNotExist() : void
- Asserts that a collection with the given name does not exist on the server.
- assertCollectionExists() : void
- Asserts that a collection with the given name exists on the server.
- assertCommandSucceeded() : void
- assertDeprecated() : void
- assertSameObjectId() : void
- createCollection() : void
- Creates the test collection with the specified options.
- createDefaultReadConcern() : mixed
- createDefaultWriteConcern() : mixed
- createSession() : mixed
- dropCollection() : void
- Drops the test collection with the specified options.
- getCollectionName() : string
- Return the test collection name.
- getDatabaseName() : string
- Return the test database name.
- getFeatureCompatibilityVersion() : mixed
- getInvalidArrayValues() : array<string|int, mixed>
- Return a list of invalid array values.
- getInvalidBooleanValues() : array<string|int, mixed>
- Return a list of invalid boolean values.
- getInvalidDocumentValues() : array<string|int, mixed>
- Return a list of invalid document values.
- getInvalidIntegerValues() : array<string|int, mixed>
- Return a list of invalid integer values.
- getInvalidReadConcernValues() : array<string|int, mixed>
- Return a list of invalid ReadPreference values.
- getInvalidReadPreferenceValues() : array<string|int, mixed>
- Return a list of invalid ReadPreference values.
- getInvalidSessionValues() : array<string|int, mixed>
- Return a list of invalid Session values.
- getInvalidStringValues() : array<string|int, mixed>
- Return a list of invalid string values.
- getInvalidWriteConcernValues() : array<string|int, mixed>
- Return a list of invalid WriteConcern values.
- getNamespace() : string
- Return the test namespace.
- getPrimaryServer() : mixed
- getServerStorageEngine() : mixed
- getServerVersion() : mixed
- isLoadBalanced() : mixed
- isMongos() : mixed
- isReplicaSet() : mixed
- isServerless() : bool
- Return whether serverless (i.e. proxy as mongos) is being utilized.
- isShardedCluster() : mixed
- isShardedClusterUsingReplicasets() : mixed
- skipIfCausalConsistencyIsNotSupported() : void
- skipIfChangeStreamIsNotSupported() : void
- skipIfClientSideEncryptionIsNotSupported() : void
- skipIfGeoHaystackIndexIsNotSupported() : void
- skipIfTransactionsAreNotSupported() : void
- wrapValuesForDataProvider() : array<string|int, mixed>
- Wrap a list of values for use as a single-argument data provider.
- advanceCursorUntilValid() : void
- appendAuthenticationOptions() : array<string|int, mixed>
- appendServerApiOption() : array<string|int, mixed>
- assertNoCommandExecuted() : void
- assertResumeAfter() : void
- assertStartAtOperationTime() : void
- disableFailPoints() : void
- Disables any fail points that were configured earlier in the test.
- forceChangeStreamResume() : void
- getModuleInfo() : string|null
- getPostBatchResumeTokenFromReply() : mixed
- insertDocument() : void
- isFailCommandEnabled() : bool
- Checks if the failCommand command is enabled by checking the enableTestCommands parameter
- isFailCommandSupported() : bool
- Checks if the failCommand command is supported on this server version
- isPostBatchResumeTokenSupported() : mixed
- isStartAtOperationTimeSupported() : mixed
- normalizeBSON() : BSONDocument|BSONArray
- Normalizes a BSON document or array for use with assertEquals().
- skipIfIsShardedCluster() : void
Constants
INTERRUPTED
public
mixed
INTERRUPTED
= 11601
NOT_PRIMARY
public
mixed
NOT_PRIMARY
= 10107
Properties
$manager
protected
Manager
$manager
$configuredFailPoints
private
array<string|int, mixed>
$configuredFailPoints
= []
$defaultOptions
private
array<string|int, mixed>
$defaultOptions
= ['maxAwaitTimeMS' => 500]
$wireVersionForStartAtOperationTime
private
static int
$wireVersionForStartAtOperationTime
= 7
Methods
assertMatchesDocument()
Asserts that a document has expected values for some fields.
public
assertMatchesDocument(array<string|int, mixed>|object $expectedDocument, array<string|int, mixed>|object $actualDocument) : void
Only fields in the expected document will be checked. The actual document may contain additional fields.
Parameters
- $expectedDocument : array<string|int, mixed>|object
- $actualDocument : array<string|int, mixed>|object
Return values
void —assertSameDocument()
Asserts that a document has expected values for all fields.
public
assertSameDocument(array<string|int, mixed>|object $expectedDocument, array<string|int, mixed>|object $actualDocument) : void
The actual document will be compared directly with the expected document and may not contain extra fields.
Parameters
- $expectedDocument : array<string|int, mixed>|object
- $actualDocument : array<string|int, mixed>|object
Return values
void —assertSameDocuments()
public
assertSameDocuments(array<string|int, mixed> $expectedDocuments, mixed $actualDocuments) : void
Parameters
- $expectedDocuments : array<string|int, mixed>
- $actualDocuments : mixed
Return values
void —configureFailPoint()
Configure a fail point for the test.
public
configureFailPoint(array<string|int, mixed>|stdClass $command[, Server|null $server = null ]) : void
The fail point will automatically be disabled during tearDown() to avoid affecting a subsequent test.
Parameters
- $command : array<string|int, mixed>|stdClass
-
configureFailPoint command document
- $server : Server|null = null
Tags
Return values
void —createTestClient()
public
static createTestClient([string|null $uri = null ][, array<string|int, mixed> $options = [] ][, array<string|int, mixed> $driverOptions = [] ]) : Client
Parameters
- $uri : string|null = null
- $options : array<string|int, mixed> = []
- $driverOptions : array<string|int, mixed> = []
Return values
Client —createTestManager()
public
static createTestManager([string|null $uri = null ][, array<string|int, mixed> $options = [] ][, array<string|int, mixed> $driverOptions = [] ]) : Manager
Parameters
- $uri : string|null = null
- $options : array<string|int, mixed> = []
- $driverOptions : array<string|int, mixed> = []
Return values
Manager —dataDescription()
Compatibility method as PHPUnit 9 no longer includes this method.
public
dataDescription() : string
Return values
string —getUri()
Return the connection URI.
public
static getUri() : string
Return values
string —provideInvalidArrayValues()
public
provideInvalidArrayValues() : mixed
Return values
mixed —provideInvalidDocumentValues()
public
provideInvalidDocumentValues() : mixed
Return values
mixed —provideTypeMapOptionsAndExpectedChangeDocument()
public
provideTypeMapOptionsAndExpectedChangeDocument() : mixed
Return values
mixed —setUp()
public
setUp() : void
Return values
void —tearDown()
public
tearDown() : void
Return values
void —testErrorDuringAggregateCommandDoesNotCauseResume()
Prose test 4: "ChangeStream will not attempt to resume on any error encountered while executing an aggregate command."
public
testErrorDuringAggregateCommandDoesNotCauseResume() : void
Return values
void —testGetResumeToken()
Prose test 1: "ChangeStream must continuously track the last seen resumeToken"
public
testGetResumeToken() : void
Return values
void —testGetResumeTokenReturnsOriginalResumeTokenOnEmptyBatch()
Prose test 12 For a ChangeStream under these conditions: - Running against a server <4.0.7.
public
testGetResumeTokenReturnsOriginalResumeTokenOnEmptyBatch() : void
- The batch is empty or has been iterated to the last document. Expected result:
- getResumeToken must return the _id of the last document returned if one exists.
- getResumeToken must return resumeAfter from the initial aggregate if the option was specified.
- If resumeAfter was not specified, the getResumeToken result must be empty.
Return values
void —testGetResumeTokenWithPostBatchResumeToken()
Prose test 1: "ChangeStream must continuously track the last seen resumeToken"
public
testGetResumeTokenWithPostBatchResumeToken() : void
Prose test 11: For a ChangeStream under these conditions:
- Running against a server >=4.0.7.
- The batch is empty or has been iterated to the last document. Expected result: getResumeToken must return the postBatchResumeToken from the current command response.
Prose test 13: For a ChangeStream under these conditions:
- The batch is not empty.
- The batch has been iterated up to but not including the last element. Expected result: getResumeToken must return the _id of the previous document returned.
Return values
void —testInitialCursorIsNotClosed()
Prose test 7: "Ensure that a cursor returned from an aggregate command with a cursor id and an initial empty batch is not closed on the driver side."
public
testInitialCursorIsNotClosed() : void
Return values
void —testKey()
public
testKey() : void
Return values
void —testMaxAwaitTimeMS()
public
testMaxAwaitTimeMS() : void
Return values
void —testNextAdvancesKey()
public
testNextAdvancesKey() : void
Return values
void —testNextResumesAfterConnectionException()
public
testNextResumesAfterConnectionException() : void
Return values
void —testNoChangeAfterResumeBeforeInsert()
public
testNoChangeAfterResumeBeforeInsert() : void
Return values
void —testNonEmptyPipeline()
public
testNonEmptyPipeline() : void
Return values
void —testOriginalReadPreferenceIsPreservedOnResume()
Prose test 6: "ChangeStream will perform server selection before attempting to resume, using initial readPreference"
public
testOriginalReadPreferenceIsPreservedOnResume() : void
Return values
void —testResumeAfterOption()
public
testResumeAfterOption() : void
Return values
void —testResumeBeforeReceivingAnyResultsIncludesPostBatchResumeToken()
public
testResumeBeforeReceivingAnyResultsIncludesPostBatchResumeToken() : void
Return values
void —testResumeBeforeReceivingAnyResultsIncludesStartAtOperationTime()
Prose test 9: "$changeStream stage for ChangeStream against a server >=4.0 and <4.0.7 that has not received any results yet MUST include a startAtOperationTime option when resuming a changestream."
public
testResumeBeforeReceivingAnyResultsIncludesStartAtOperationTime() : void
Return values
void —testResumeMultipleTimesInSuccession()
public
testResumeMultipleTimesInSuccession() : void
Return values
void —testResumeRepeatsOriginalPipelineAndOptions()
Prose test 3: "ChangeStream will automatically resume one time on a resumable error (including not primary) with the initial pipeline and options, except for the addition/update of a resumeToken."
public
testResumeRepeatsOriginalPipelineAndOptions() : void
Return values
void —testResumeTokenBehaviour()
Prose test 14 For a ChangeStream under these conditions: - The batch is not empty.
public
testResumeTokenBehaviour() : void
- The batch hasn’t been iterated at all.
- Only the initial aggregate command has been executed. Expected result:
- getResumeToken must return startAfter from the initial aggregate if the option was specified.
- getResumeToken must return resumeAfter from the initial aggregate if the option was specified.
- If neither the startAfter nor resumeAfter options were specified, the getResumeToken result must be empty.
Return values
void —testResumeTokenInvalidTypeClientSideError()
Prose test 2: "ChangeStream will throw an exception if the server response is missing the resume token (if wire version is < 8, this is a driver-side error; for 8+, this is a server-side error)"
public
testResumeTokenInvalidTypeClientSideError() : void
Return values
void —testResumeTokenInvalidTypeServerSideError()
Prose test 2: "ChangeStream will throw an exception if the server response is missing the resume token (if wire version is < 8, this is a driver-side error; for 8+, this is a server-side error)"
public
testResumeTokenInvalidTypeServerSideError() : void
Return values
void —testResumeTokenNotFoundClientSideError()
Prose test 2: "ChangeStream will throw an exception if the server response is missing the resume token (if wire version is < 8, this is a driver-side error; for 8+, this is a server-side error)"
public
testResumeTokenNotFoundClientSideError() : void
Return values
void —testResumeTokenNotFoundDoesNotAdvanceKey()
public
testResumeTokenNotFoundDoesNotAdvanceKey() : void
Return values
void —testResumeTokenNotFoundServerSideError()
Prose test 2: "ChangeStream will throw an exception if the server response is missing the resume token (if wire version is < 8, this is a driver-side error; for 8+, this is a server-side error)"
public
testResumeTokenNotFoundServerSideError() : void
Return values
void —testResumingChangeStreamWithoutPreviousResultsIncludesStartAfterOption()
Prose test 17: "$changeStream stage for ChangeStream started with startAfter against a server >=4.1.1 that has not received any results yet MUST include a startAfter option and MUST NOT include a resumeAfter option when resuming a change stream."
public
testResumingChangeStreamWithoutPreviousResultsIncludesStartAfterOption() : void
Return values
void —testResumingChangeStreamWithPreviousResultsIncludesResumeAfterOption()
Prose test 18: "$changeStream stage for ChangeStream started with startAfter against a server >=4.1.1 that has received at least one result MUST include a resumeAfter option and MUST NOT include a startAfter option when resuming a change stream."
public
testResumingChangeStreamWithPreviousResultsIncludesResumeAfterOption() : void
Return values
void —testRewindExtractsResumeTokenAndNextResumes()
public
testRewindExtractsResumeTokenAndNextResumes() : void
Return values
void —testRewindMultipleTimesWithNoResults()
public
testRewindMultipleTimesWithNoResults() : void
Return values
void —testRewindMultipleTimesWithResults()
public
testRewindMultipleTimesWithResults() : void
Return values
void —testSessionFreed()
public
testSessionFreed() : void
Return values
void —testSessionPersistsAfterResume()
public
testSessionPersistsAfterResume() : void
Return values
void —testStartAfterOption()
public
testStartAfterOption() : void
Return values
void —testTypeMapOption()
public
testTypeMapOption(array<string|int, mixed> $typeMap, mixed $expectedChangeDocument) : void
Parameters
- $typeMap : array<string|int, mixed>
- $expectedChangeDocument : mixed
Tags
Return values
void —assertCollectionCount()
protected
assertCollectionCount(mixed $namespace, mixed $count) : void
Parameters
- $namespace : mixed
- $count : mixed
Return values
void —assertCollectionDoesNotExist()
Asserts that a collection with the given name does not exist on the server.
protected
assertCollectionDoesNotExist(string $collectionName[, string|null $databaseName = null ]) : void
$databaseName defaults to TestCase::getDatabaseName() if unspecified.
Parameters
- $collectionName : string
- $databaseName : string|null = null
Return values
void —assertCollectionExists()
Asserts that a collection with the given name exists on the server.
protected
assertCollectionExists(string $collectionName[, string|null $databaseName = null ][, callable|null $callback = null ]) : void
$databaseName defaults to TestCase::getDatabaseName() if unspecified. An optional $callback may be provided, which should take a CollectionInfo argument as its first and only parameter. If a CollectionInfo matching the given name is found, it will be passed to the callback, which may perform additional assertions.
Parameters
- $collectionName : string
- $databaseName : string|null = null
- $callback : callable|null = null
Return values
void —assertCommandSucceeded()
protected
assertCommandSucceeded(mixed $document) : void
Parameters
- $document : mixed
Return values
void —assertDeprecated()
protected
assertDeprecated(callable $execution) : void
Parameters
- $execution : callable
Return values
void —assertSameObjectId()
protected
assertSameObjectId(mixed $expectedObjectId, mixed $actualObjectId) : void
Parameters
- $expectedObjectId : mixed
- $actualObjectId : mixed
Return values
void —createCollection()
Creates the test collection with the specified options.
protected
createCollection([array<string|int, mixed> $options = [] ]) : void
If the "writeConcern" option is not specified but is supported by the server, a majority write concern will be used. This is helpful for tests using transactions or secondary reads.
Parameters
- $options : array<string|int, mixed> = []
Return values
void —createDefaultReadConcern()
protected
createDefaultReadConcern() : mixed
Return values
mixed —createDefaultWriteConcern()
protected
createDefaultWriteConcern() : mixed
Return values
mixed —createSession()
protected
createSession() : mixed
Return values
mixed —dropCollection()
Drops the test collection with the specified options.
protected
dropCollection([array<string|int, mixed> $options = [] ]) : void
If the "writeConcern" option is not specified but is supported by the server, a majority write concern will be used. This is helpful for tests using transactions or secondary reads.
Parameters
- $options : array<string|int, mixed> = []
Return values
void —getCollectionName()
Return the test collection name.
protected
getCollectionName() : string
Return values
string —getDatabaseName()
Return the test database name.
protected
getDatabaseName() : string
Return values
string —getFeatureCompatibilityVersion()
protected
getFeatureCompatibilityVersion([ReadPreference|null $readPreference = null ]) : mixed
Parameters
- $readPreference : ReadPreference|null = null
Return values
mixed —getInvalidArrayValues()
Return a list of invalid array values.
protected
getInvalidArrayValues([bool $includeNull = false ]) : array<string|int, mixed>
Parameters
- $includeNull : bool = false
Return values
array<string|int, mixed> —getInvalidBooleanValues()
Return a list of invalid boolean values.
protected
getInvalidBooleanValues([bool $includeNull = false ]) : array<string|int, mixed>
Parameters
- $includeNull : bool = false
Return values
array<string|int, mixed> —getInvalidDocumentValues()
Return a list of invalid document values.
protected
getInvalidDocumentValues([bool $includeNull = false ]) : array<string|int, mixed>
Parameters
- $includeNull : bool = false
Return values
array<string|int, mixed> —getInvalidIntegerValues()
Return a list of invalid integer values.
protected
getInvalidIntegerValues([bool $includeNull = false ]) : array<string|int, mixed>
Parameters
- $includeNull : bool = false
Return values
array<string|int, mixed> —getInvalidReadConcernValues()
Return a list of invalid ReadPreference values.
protected
getInvalidReadConcernValues([bool $includeNull = false ]) : array<string|int, mixed>
Parameters
- $includeNull : bool = false
Return values
array<string|int, mixed> —getInvalidReadPreferenceValues()
Return a list of invalid ReadPreference values.
protected
getInvalidReadPreferenceValues([bool $includeNull = false ]) : array<string|int, mixed>
Parameters
- $includeNull : bool = false
Return values
array<string|int, mixed> —getInvalidSessionValues()
Return a list of invalid Session values.
protected
getInvalidSessionValues([bool $includeNull = false ]) : array<string|int, mixed>
Parameters
- $includeNull : bool = false
Return values
array<string|int, mixed> —getInvalidStringValues()
Return a list of invalid string values.
protected
getInvalidStringValues([bool $includeNull = false ]) : array<string|int, mixed>
Parameters
- $includeNull : bool = false
Return values
array<string|int, mixed> —getInvalidWriteConcernValues()
Return a list of invalid WriteConcern values.
protected
getInvalidWriteConcernValues([bool $includeNull = false ]) : array<string|int, mixed>
Parameters
- $includeNull : bool = false
Return values
array<string|int, mixed> —getNamespace()
Return the test namespace.
protected
getNamespace() : string
Return values
string —getPrimaryServer()
protected
getPrimaryServer() : mixed
Return values
mixed —getServerStorageEngine()
protected
getServerStorageEngine([ReadPreference|null $readPreference = null ]) : mixed
Parameters
- $readPreference : ReadPreference|null = null
Return values
mixed —getServerVersion()
protected
getServerVersion([ReadPreference|null $readPreference = null ]) : mixed
Parameters
- $readPreference : ReadPreference|null = null
Return values
mixed —isLoadBalanced()
protected
isLoadBalanced() : mixed
Return values
mixed —isMongos()
protected
isMongos() : mixed
Return values
mixed —isReplicaSet()
protected
isReplicaSet() : mixed
Return values
mixed —isServerless()
Return whether serverless (i.e. proxy as mongos) is being utilized.
protected
static isServerless() : bool
Return values
bool —isShardedCluster()
protected
isShardedCluster() : mixed
Return values
mixed —isShardedClusterUsingReplicasets()
protected
isShardedClusterUsingReplicasets() : mixed
Return values
mixed —skipIfCausalConsistencyIsNotSupported()
protected
skipIfCausalConsistencyIsNotSupported() : void
Return values
void —skipIfChangeStreamIsNotSupported()
protected
skipIfChangeStreamIsNotSupported() : void
Return values
void —skipIfClientSideEncryptionIsNotSupported()
protected
skipIfClientSideEncryptionIsNotSupported() : void
Return values
void —skipIfGeoHaystackIndexIsNotSupported()
protected
skipIfGeoHaystackIndexIsNotSupported() : void
Return values
void —skipIfTransactionsAreNotSupported()
protected
skipIfTransactionsAreNotSupported() : void
Return values
void —wrapValuesForDataProvider()
Wrap a list of values for use as a single-argument data provider.
protected
wrapValuesForDataProvider(array<string|int, mixed> $values) : array<string|int, mixed>
Parameters
- $values : array<string|int, mixed>
-
List of values
Return values
array<string|int, mixed> —advanceCursorUntilValid()
private
advanceCursorUntilValid(Iterator $iterator[, mixed $limitOnShardedClusters = 10 ]) : void
Parameters
- $iterator : Iterator
- $limitOnShardedClusters : mixed = 10
Return values
void —appendAuthenticationOptions()
private
static appendAuthenticationOptions(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $options : array<string|int, mixed>
Return values
array<string|int, mixed> —appendServerApiOption()
private
static appendServerApiOption(array<string|int, mixed> $driverOptions) : array<string|int, mixed>
Parameters
- $driverOptions : array<string|int, mixed>
Return values
array<string|int, mixed> —assertNoCommandExecuted()
private
assertNoCommandExecuted(callable $callable) : void
Parameters
- $callable : callable
Return values
void —assertResumeAfter()
private
assertResumeAfter(mixed $expectedResumeToken, stdClass $command) : void
Parameters
- $expectedResumeToken : mixed
- $command : stdClass
Return values
void —assertStartAtOperationTime()
private
assertStartAtOperationTime(TimestampInterface $expectedOperationTime, stdClass $command) : void
Parameters
- $expectedOperationTime : TimestampInterface
- $command : stdClass
Return values
void —disableFailPoints()
Disables any fail points that were configured earlier in the test.
private
disableFailPoints() : void
This tracks fail points set via configureFailPoint() and should be called during tearDown().
Return values
void —forceChangeStreamResume()
private
forceChangeStreamResume() : void
Return values
void —getModuleInfo()
private
getModuleInfo(string $row) : string|null
Parameters
- $row : string
Return values
string|null —getPostBatchResumeTokenFromReply()
private
getPostBatchResumeTokenFromReply(stdClass $reply) : mixed
Parameters
- $reply : stdClass
Return values
mixed —insertDocument()
private
insertDocument(mixed $document) : void
Parameters
- $document : mixed
Return values
void —isFailCommandEnabled()
Checks if the failCommand command is enabled by checking the enableTestCommands parameter
private
isFailCommandEnabled() : bool
Return values
bool —isFailCommandSupported()
Checks if the failCommand command is supported on this server version
private
isFailCommandSupported() : bool
Return values
bool —isPostBatchResumeTokenSupported()
private
isPostBatchResumeTokenSupported() : mixed
Return values
mixed —isStartAtOperationTimeSupported()
private
isStartAtOperationTimeSupported() : mixed
Return values
mixed —normalizeBSON()
Normalizes a BSON document or array for use with assertEquals().
private
normalizeBSON(array<string|int, mixed>|object $bson) : BSONDocument|BSONArray
The argument will be converted to a BSONArray or BSONDocument based on its type and keys. Document fields will be sorted alphabetically. Each value within the array or document will then be normalized recursively.
Parameters
- $bson : array<string|int, mixed>|object
Tags
Return values
BSONDocument|BSONArray —skipIfIsShardedCluster()
private
skipIfIsShardedCluster(mixed $message) : void
Parameters
- $message : mixed