--TEST-- MongoDB\Driver\Manager::executeWriteCommand() throws CommandException for unsupported update operator --SKIPIF-- --FILE-- COLLECTION_NAME, 'query' => ['_id' => 'foo'], 'upsert' => true, 'new' => true, ]); try { $manager->executeWriteCommand(DATABASE_NAME, $command); } catch (MongoDB\Driver\Exception\CommandException $e) { printf("%s(%d): %s\n", get_class($e), $e->getCode(), $e->getMessage()); } ?> ===DONE=== --EXPECT-- MongoDB\Driver\Exception\CommandException(9): Either an update or remove=true must be specified ===DONE===