--TEST-- MongoDB\Driver\Session::startTransaction() throws an error on replicasets < 4.0 --SKIPIF-- =', '4.0'); ?> --FILE-- startSession(); echo throws(function () use ($session) { $session->startTransaction(); }, MongoDB\Driver\Exception\RuntimeException::class), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\RuntimeException Multi-document transactions are not supported by this server version ===DONE===