--TEST-- MongoDB\Driver\Session::startTransaction() with wrong argument for options array (PHP 7) --SKIPIF-- ', '7.99'); ?> --FILE-- startSession(); $options = [ 2, new stdClass, ]; foreach ($options as $txnOptions) { echo throws(function () use ($session, $txnOptions) { $session->startTransaction($txnOptions); }, TypeError::class), "\n"; } ?> ===DONE=== --EXPECTF-- OK: Got TypeError Argument 1 passed to MongoDB\Driver\Session::startTransaction() must be of the type array%r( or null)?%r, int given OK: Got TypeError Argument 1 passed to MongoDB\Driver\Session::startTransaction() must be of the type array%r( or null)?%r, object given ===DONE===