- 02 Feb, 2018 33 commits
-
-
Jeremy Mikola authored
-
Jeremy Mikola authored
The spec requests that we check that the initial change stream cursor is alive. This can be done by both asserting its cursor ID is non-zero and also calling MongoDB\Driver\Cursor::isDead().
-
Jeremy Mikola authored
Previously, iteration started with next(), so the first element's key was 1. Iteration should being with rewind() and the initial key should be zero. With this change, we're still testing that the key is only incremented when next() successfully increments.
-
Jeremy Mikola authored
Resume tests for rewind() will be reimplemented in PHPLIB-322
-
Jeremy Mikola authored
This also adds more assertions between the doc examples.
-
Jeremy Mikola authored
-
Jeremy Mikola authored
-
Jeremy Mikola authored
-
Jeremy Mikola authored
-
Jeremy Mikola authored
This also removes the hard-coded database and collection names, which are subject to change based on the test suite configuration and getCollectionName() implementation.
-
Jeremy Mikola authored
The original intention of this test was to verify resumability in the event of a dropped connection; however, since socketTimeoutMS and maxAwaitTimeMS are fixed values, we cannot test a dropped connection followed by a successful resume. Instead, we will test that the driver attempts to resume once and only once before we expect a socket timeout after the second attempt. Note: ChangeStream::rewind() does not currently resume (see: PHPLIB-322)
-
Jeremy Mikola authored
-
Jeremy Mikola authored
-
Jeremy Mikola authored
Change streams require a replica set.
-
Jeremy Mikola authored
Refactoring the change stream tests to execute Watch directly highlighted a bug where no read preference was available during the resume process. This ensures that a read preference is always set, and also specifies a "fullDocument" default (consistent with other drivers).
-
Jeremy Mikola authored
For consistency with other operation functional tests, this now constructs and executes operation classes directly.
-
Jeremy Mikola authored
The batchSize option for change streams is not identical to the aggregate option, so they should not share the same text. That said, the batchSize option likely has no effect on the resulting change stream (see: PHPLIB-321).
-
Jeremy Mikola authored
-
Jeremy Mikola authored
-
Jeremy Mikola authored
-
Jeremy Mikola authored
This makes the constructor consistent with other classes (e.g. Client, GridFS\Bucket) and also ensures that we don't have required parameters trailing optional arguments (i.e. options array).
-
Jeremy Mikola authored
-
Jeremy Mikola authored
This makes the operation consistent with the Collection method name and avoids the naming conflict with the ChangeStream iterator class.
-
Katherine Walker authored
-
Katherine Walker authored
-
Katherine Walker authored
-
Katherine Walker authored
-
Katherine Walker authored
-
Katherine Walker authored
-
Katherine Walker authored
-
Jeremy Mikola authored
-
Jeremy Mikola authored
-
Katherine Walker authored
PHPLIB-292: Apply type map to offsetGet and throw exceptions for mutate methods in TypeMapArrayIterator
-
- 01 Feb, 2018 7 commits
-
-
Jeremy Mikola authored
-
Jeremy Mikola authored
-
Jeremy Mikola authored
-
Jeremy Mikola authored
The Operation classes were previously relying on MongoDB\Tests\Collection\FunctionalTestCase, so they required additional changes to initialize a Collection instance for asserting outcome of write operations.
-
Katherine Walker authored
-
Katherine Walker authored
-
Katherine Walker authored
-