Skip to content

Commit

Permalink
Require MongoDB 4.2+ for update pipeline tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola authored and alcaeus committed May 26, 2023
1 parent f53d7b1 commit 1e3e9dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Operation/UpdateFunctionalTest.php
Expand Up @@ -17,6 +17,7 @@
use MongoDB\UpdateResult;
use stdClass;

use function is_array;
use function version_compare;

class UpdateFunctionalTest extends FunctionalTestCase
Expand Down Expand Up @@ -70,6 +71,10 @@ public function provideFilterDocuments(): array
*/
public function testUpdateDocuments($update, $expectedUpdate): void
{
if (is_array($expectedUpdate) && version_compare($this->getServerVersion(), '4.2.0', '<')) {
$this->markTestSkipped('Pipeline-style updates are not supported');
}

(new CommandObserver())->observe(
function () use ($update): void {
$operation = new Update(
Expand Down

0 comments on commit 1e3e9dc

Please sign in to comment.