ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- PK.h]+C^C^utils/tools.phpnu[ $collectionName]); try { /* We need to use WriteConcern::MAJORITY here due to the issue * explained in SERVER-35613: "drop" uses a two phase commit, and due * to that, it is possible that a lock can't be acquired for a * transaction that gets quickly started as the "drop" reaper hasn't * completed yet. */ $server->executeCommand( $databaseName, $command, ['writeConcern' => new WriteConcern(WriteConcern::MAJORITY)] ); } catch (RuntimeException $e) { if ($e->getMessage() !== 'ns not found') { throw $e; } } } /** * Returns the value of a module row from phpinfo(), or null if it's not found. * * @param string $row * @return string|null */ function get_module_info($row) { ob_start(); phpinfo(INFO_MODULES); $info = ob_get_clean(); $pattern = sprintf('/^%s([\w ]+)$/m', preg_quote($row . ' => ')); if (preg_match($pattern, $info, $matches) !== 1) { return null; } return $matches[1]; } function create_test_manager(string $uri = null, array $options = [], array $driverOptions = []) { if (getenv('API_VERSION') && ! isset($driverOptions['serverApi'])) { $driverOptions['serverApi'] = new ServerApi(getenv('API_VERSION')); } return new Manager($uri ?? URI, $options, $driverOptions); } /** * Returns the primary server. * * @param string $uri Connection string * @return Server * @throws ConnectionException */ function get_primary_server($uri) { return create_test_manager($uri)->selectServer(new ReadPreference('primary')); } /** * Returns a secondary server. * * @param string $uri Connection string * @return Server * @throws ConnectionException */ function get_secondary_server($uri) { return create_test_manager($uri)->selectServer(new ReadPreference('secondary')); } /** * Runs a command and returns whether an exception was thrown or not * * @param string $uri Connection string * @param array|object $commandSpec * @return bool * @throws RuntimeException */ function command_works($uri, $commandSpec) { $command = new Command($commandSpec); $server = get_primary_server($uri); try { $cursor = $server->executeCommand('admin', $command); return true; } catch (Exception $e) { return false; } } /** * Returns a parameter of the primary server. * * @param string $uri Connection string * @return mixed * @throws RuntimeException */ function get_server_parameter($uri, $parameter) { $server = get_primary_server($uri); $command = new Command(['getParameter' => 1, $parameter => 1]); $cursor = $server->executeCommand('admin', $command); return current($cursor->toArray())->$parameter; } /** * Returns the storage engine of the primary server. * * @param string $uri Connection string * @return string * @throws RuntimeException */ function get_server_storage_engine($uri) { $server = get_primary_server($uri); $command = new Command(['serverStatus' => 1]); $cursor = $server->executeCommand('admin', $command); return current($cursor->toArray())->storageEngine->name; } /** * Helper to return the version of a specific server. * * @param Server $server * @return string * @throws RuntimeException */ function get_server_version_from_server(Server $server) { $command = new Command(['buildInfo' => 1]); $cursor = $server->executeCommand('admin', $command); return current($cursor->toArray())->version; } /** * Returns the version of the primary server. * * @param string $uri Connection string * @return string * @throws RuntimeException */ function get_server_version($uri) { $server = get_primary_server($uri); return get_server_version_from_server($server); } /** * Returns the value of a URI option, or null if it's not found. * * @param string $uri * @return string|null */ function get_uri_option($uri, $option) { $pattern = sprintf('/[?&]%s=([^&]+)/i', preg_quote($option)); if (preg_match($pattern, $uri, $matches) !== 1) { return null; } return $matches[1]; } /** * Checks that the topology is load balanced. * * @param string $uri * @return boolean */ function is_load_balanced($uri) { return get_primary_server($uri)->getType() === Server::TYPE_LOAD_BALANCER; } /** * Checks that the topology is a sharded cluster. * * @param string $uri * @return boolean */ function is_mongos($uri) { return get_primary_server($uri)->getType() === Server::TYPE_MONGOS; } /** * Checks that the topology is a sharded cluster using a replica set. * * Note: only the first shard is checked. */ function is_sharded_cluster_with_replica_set($uri) { $server = get_primary_server($uri); if ($server->getType() !== Server::TYPE_MONGOS && $server->getType() !== Server::TYPE_LOAD_BALANCER) { return false; } $cursor = $server->executeQuery('config.shards', new \MongoDB\Driver\Query([], ['limit' => 1])); $cursor->setTypeMap(['root' => 'array', 'document' => 'array']); $document = current($cursor->toArray()); if (! $document) { return false; } /** * Use regular expression to distinguish between standalone or replicaset: * Without a replicaset: "host" : "localhost:4100" * With a replicaset: "host" : "dec6d8a7-9bc1-4c0e-960c-615f860b956f/localhost:4400,localhost:4401" */ return preg_match('@^.*/.*:\d+@', $document['host']); } /** * Checks that the topology is a replica set. * * @param string $uri * @return boolean */ function is_replica_set($uri) { if (get_primary_server($uri)->getType() !== Server::TYPE_RS_PRIMARY) { return false; } /* Note: this may return a false negative if replicaSet is specified through * a TXT record for a mongodb+srv connection string. */ if (get_uri_option($uri, 'replicaSet') === NULL) { return false; } return true; } /** * Checks if the connection string uses authentication. * * @param string $uri * @return boolean */ function is_auth($uri) { if (stripos($uri, 'authmechanism=') !== false) { return true; } if (strpos($uri, ':') !== false && strpos($uri, '@') !== false) { return true; } return false; } /** * Checks if the connection string uses SSL. * * @param string $uri * @return boolean */ function is_ssl($uri) { return stripos($uri, 'ssl=true') !== false || stripos($uri, 'tls=true') !== false; } /** * Checks that the topology is a standalone. * * @param string $uri * @return boolean */ function is_standalone($uri) { return get_primary_server($uri)->getType() === Server::TYPE_STANDALONE; } /** * Converts the server type constant to a string. * * @see http://php.net/manual/en/class.mongodb-driver-server.php * @param integer $type * @return string */ function server_type_as_string($type) { switch ($type) { case Server::TYPE_STANDALONE: return 'Standalone'; case Server::TYPE_MONGOS: return 'Mongos'; case Server::TYPE_POSSIBLE_PRIMARY: return 'PossiblePrimary'; case Server::TYPE_RS_PRIMARY: return 'RSPrimary'; case Server::TYPE_RS_SECONDARY: return 'RSSecondary'; case Server::TYPE_RS_ARBITER: return 'RSArbiter'; case Server::TYPE_RS_OTHER: return 'RSOther'; case Server::TYPE_RS_GHOST: return 'RSGhost'; default: return 'Unknown'; } } /** * Converts an errno number to a string. * * @see http://php.net/manual/en/errorfunc.constants.php * @param integer $errno * @param string */ function errno_as_string($errno) { $errors = [ 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE', 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR', 'E_USER_WARNING', 'E_USER_NOTICE', 'E_STRICT', 'E_RECOVERABLE_ERROR', 'E_DEPRECATED', 'E_USER_DEPRECATED', 'E_ALL', ]; foreach ($errors as $error) { if ($errno === constant($error)) { return $error; } } return 'Unknown'; } /** * Prints a traditional hex dump of byte values and printable characters. * * @see http://stackoverflow.com/a/4225813/162228 * @param string $data Binary data * @param integer $width Bytes displayed per line */ function hex_dump($data, $width = 16) { static $pad = '.'; // Placeholder for non-printable characters static $from = ''; static $to = ''; if ($from === '') { for ($i = 0; $i <= 0xFF; $i++) { $from .= chr($i); $to .= ($i >= 0x20 && $i <= 0x7E) ? chr($i) : $pad; } } $hex = str_split(bin2hex($data), $width * 2); $chars = str_split(strtr($data, $from, $to), $width); $offset = 0; $length = $width * 3; foreach ($hex as $i => $line) { printf("%6X : %-{$length}s [%s]\n", $offset, implode(' ', str_split($line, 2)), $chars[$i]); $offset += $width; } } /** * Canonicalizes a JSON string. * * @param string $json * @return string */ function json_canonicalize($json) { $json = json_encode(json_decode($json)); /* Versions of PHP before 7.1 replace empty JSON keys with "_empty_" when * decoding to a stdClass (see: https://bugs.php.net/bug.php?id=46600). Work * around this by replacing "_empty_" keys before returning. */ $json = str_replace('"_empty_":', '"":', $json); /* Canonicalize string values for $numberDouble to ensure they are converted * the same as number literals in legacy and relaxed output. This is needed * because the printf format in _bson_as_json_visit_double uses a high level * of precision and may not produce the exponent notation expected by the * BSON corpus tests. */ $json = preg_replace_callback( '/{"\$numberDouble":"(-?\d+(\.\d+([eE]\+\d+)?)?)"}/', function ($matches) { return '{"$numberDouble":"' . json_encode(json_decode($matches[1])) . '"}'; }, $json ); return $json; } /** * Return a collection name to use for the test file. * * The filename will be stripped of the base path to the test suite (prefix) as * well as the PHP file extension (suffix). Special characters (including hyphen * for shell compatibility) will be replaced with underscores. * * @param string $filename * @return string */ function makeCollectionNameFromFilename($filename) { $filename = realpath($filename); $prefix = realpath(dirname(__FILE__) . '/..') . DIRECTORY_SEPARATOR; $replacements = array( // Strip test path prefix sprintf('/^%s/', preg_quote($prefix, '/')) => '', // Strip file extension suffix '/\.php$/' => '', // SKIPIFs add ".skip" between base name and extension '/\.skip$/' => '', // Replace special characters with underscores sprintf('/[%s]/', preg_quote('-$/\\', '/')) => '_', ); return preg_replace(array_keys($replacements), array_values($replacements), $filename); } function NEEDS($configuration) { if (!constant($configuration)) { exit("skip -- need '$configuration' defined"); } } function SLOW() { if (getenv("SKIP_SLOW_TESTS")) { exit("skip SKIP_SLOW_TESTS"); } } function loadFixtures(Manager $manager, $dbname = DATABASE_NAME, $collname = COLLECTION_NAME, $filename = null) { if (!$filename) { $filename = "compress.zlib://" . __DIR__ . "/" . "PHONGO-FIXTURES.json.gz"; } $bulk = new BulkWrite(['ordered' => false]); $server = $manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY)); $data = file_get_contents($filename); $array = json_decode($data); foreach($array as $document) { $bulk->insert($document); } $retval = $server->executeBulkWrite("$dbname.$collname", $bulk); if ($retval->getInsertedCount() !== count($array)) { exit(sprintf('skip Fixtures were not loaded (expected: %d, actual: %d)', $total, $retval->getInsertedCount())); } } function createTemporaryMongoInstance(array $options = []) { $id = 'mo_' . COLLECTION_NAME; $options += [ "name" => "mongod", "id" => $id, 'procParams' => [ 'logpath' => "/tmp/MO/phongo/{$id}.log", 'ipv6' => true, 'setParameter' => [ 'enableTestCommands' => 1 ], ], ]; $opts = array( "http" => array( "timeout" => 60, "method" => "PUT", "header" => "Accept: application/json\r\n" . "Content-type: application/x-www-form-urlencoded", "content" => json_encode($options), "ignore_errors" => true, ), ); $ctx = stream_context_create($opts); $json = file_get_contents(MONGO_ORCHESTRATION_URI . "/servers/$id", false, $ctx); $result = json_decode($json, true); /* Failed -- or was already started */ if (!isset($result["mongodb_uri"])) { destroyTemporaryMongoInstance($id); throw new Exception("Could not start temporary server instance\n"); } else { return $result['mongodb_uri']; } } function destroyTemporaryMongoInstance($id = NULL) { if ($id == NULL) { $id = 'mo_' . COLLECTION_NAME; } $opts = array( "http" => array( "timeout" => 60, "method" => "DELETE", "header" => "Accept: application/json\r\n", "ignore_errors" => true, ), ); $ctx = stream_context_create($opts); $json = file_get_contents(MONGO_ORCHESTRATION_URI . "/servers/$id", false, $ctx); } /** * Converts an error level (constant or bitmask) to a string description. */ function severityToString(int $severity): string { static $constants = [ 'E_ERROR' => E_ERROR, 'E_WARNING' => E_WARNING, 'E_PARSE' => E_PARSE, 'E_NOTICE' => E_NOTICE, 'E_CORE_ERROR' => E_CORE_ERROR, 'E_CORE_WARNING' => E_CORE_WARNING, 'E_COMPILE_ERROR' => E_COMPILE_ERROR, 'E_COMPILE_WARNING' => E_COMPILE_WARNING, 'E_USER_ERROR' => E_USER_ERROR, 'E_USER_WARNING' => E_USER_WARNING, 'E_USER_NOTICE' => E_USER_NOTICE, 'E_STRICT' => E_STRICT, 'E_RECOVERABLE_ERROR' => E_RECOVERABLE_ERROR, 'E_DEPRECATED' => E_DEPRECATED, 'E_USER_DEPRECATED' => E_USER_DEPRECATED, // E_ALL is handled separately ]; if ($severity === E_ALL) { return 'E_ALL'; } foreach ($constants as $constant => $value) { if ($severity & $value) { $matches[] = $constant; } } return empty($matches) ? 'UNKNOWN' : implode('|', $matches); } /** * Expects the callable to raise an error matching the expected severity, which * may be a constant or bitmask. May optionally expect the error to be raised * from a particular function. Returns the message from the raised error or * exception, or an empty string if neither was thrown. */ function raises(callable $callable, int $expectedSeverity, string $expectedFromFunction = null): string { set_error_handler(function(int $severity, string $message, string $file, int $line) { throw new ErrorException($message, 0, $severity, $file, $line); }); try { call_user_func($callable); } catch (ErrorException $e) { if (!($e->getSeverity() & $expectedSeverity)) { printf("ALMOST: Got %s - expected %s\n", severityToString($e->getSeverity()), severityToString($expectedSeverity)); return $e->getMessage(); } if ($expectedFromFunction === null) { printf("OK: Got %s\n", severityToString($e->getSeverity())); return $e->getMessage(); } $fromFunction = $e->getTrace()[0]['function']; if (strcasecmp($fromFunction, $expectedFromFunction) !== 0) { printf("ALMOST: Got %s - but was raised from %s, not %s\n", errorLevelToString($e->getSeverity()), $fromFunction, $expectedFromFunction); return $e->getMessage(); } printf("OK: Got %s raised from %s\n", severityToString($e->getSeverity()), $fromFunction); return $e->getMessage(); } catch (Throwable $e) { printf("ALMOST: Got %s - expected %s\n", get_class($e), ErrorException::class); return $e->getMessage(); } finally { restore_error_handler(); } printf("FAILED: Expected %s, but no error raised!\n", ErrorException::class); return ''; } /** * Expects the callable to throw an expected exception. May optionally expect * the exception to be thrown from a particular function. Returns the message * from the thrown exception, or an empty string if one was not thrown. */ function throws(callable $callable, string $expectedException, string $expectedFromFunction = null): string { try { call_user_func($callable); } catch (Throwable $e) { if (!($e instanceof $expectedException)) { printf("ALMOST: Got %s - expected %s\n", get_class($e), $expectedException); return $e->getMessage(); } if ($expectedFromFunction === null) { printf("OK: Got %s\n", $expectedException); return $e->getMessage(); } $fromFunction = $e->getTrace()[0]['function']; if (strcasecmp($fromFunction, $expectedFromFunction) !== 0) { printf("ALMOST: Got %s - but was thrown from %s, not %s\n", $expectedException, $fromFunction, $expectedFromFunction); return $e->getMessage(); } printf("OK: Got %s thrown from %s\n", $expectedException, $fromFunction); return $e->getMessage(); } printf("FAILED: Expected %s, but no exception thrown!\n", $expectedException); return ''; } function printServer(Server $server) { printf("server: %s:%d\n", $server->getHost(), $server->getPort()); } function printWriteResult(WriteResult $result, $details = true) { printServer($result->getServer()); printf("insertedCount: %d\n", $result->getInsertedCount()); printf("matchedCount: %d\n", $result->getMatchedCount()); printf("modifiedCount: %d\n", $result->getModifiedCount()); printf("upsertedCount: %d\n", $result->getUpsertedCount()); printf("deletedCount: %d\n", $result->getDeletedCount()); foreach ($result->getUpsertedIds() as $index => $id) { printf("upsertedId[%d]: ", $index); var_dump($id); } $writeConcernError = $result->getWriteConcernError(); printWriteConcernError($writeConcernError ? $writeConcernError : null, $details); foreach ($result->getWriteErrors() as $writeError) { printWriteError($writeError); } } function printWriteConcernError(WriteConcernError $error = null, $details) { if ($error) { /* This stuff is generated by the server, no need for us to test it */ if (!$details) { printf("writeConcernError: %s (%d)\n", $error->getMessage(), $error->getCode()); return; } var_dump($error); printf("writeConcernError.message: %s\n", $error->getMessage()); printf("writeConcernError.code: %d\n", $error->getCode()); printf("writeConcernError.info: "); var_dump($error->getInfo()); } } function printWriteError(WriteError $error) { var_dump($error); printf("writeError[%d].message: %s\n", $error->getIndex(), $error->getMessage()); printf("writeError[%d].code: %d\n", $error->getIndex(), $error->getCode()); } function getInsertCount($retval) { return $retval->getInsertedCount(); } function getModifiedCount($retval) { return $retval->getModifiedCount(); } function getDeletedCount($retval) { return $retval->getDeletedCount(); } function getUpsertedCount($retval) { return $retval->getUpsertedCount(); } function getWriteErrors($retval) { return (array)$retval->getWriteErrors(); } function def($arr) { foreach($arr as $const => $value) { define($const, getenv("PHONGO_TEST_$const") ?: $value); } } function configureFailPoint(Manager $manager, $failPoint, $mode, array $data = []) { $doc = [ 'configureFailPoint' => $failPoint, 'mode' => $mode, ]; if ($data) { $doc['data'] = $data; } $cmd = new Command($doc); $manager->executeCommand('admin', $cmd); } function configureTargetedFailPoint(Server $server, $failPoint, $mode, array $data = []) { $doc = array( 'configureFailPoint' => $failPoint, 'mode' => $mode, ); if ($data) { $doc['data'] = $data; } $cmd = new Command($doc); $server->executeCommand('admin', $cmd); } function failMaxTimeMS(Server $server) { configureTargetedFailPoint($server, 'maxTimeAlwaysTimeOut', [ 'times' => 1 ]); } function toPHP($var, $typemap = array()) { return MongoDB\BSON\toPHP($var, $typemap); } function fromPHP($var) { return MongoDB\BSON\fromPHP($var); } function toJSON($var) { return MongoDB\BSON\toJSON($var); } function toCanonicalExtendedJSON($var) { return MongoDB\BSON\toCanonicalExtendedJSON($var); } function toRelaxedExtendedJSON($var) { return MongoDB\BSON\toRelaxedExtendedJSON($var); } function fromJSON($var) { return MongoDB\BSON\fromJSON($var); } /* Note: this fail point may terminate the mongod process, so you may want to * use this in conjunction with a throwaway server. */ function failGetMore(Manager $manager) { /* We need to do version detection here */ $primary = $manager->selectServer(new ReadPreference('primary')); $version = get_server_version_from_server($primary); if (version_compare($version, "3.2", "<")) { configureFailPoint($manager, 'failReceivedGetmore', 'alwaysOn'); return; } if (version_compare($version, "4.0", ">=")) { /* We use 237 here, as that's the same original code that MongoD would * throw if a cursor had already gone by the time we call getMore. This * allows us to make things consistent with the getMore OP behaviour * from previous mongod versions. An errorCode is required here for the * failPoint to work. */ configureFailPoint($manager, 'failCommand', 'alwaysOn', [ 'errorCode' => 237, 'failCommands' => ['getMore'] ]); return; } throw new Exception("Trying to configure a getMore fail point for a server version ($version) that doesn't support it"); } PK.h]utils/classes.incnu[name = $name; $this->age = $age; $this->addresses = array(); $this->secret = "$name confidential info"; } function addAddress(Address $address) { $this->addresses[] = $address; } function addFriend(Person $friend) { $this->friends[] = $friend; } function bsonSerialize() { return array( "name" => $this->name, "age" => $this->age, "addresses" => $this->addresses, "friends" => $this->friends, ); } function bsonUnserialize(array $data) { $this->name = $data["name"]; $this->age = $data["age"]; $this->addresses = $data["addresses"]; $this->friends = $data["friends"]; } } class Address implements MongoDB\BSON\Persistable { protected $zip; protected $country; function __construct($zip, $country) { $this->zip = $zip; $this->country = $country; } function bsonSerialize() { return array( "zip" => $this->zip, "country" => $this->country, ); } function bsonUnserialize(array $data) { $this->zip = $data["zip"]; $this->country = $data["country"]; } } PK.h]IS''utils/PHONGO-FIXTURES.json.gznu[ch9UFIXTURES.jsonĜ[oHS4 O$;3$]&ٔz̋‹myTS,y(Z1| %Rտե-ܫWU_?8Ms]i8]@8""ƌ[W5`XH¶&2 lAp4J3[A>|Un\bmk\|e B"5rtqH.jO3߶G  .bC jL)22!rn?cxQJ ch&$t1?ȇ$vJnl1(&>:MU} 1UÀQ?f&FPz)Klޞo/<&EktlbڧS7@*`z ?olF¥(f,v5 ?l:7/ծL}1eӮlQ ކu"𾮉Ї98XuMp7guI[* uo}$%T` ^(Uc5^epZ k繭әr÷=҉ j kpnjlM#4`>[aNѻԢyi3fK]#pq#KgBRQS}sۢswr!|g/>qeMi1jh·AdXdjtMHDaB;QQ]e'N`RJYbcG5WeƆco[ Ǵ)XfAF@v<\Ֆշ{m.잺Yb'X"<..` kWĹ] \ ] (C8`"`/շ|X~yi8Pܭ[-=\D>BU;}s-.`#,唂'X@0UgYm.aYCtQnc[ឥLW%8_1փhg [QRX `I4qL:IS1LhSbXp*D%,2Q)NIA @ΐ@NuƍCVIPJDP1WdpM'FIrCEsza^ 2O#}|>ܷa PTW ;]+i|,/\taXT@X?9@؆R ]`j./KA'.ܢJtсF@Ѽ שׂ jj1Smc_Ƙ8`‘(+:otܚͯL4~iCQ14D`$A_lozj}tl+Ƕrϲ6 CL3i(M4 SBCPmT:qc1V:ֲ; V8f46N5$b@9lIB8sdQc αW]ӝZ%VA)Fq[~tɩkO"h k]Iڇ!ub NW|',' 9¥,_$]c 8s Kd7t\ AI!!.=wy:>kt a{U¥7MmUv-ًZ'EamY'cA2`tZ];ѕe{w30Є k1SVHHhJBDKIK3.ں"˓}XFwYakb¶Kt뱇(jPzDsL4>mд׵hj2Va@ó V \ERy̅K"gYR %̒ʧv/s,Um%?a%& qSs'uT^72ȴbPΞkKQ ؗI I0NKI 2qKt'6Cu+@nA>uyDj5>C'{WN7]L`>AahUjA}mi4B?^?!W`>Zg丏&#iTΰ4v~vum u \3w9׃v/L&j:"GU-"CjӴjlb`#l,w[GƆ&*LiDf 'ʔ @KfLȽ2Ƕ],=Xc)P%'"X aBtޥڍ(I/cʁzCb@ttP%#tWWY`;T5Y7IKlU ЗWdڂ-[ށ4@^Tu  A6#,6(*~®&xڗ&n|5޽+\5Be"Ʉk.rr~ ):aYMno寋 . PDt4 GD<\>Bs2hBaeU mOg \& i#J#)\Aa" -;HO{[,J'. & 5 1)7*8]"2b n ngZbÍ&.ҪKn˦*vbط0e|d`0PEYeW+;Ѳ!{ٜR=S#jo@ uYtMv k$v/02I'ʗ9]LŁӧ\iGx}:VR@Z0UVK, [J51 d2IH3Ǹ*M ivIf$ݢtgGSȈ,F4',."ո\J'tκu7Q M|U`n dt6B>U[2k!|OtڪDg>D{ZZG&/ˑ0-3"/';B>꼻t苷+*>xöxǔ{(n-7hw<",$q8cQjVB?}k58kN$/ DtDW~"D$`^|' @gv,qBZ 0G4s w6U^)Iic@l4YE{AޭEa <(9⒪Q4u_tjRPt i_tynhC%jJ}b˞_P \Hڨ:}0']BBkM EIHBD^1X{ L]

xC1ع Ht]S-7n"}J8fTlu󬮺jrL]x)HT>! |?hp-##oji>\V\ۛnx}Q O콽~j1}-2(<Čދ#rHrΫ%<e:ZdX%3?a7A *'_zL¦e>4Q& } ! &مTH˙DH¨vFXuILylC-3lL44Hs^D_F¼K}2&O\1@0#n[U/>nrUƳnSz ,!ۓs~wi%}6 {`R J7­h{C;8A;ܰ]b}Ds0LB|UTx@H4X#z]U6~&I򝅊FmYE"ŰP(wt {hŵyjN&&bP2M57ɻBB#ښ6_A}Oq}&jGvIJu.[o@DD^^d)~g^T*ҮrLIOӧ%_&=w<%h1>s7y{H.k轡`ϕ? M(}uӥ4_.'$!]P2POd ^Ha- b!_}E$CCZpK"3-=Wϥ?.C]_g|m*ʾ!_FجDP@z(fDӦi [gIӀ)XdaL"yA@^$}ʛ~\ VĴW~|~H-4r< MFR3]MSOD즟r DϰmDZYh 9;͒h*Hh9^BP[@|ƽ< !y[(ݑB {2F}p̨b9!FQlsʈw8igLk0OFZJr8ʭb:!G` 8@f<٠;͟,kܲWD#z>^8Ơe&<: w=fBc 8~zJCf/eĀE5gaR?5g j".ZC`-\ ~V/nf?}A*TŘ<&k&T ùS0IHut8Lt ,Ǫ O 8oPmSFi|qEا@z@e\naGup.iy*IGC˛t~瀮 2:T#FA?4(vzfGKxk1Uof2ㄓS,9ڜ*uHy3 ȞPW4]gJQJF ՈZoXQ*l! g{[rC$ ©hhr&Cr9>$Qvn ]rJN{tWhs7eW DybCO2K_)2 SdhEӠd;㉜s !ե1r!(V8*hΨ"}rGmksn”Rt\ pCg_܅bFy鸣Ds~i B ɨ~[|_P| B/^Q9(28dz*bUY EF=3NeI(n)eE >. $0"Ml N| X=H4$9ʠ_o m9îo:e mGРm5A@6mt*X|HbYf-/'WTUhvN_ix(amYdn'L*K~> 6Tv1

Z SVh[ )s E ޤ;Z*܅8s}KAs6|2Z!N圛w{Ǻ^n娪 Pԓ_CӬwn0ϴ՗츴+NI&gJ[u;DR\gNQ_c7qϒmSEK\+AgD$dH5싽a?ԈgK:/&,!**yYJS+3!~ #9ٯ]1?vv|U#<:ʛ18FX\K^gWM9O`CKj9ˌ] xKcqJmªwDN$;?$G ֝fiHдwkH:}Z!ZM_9;8ٗz VOR(CxA7x EF9Q"bŢ=QI~1/Ò9`Uk· d?- qujF NN+s%I # ɕ`< = vc ?QUUp_XzlUЂԺ \J&dIPa" ўTb ޶sw{']-&w.c Xʢ}X˃kPfJ4hGEc)e=Qeۅ)VE'ͳ?1[q%*~F@a$ʙCvcB]TT.IM7ݲ/Q]NL؋ )E'e:]A uF@g7e$987Տ >O&/fdeG SAdTP}iHM4BPY_'t}f8Y9'dp"rJE\ W(U9W:)Jb P)c>|U |_-re]Χ.ۿØt, `^NKZW nzibZ v2uiy)̐c_Z8áDH ܥe27><ٛ2m h)sa^o~FCFpc7c\Dj͠pu;÷33@<ȴZ .UhYHZal!)"@t^cM+6udf] GYc7.1lF } }n*NFs;a!q>ne׀i ݛyd5./KFq%G\³OuYe!^%SR:_11ɬbxuNZDsl=D?cZ.oHFA3: CƟm߆txsˉtʫWB"\U`LzYT%Rn k'|',j?*K֚WCq}OA3v AÏ+ɽ(~{wWIQ$νR1V<09DG~b7bPٽz Did`r~$V`Ij_ ťRBOi! m~rMy\:'yfĊ7ہw~pN*Ħw5}n)ߍv{]:y&vj .𻎔[cV_ Nsb/D $oS3 %igY8Q~ʜD5w7\܍pDl )X3֞Df"8{$Ri 8n*E% F;KV )%oKt!bxuuu/6^|$- NхX˴ogH԰рrw~56*?.x2ۮ0h~Ivp{{=043V힘3(\-k΁yOzt9c 00P}6xq2řx~T͗uuvU׋wUFWG+GFT"K5*dEt=TFDT WwH/>m+ vvb|Pؽc&_@>A`7y- v9ޅؼ==-ژAVƣ-\Ī[?)t&X1 *YVG0^y(R \J*Vhte}^ "p"ኢ]"4yǂj>G(^Q?⮮m#}YGīTk;} "BleUCɂD>}VМu~9˕;7^HƸp7|l&;@CԁSC,b F #A2QJu WB Ӈ?Ȧr)ٸyWiA":A?Z`bq,@9)-A9w 󬐚@%RS$]*R|qzQMh A\ž3%B3{qf4}M;By;Qxݳ+vgg~ӁuGmی B`lÙ lӀD?ݜ2';pk@&6s$d箞@H3zs [4=aRHpqUe׆LI2/OX4?^d"8`XO%2V}TRc?0JYO%Ja/ <m fd᭗F S^A. @\;'!z1DlQ7=-}g'gL\%ՂT^mu.wH`k[bĐw}śJ%uR:HN Ml0|3IN'n.=g 1ՁYxQ%|:1% hnCח{}@O!f_|EYɂapZ0Kj%̭%,=.^A< |곯~|V%ridž-/P: _o\=~p跫/6s[4GU԰bsKd{P9ݰ JI(Eں;%@4̈́XTM-rp%<Ǵ OhAiԣRUK2 ΣW* \UϮb!Us͵bPfDZ'z)k1.d__{}"n7 f A& 6;aqx8 ޡ:LeM>,]Z!cl S(郔u6hHF Z,?_M1I v̙ eO7;lB3.߳]hV}8jY]{i3lx.37*3e* |Ii(Yf g*EAr :?. # #WtPf-Lu#RT18љ^[MX ͞kH\ Nr=T7 `s ;ȲL,v[IWIvmʇclypHwC%%@iՏ#Y13Tb "I G="Nf79SqV7ZF·*c67%Eh+LwyP_r$򃢜g9*<)pdqYL*;6ű7r^VӰZ4R;nݷɑDR~ C|}˾&۶EW:?E^ oF_8/'8qGeϺ2M< lzO ƻpaF`%sܪ)қ—P)sKI/h@&qͽ:\ݜ2DOFģu?U75/B]m9=n 0eMZn͜&+㟴>"KN>:1/\"{Z\q(7N->TmY ƛ]jxv' gf5<*2 _# ֚ BçIdBЅ ׁܸY_B,=8tbp'D^B4aLqdRoPX, 3O-*M%Vr>W,SYl$sW;K;OwZU2E}\ p(-a.k d_܅zzpüz1j,[ KmNuibU)|{M`Ǡ#-> a1 OXGضs[x4Rt4J*E#: _* }'$R `)=2ʷ5Yd=.-+?8j;>ַ>Xl]hH^RS#)3NXᦦ)xd~ mǐkwupwKb$LZnGK2YFxU5ƫ$j$RyJICp9@Һ2PX[\h^4JIYrF*yeU>*SLe@7Ht~h0/%2PܿHT2m|ٌzPwwؼisc+12xSlç %H4d HkhjyQxп^mp|\q]7AvEhØ,{}UT9d0uY`)HR< w!J)D=Heo꛰$? >cϡ];pz4NLݖ>m3Zfo$Ävʘ`Z[ -E?v0!ux#"oCܷݿQ]W1QdpKnZ ÞC>Q+*3*&g1].RW!LPaXzT\Y')2˕fJk.aea;;*tW!o #i\cJ/YOx/_A ? 6壎wo +ҫǸD_ ڴFh?V?ʑ.~G"tϡ53cd/w/ W^BP,|Q|_Z [{{ e J/d)9݁b'(=6cdnr@zj6!pݼ?')b3"c;~4=s@k'K2O2yN-ϛ-~OgwN_/5=|93 'i(2w]yb{NjBsؾ}uUuD`#~(i _w|՜ $J VP2tid<+J -. 2A5oǻn Tfn7[=KK7Mu~:<_tGnhb8L1C}-޴32q_. ڙ{'}}ӟ -$f~!-YeFvZŻ,[|Dx>Eۇ˷~ƍFd{pg}WIq*?ˁQ 8z[b@H*vJjE {ΕbD XAEI. ĩ~hBG< <*fJA3CE 5y~||H+;QыnpwzgeO۱C~ޯY;~1B7ɇ$SA於m)n2P'^bziy9_RBO"Ͷר|}%';ύM7"~vQUbݧUF>.5UVki1d棭GkV{uHs=}3w8;iC̀PO:ua,[ߺ#$,~r }<uήlx(LxCZp]0ow0#% \\-liM}7G>;pXfKRPoϹyt` 7qKMש D^}oӕwFv`=g.8Xu !`M7Nu5>1MjHTȌq*|,8z?ƹU&3)pgr+ǽFpcjgQhBV$)KmJq3j}; 5pܼ099LeW+6s)S&ji!8j ?v\pnAm;;~^(zqؚ$~H^g{j:]YsF+|}yOXN2v]a2H [ʯs氨JR(K0##j`vNԓhԜhÕ'9Q#A #@q1%B:h#A2DOɋpv0A:)q ONԜoA *t!H[jv# Um\8LY)%O !jua=Bj,O6yW.3Bp.rԿ3Ih!A=_C/Hs0Dh;eF?7j~S*qE gX{4 N䚖VZ(b0~I0uۄ aX-͎F+hyy4.,:-?XyP GF),ՂВ0YV)&s/lb2P~T˜5›nP5# 1ՌAȩRPS\+zYeV^q&57ҹPӐ6`vTQ5p;H{o*} A v>_I=p\ R/Vfy(r uy \NUzf>,w`BCz%v`$P_j߹eZv'db> ?/bԁjQc|zs{ PU;00j>iz[J +цuJ{śjsMj=^)l5=- [~>ME W{Y|ph85TNlf`r}MF` v5l |DRp;ϩyYL/6%V@"P`!p;gK- oY8Qb3oU̼͒iaj5ZWj]ns,;z%W" 7e4NALT}ɯjo"(>[+e/JxL&o1+:wLZP%4;Z0' qD%Xh-~V\e9[QSPv]_+]C13|%sr:WxO ꢗ.h=OQyޏ% ީji[Mk<)/>^eS\dm]ekVJ 8T@do\+ԣǃU!=Uϯu=$vIJ_%k(p^X^(mawʋB\@BR`3[~ gAj<ό0ɊLRff8 &XmR&:٫%]Dpa&N?9lNO&qn2I7~of%Q3{@vWs3̡+|Qx.ѼH2T"Z=0h=ժ4J"se]2ۼ^:cK@rW_!϶yXVu0UKqN9Rr@:⦚ ^VlmO_{ V\Tcnjr[mmw┹tss;lzi;J={`KcaYѸ8[+z;Gw=;+6k{߰G,Υ n t<S3Rّyrňȓc@Ǖd 1*K3-3^$di`hw '5qk7FҩԒɩ VqgL-! -ZQY]Puio)1!Uk~mmԲɯaᩥ] V=j$-|k6y ~@ycuLcJN`>@#NH9A & 7P"~.ZǗI2'9XY0duK.mlLs<k#<2Ғ?d}C+v,$^&>ND&[pN5Ľf{cHFPb}ޅG2ZȠP=@s*%zy]_5YG{dSB`Қ#wll+c3l}LS7.B>O`ӨL!xy S#70UN hAݬ5PϞ/8J?)͌"E~9a+uAKP zwhNlT (1+4:s^$*" ]8~ Ths̩O{?#ݼ+T5/UE-!x6Ԝv{wiCzuFW(FO uho{'a0nu;)܌$(]¥BPiR ԓ21 +V," SI{:`uA451}n¸Ns$ "N~߆h5y'y# KQn7'j 6yZi\!٠:4 Wjs>gk0m_ƨ9qiu'B*4<:fǏGUyn$CtkU4_mb;C( ³ұiarPJW6s{]Zhmʒ$E-'qwwljH\ m2)eSaT\`:uLx4zd%UUNVvWU/F f.pD]P4Ѕl8Sb ~BFjr )|ۿ}qwכ8l\1Gzrx6gA =]L6$/rp ﲻz}j F!h.Dy&Vohμх 1)*ZSʐ2Hka8O`Hhy =ީ3ƵChy ~{H.Sx{>nZhxjs׶ܶdu^Ԅ}<&ؚ8>Iͼm"LbK7kX!-RW5^F Ci<]Ӿ漽q oqj^@i4  W Xy;G$p wsK9-MH .sZԤ.erIIVTj],T3FwektܕDsЏ7g*plO Z5^G\DN=%tQory"ߜԖa wEmkt=U%1ŒR,@*ܜA|w* M`gHޒ$Wa Guds>9iyJlns\FrӜX< G. R0Z/Ny!?MdZV'VZySxLߏ~޺Sś=\?k`3-k?q!8K8:h#Q@V~h~9.(etv5I,|s ǝ#Bg-(Ĝ Ӗ M$NBwBׁnSmO/N">ˬ,,|j 4Da -cN%"O)B/jP^X'A[7"9ݛg!'_+;Sϓzo~niI'Jc56/qb׮o۾:aj ra'7 aA"@uܾ6N@•@%)զVFTO/~s0瓌ffPـ d`ΌW?a\pZWN(< `\2n8$f*ό: n2CHcbF)K7 LG!OIhc7x8!~}je>  DDB>"'t8vb ]aZ#l6w>mTϓyarT7(ŝ1f>B3PMX+g Ŝ+44p3Űnf7њ$I ~.x yp*BsnTWfO ;j32ċ:*(S@)p@ڌ;vx.֢2!@)l%uCht[X`*zs|41OyXtis.B L>?s߳\Sg!/@r3(g-$DA9-HmFO ]|rP=rnS= 2[WSA-Rri-|/$@:!So~a)RY(:AV93byFDZ"pTǫ lܡr^?+_O:I9NI e,]_7ҸqWQ;:S>t|DuOz(?ĠO ]%8!OTՍ2ؗ(T3lhqB>UZ}ѯ35L*Ň-/"^G~Dɝ;3K-jnB잦Rz<ФH&㒪z"2J; {W;[OP(DID {c?#jh/d(wΕ/3{nxU. l‹'vQ@\n/!Ǵ\ b7Þrwѣ*W;w]rK&K :\em۩Jn7GAg4˨ϡKS͵w"3"6'i&.4rEf0Kssyz?/O݌[Qp 쫺mR$Z`.S5GF!qv\Wrf55'g ^\Z~n;i~07cZPrA.QǿÇi.f+4!VQ"{M$TFr[}Ty8>UfDlwe۹ZwcV\<| uzpȀwwCin?A(ёmcFfN{׿U҉IS JFyS?AJS"PsDuK , ;">PSRZHvU p\>q#n]n'??XH-hC@{2ٿm.%zzGgJtnń~nѪ)4Nm-K긁Nl,8* ;,#N S[/]}GAct,'; 4Pޛ ! l QmdМ,k8ؾzyK3`;奡T^h'W4w2JP~=ZIuuuL#L(U:.`3y،v%$76OUR S\+F.T|*3fJ[֣%ֶF {)ɓݸ^O_%+V{( uauc_w/-:}#} PqW_U^^HX?W>QA!QO]RfrLgC1+-hNҴ(\nRg3hMJs+Aߵ,Dfa /]31??yG.ߍ*M%[J{O~c?"^PYݵ Y4Sy0;F;^ fXkH1=R,dҩ~7j7+-ݳ/-Md}M2\-ŋP㒵ߥE&| trav;QzR9).G_m?<һ yRyWwwgwc'ĺ#ziwMKm,<Ts0|tKF+#,рaԇ+6ۯQ-aKu\kqt2k2Fͪ: y58AqMߘrLJ&3Ұ, o~WLb[@3p1@jio54VN1pkqd}]>5,r OF^p%D^jS3J9>GsCsGӔ  3283>0I>a:Q }qVX!K\fSG0>2 %a l5ϭ* -NR2)+3%P< ʎsTBA҄.S"Cy)8אvx;*("Ȇyi}eج caȓ&S0 dMzBBٹ/[DŽVRZz{kJCܜ_07|zT+یR]UFM$j4}5U_%;7^' S{s@9a)c)_)0zd^Hc~@ʲOorjxHtwDn.C yԶLq﷩W%;ސ31*ٺ|:;S6/H` 5VweMPA8QO,Ͳ`$!8ھ$UAX=dXİT q!xo ˹E&[(qZ [(*T&-TQSplmG35E>c:sf?+ 2 9T,/CO?&j0rHXv8J'\C__Ie~NS K+knjocU/^8c]EX nD X<$qn_}"L^ٯB :1a19NMQm5gQ`<!b}*}|$A;JY4v0R,w6qQ<кVWz!;<\=t9#Ʈe~ <9C* 'OIS$z00e6ePUqS̍,rlCv H $F{B4S6Aה39/3W)P|"q|WЂsہ%j~f򪩷k( u?^vdqRs|\uGgz.kH+mUT뛖"Eȝܻ#N|B71a1Lnx>iuvx!s!# U̽bY]|TO(ߊ׫Y2pJ2c9h)i6oIu.Gr5ej(`9-ߎX26ޑ׸n6"So"DA鲥JrpR,x8dDp#JM HG2ImNg * C6QΆ9n1qt]]Wdy2$gBRе3l(0L^-Q"8%OYT=l۷yյMaPϧ8|./.f_ih*MŘC66wXwVD>'"GOh]K&*)Xg,Rq 7*EV _ۭr3_=f|f I\)4 HK/oa/ )aeY1^ض6Ð% );scdpH;U><6VOys˸a`` H -UybC|NJ9R2!d+T[rxDn5K?"vL&%6o @^ixi*1~9BqE-z>zk`wŲE:LYJbzex/#d$LT/\c I|…$)RqAԱB.KJ&}I-q/0S,}lX^bz(#?0ch纾nf@#>Z6uyǢI/j{1d풮Ԅ *f\F?]֮wI[j(&ZrhP5c&|» I"Dj^bPޭcY5wYG#0^Im)bXqrS] M#y8[#\>M>6?98HV`fԂ6.+xn42XEצ[bReτ'!vo W:*,$f pp"|– 뽷꯮V:sr3름BU+wʵrKűݞiVRu>nd&q d)YN:¾`ԚA^!Q@ j* 9Hp /')H*RC>c[Y9Jf$4vx+(^wÅ0+y0'?]hrz>EL3J"Y+ UKnل4QCB&^vIRD Ȍ"Y Г몁8Lm{LQgafgᜇ`r/'7.&ut ^ofT_Mo 'L)dR-wM߸Ms4v4؏S 0mxnNWEaFW![C0[*S)2b{*kb*P^Jsҹh'"W8@qNX1&FR1zЇ]֋Hcbb:-CU/MTlcWN4M|7#`f۾XoScB P J lju|e3 ু(nj\ 9[)"!<:|g⽥Y8< Pm?R}!|"]yp5L؊pVQy`xqtA"RRL!HzݍX>AVV8}%ONWpP$8cEB˼n0?>Tm=؁RKO.RhF -z@M:A$0&,Q*n} *~Y)7{0A~3K䣃7gWEWOE. 3!U{s/pnD'/+VY!z wW SY`" eӸX4v8l=9'I,GmU5qE*҂Z?8٦9i<袤c9cåLvWͲM&a{z. Ə.i]wup.v?g>*e&VUc&*-7%Se qȕdLP Y{HT !7&.g(D>׶q^۸^ l4b* ZFwM9=0 %ԞoUr7whd>ݷC}30 S{lA<($L2vU/_Vj.C *'ͰE4 5p⪬XH\)H0! 7g(rģv>R>3W*pEN͈^ ӆrO(C.ݠp^vZ.𕗭:cq:S+E:a%X"d~7E$GX,;08\׷<,L]"DزP/d7YZou _m:(@Ƨk[{+y}>n1ZsFuj% PB~ NMwo yL=K#Yи1bk7fX)(m:o<261R\LAz&r\(}Js3ꆙq_i4lˆUk\R=Eeӷ^L4`?{CcY $;O=2Rk2,ϺbymWEu {ɊG#p?A6:Ku^yi?1޻4jԿ\}]pHHS*cd` L{S,!)LH3*cN>4 B9b,3OtaqdԚ_d89|Ժu"CH%q$*9i˽b)2mj s ?|T wJ)L-+e!0Y6F\WF0 /xTn^(={$Zs }qHUP).3Cې' b K%(J6*C$Qpzp6>YߌBC"KP)ñ (킅瓷?644/8)o0ʁj~3ymhz2Sj'|q-xbd%%V'/2r$70K ){  .sJT^gN귭w&@dZԦ.U^v aJR>`;5t|ӌph1 Ud28b9oQBS2> jPvB"ҋTDUԠThD$@A4<9E]L&zQ`ʒHV`'⻴2obc VUs-iuh9Du gCUzfUQBy[n8բwu?|6R{-z06R6H)Vkm$ bҖ@e0N#1*IuΤ`0^J#UL&@_IϡV8-?TxN3Hkࠟr?F d.}x3~g|]zBU&A5XgIԔ ԾeE-7vnw) o\j6V7/-AvexAyKvW :ˬ) ^5]3y|(PPjUᾀʖ]*"q Ek\r, a䙂BH ㇃b ~!~yz=],\ : IǤ)>9aN^qGi݉)GA^`"J!XZR:%J $Xb(ܸ:#fI$[jC`2EnְUMVVw!h{kUWR[9 HyO);#rLSZ<`+Sܞ=`iW˜;베E#hwI!OuG!.7.JҠhnb"d 3nke^к 8Eh)u1,#jאk?WnzEqoêL+c"lb^0]H\ܮW@{炿M)ee7#sL3WIE[Ga&qlS(/EDWEI$ +'BRt0`+V>yX^&6A7k*m֩Nqy':pƖO"in`!d<0g_>#z -<5t\=9VI)5Dg8$c7u쏲'QqReSJjwIl9SK L.˹k Y䌅P`oٚszw1ƅIr.`lJ;f֊ɔjM,p=}8nB,%>JbjXϪyqt Iካ uEyB=n<>we~r;^oq"i,ˊTg[Y"<Et#joeKQ -:z4DIg4-ἪkRu2"Vӎicbo(;~QVuwDONV}6\!$YCL6ET,o؆ZzŗJO|w:/&St4V׺PnϔBPpt6I^?^lT_u 1xr-KGΝ4gelֽUxBU.h_~dXej2c) 8  FiN ՛i?ٯp:ȩAsYOS6u2 EC\[U+kyuqOecֈ3 69ϧq\ 4'@"eKԜ7PLr͛AMXBR<ˮRyMP(-B1-$eMNMt/!,enҘVa)py̷F +ˌ6pw$nog9Ȁ֍:$r7TR&F9r))fksf]'K~ *2J*:DOj^/o4;㺽X(aWb'up~(v 5btN]HJsI;sdui\ap[@]tit{^fN; ^#F\pQhetvw䐑ۀ n#>.c5Y4mYڦˊ5U$YRk62 24u^t_3f$y.׳]ֆz{4].1q=- ! ^ D vUiUPt(D{5*(sQhs]Z ejiQOshi$nJ2:hOؾ51sj2b+SmfVUAJ Z%U&M횤K֩LxSekCKɯׇ|Xi뾣ˌ)瀿Jߞ ysv$e)b_On=K^ hTe8sxEd{-8gj, ‰iw$o.- ?8.qnޜIE= 7^i-_v;_CjMǔ2JBє`" UЭX'$F.X>MA$o(2ܽ$;ƚ40t/6sHȀ.A}#Mjk8uf8Ô@@%qVr'"3ȋfK׮7arĻo^vo Y+]i ?/_HU>I+KPC4YER"" f_Eh0*PUO݊_Ց9a~KIq;Pvsך6+$7TWR% ȜL|^9>j"5֢4GT w`*^e-C-ip܅t^!z+-р4drx/=XQ $_^oǒV m)"0'8nt1|rΣkFrOI2ݲ(on^Is4;'3dl!?5ۚ=sfi?B^7as.q%0xxI`F$jI(h^G T4xlOc4Girf. T;{$wE?{I^FPgyP [ru2fsg҈¨γv Hr3q<-f wa|tnJ;܊g:8dtqg7 7F_UÊx%V( x}̓ Ѣi#7ѡxI0Qhs`BB %MGE:4AkdùR'qE~zy.,ʅ*6ֵ1kgHqJGDq6[UלnL#ݴqRܬiê˖m.ݕAw~CvA SoS7 LJaYvt/Q@"geIQ @V du `r۶&\&C}% 4 sA048Ѹ6 ;ng 5e8QU"|8Lu'@@WQgJYdU@?~KiE•Ӌ-Sb%N{<1Iá [ (BT::B8=xslCQc˖,n=ԪI_`p1KA(Wb.Muե&B.7AxM?+s p -d+uk]BA %jB V`5380eTZ>k(D >΅T~<)+A((BV` -(*ird|,q[owk_Wɺ[&q?PG wڄťDZsmG|1Ɠ^![ N(e` 4%%i./ʫ@5QJ! ipi#Ɍӧ읳푴HM4R0nv>҃+(%aABY,|}N Khڵ8:icl;c;TFhIayJS.Pg3y#o:,DHM6;eqH6.Qr/ ñ>L J>oY>j~=tmb 8&zLOt3hބ/r]/6`2a!XA:7![1(-!)㬴NzW *0,ȞLE3S (Ql.~,̓ffj$YX E|ĉ" 3,ҳTtk ܂HTU`״'9WV```VH476^LpAcqNZ~sTL'1`&:S̙7ش1Î [ 8v2g$u9X[;|4~eYW]41𗱖O ӷ9+_v'lޭ2MĠRZW̑+i$~q87VUpi)5vRo(y7}i?@r9}{^Fʧ] LyB,s"z[zl=Q; ڌt[mn-iv-3q̘Rز #voƦ~X>He]hg~єNW+X!՗I r57 }--\(] !έ4 ϨK*|P 02))DЊҗ`Nd%Tcs7l]SScbuIP(M9-旀xQY,@Y ̚A@ 1`PdN&EPfvVIw&^XaSCALr(Cxxy&8EUFhו R0pnp[b`RZPmrU),oe/|ikQnXN1qN!_R2KS$ @;` H ÊJ(; ⽲ uނiuҬyȵ2_UES .: o۬}D+=< b܁Wl4j9+%6lp.] YS;fm}| ViˮBf^{;I ydcK&@;WƱI4Nsp^89QƟ-xJxSvY+"umCZW]_G&6]٘ê8" x?iMMF95sA#& Ġ̇$Ʀjt]mMQ+qk%Zlsꍣ}h݄#I-))op#h Ds +-&p{h^όanֻ|Rۣf~<+ t?k0.o%Jpk|8-#摨s>n#ȿ$ֺ k@[u|ߤ~>x\""zn->EQbi (:tSt8Q &'&¹ܩeϰU ¿ |gSkT3x!N1NJ: ,.q!{^`|' IWn&Lc{/X/j m!pl>ڍ'HKriCu_^n iۨe/Ȃb&6';S2$!}ӛO'*}]_%19Jz$-zƒyr;d i$=ôym]&9"N_ȓҵĻ{uzfק\>W:epx m,+lG)K8jma9?aG-#f>4ukYm? y~z)Bȓ4Zd;;NnE;6H>旝i͙(,3)̞zLZieW_ad:iF -g9Wp3""gȤnXHg{nSۺLDi`Eח@U 7Ku2P,IhgH?|"b8At1g*l$͜0G7I%yvjz{vL!nS?OM!~{~!sPl,$~1pU>veEwhSom}/mƓ:ʯF.N;Ko^j=^FZDs(}N U&hK@F&רJ?m G0!Ӻ=r,.n^Ѐn&,kgsek<7Oϰ(I=&^Ѧ7կG~vrR$fc3e/ޮJt\rB~3d#ghqI\~_5WA[],?*O)1\ΒS)M[~W/gx[&=F؊bo5cf4W&uP`U/3/`#0K]8cu{|o=am[M@y`([:o,6-?LpMbF<ϳ"Z \ʜ49tUs"J s_2(սˤSShZYx\'UDJ"H.3xqOrnMZܟm#Xk`aWcv$Elqq7,{A` em͔FJia)*)t 9+NbEfTV9izM󓝋G&NcC; ucItHc$Mbf.=}fYmmd <;@є /¢5߯u/ tt FLRsm2~-M+Ǎg{hF9rZhEqG#t\22L_# T=NF{-@USEFA:vjU;W tto_a-$U{<|IlIb%%Tp`Tɮ}0m{6͉:y I*#(IF>e{M3(*~~;qqJ {$D!B_0̗&3]-8*}; b8 ܜ4yt~<;9F"S")][f#8 0"~\kR_:ژ[ +?lbJ"CT$>3ZH?Ź"IGU˗t VlQ2m0d lH [v}Xp/pe;'JTXn/Q {մb =RURnL ^4ϾޖAkؐXb7HRjfIYf=N\{ 58/6-W?tH H㑾+.ƨ!`4ӽ@c,Kx(pSd>ҤFHK,L9ҫ^f[lǬeiy5زpUoCUđzEsD؃*ܹŅ8k].|.dt> E_M%CΝ4ÊQ3J mN]Gڵ5뿢"x<ڞNvYWID"YͯO7@( SNm%@߅O µj+Vc]>\$q:c= Q>U9]1{evlĊ3#CIoX6 qbۭxA,CR.r,B/ly&j$F&!SH8M,bgsE޶}5/투4絪92RxR-|e;ƪ+\o`7C9'S=E k)/X1]XСFg@e ͛ uM~ыFM;ɓ̒$1Kt 1{B@VjbUqeqW~Gju]c2^[ߪbtإ (yvm=+y<|QCF2No~@nGEF v`- 4e1NX9lot'ER.7X=|TinE^Z KAp<=I@e k"t_DK6 %p$QsqlWWk^՞u"Ry[9P!O'̮+%H_}{"Cپ`Ȇu*Ym*3B|0-K)|ryQ, \tЭMfX[9ZN}f>x4 yBr>2#dN_|IY8F4!3ɺ6NWg8s3FD1EBL22 5ŞߖGUX2 =X#<Ge.-{AmFSTL6;Ymo- L}7 ^ZE)X(6 {9 |@m~3+8Kw ϧa,j]1.~wBN ؍8SRH~jqK+Żfբ*Ex7M9HJ+#Y7tǼMx :3 P) C72NSJQ@WhF+x콪&͟:%U=,NCXc"'M{wo0xKNgʸrFfE>z >eC$fѷwaVBq>وE>y*-R- 8Ehny >`.fQEN]ˑ7bʆw>}un!fBzH?x@t'`%&O, jYuLQSe:%]T| "еVeY^`kTMe6+fai BG˸U#:qhY}˂lks[-vziוDF7x#O8,JBD (J̜TjǵE$jK|(s "WLjLo6yGԱK<*7ML Y ?` yWA GNë_B8بjQٗ:mihv2<ܯjFP#9R/ "7;{659-|nȰR4Hg%U58Jț`vߥ8f?%nىza<(taڴQ,ҽS<7W}gRX^5>11s@QA+7-s7 -o&VxJW}5F{p|!!xaQ]h@q-]q6֙ O)ãZ)6gդ6;TJyjØνyD N;fvieQ֣mban_-k"+GZ?ȲE쳖); 73E\+US)so2\dV\)%)/TY,I-%XL.>RX:}mrVV">5CjM]c,q+5\)aB)y헪ily 졍݁%吕/DV:fpv7X(!;jaFOBWq;qLwd,C󗺂?eCpooHj4Dq\n`-|휠,pMkS^\s v#zShB f4 jRjq!Uih{>⫴>/w 9`ğStR UʺᎢQEug8v[3Yݛpu4]gYSKj_|nzqZN/t!Yܚ\'H痂 N8` *=Al3P_.Tcz Yz*jbRk3 MFcoWqǘazK apNlZHw)f)z[Hr薕#(HE''8%mVwy=ܨ7R*x ՕRz5\.y ޖ%y~?jcK4}:+=wj&unNӆȞ/+&]QX2zQsI 4,yrX*& o7GV1Џ;?E+Q.ܫm)B}f<rSK&"rBfV ; ]Muo".G8ji,EBHNUZo@!}LYݲ9 T,o5=|v*泎`?LafT1 ]F3z@ޚKY<+qi @ /Al[yo4rBvnFQ[IZ7Ftl[)aʢġ- x>UL#J]1Ɖ@*aGy˜WBed*ZBv%*6=7>\٬Q2+*AvuK71 |D1͈n j/g&$,ھLMѦ(7\{ȋc:gP;#0J " ůzbGsɂ7y.f;t@|2oUhPϺy)Dfmb/Β~;pN٢-sb-[i\*N*ànes=Z"ڜ6>‹fv4V2} _8j57%0cᏲi4'%=7 oFx|waePI[#N^{*\E4;v>UZT8b-=JASsz8/=KR^IVQ@G3:DIxA?-UsbŁn.aVu-9k. ЃϔDq,ABj7ycv_U^Қ\G2\Igs2LX9<2,GQ#7"_U wݕ,0%"XkڮqXwamdYa.cBgp3s:#~X_c/LD%vNOaH\1k,/fmk9XѺ"<85%kL(J\_$sV?cQy7+Ҁe&I. KESWQ8kͻCGZZz)TgW6M|7 Qd٣-S#(<2hxx M@%+D\M1RV:YpRx;\ں,Zd}c=z%`Gxwm/7}vcfinaw%<)P8kDyBXmHHU DyLfhɹG_%Q 13.Ғi(TFJ%$.5G ',lc U uH6`u_=<=ƱlI|V@]iNP;t0Oi_Ǻ:SpT<7H+`VFs|G4ͦ7^.o1>1#3ۋ@5@糶hOj4aJġ U=~'9+b&mwc:F b_v¹H(h'Ɵ#h,6ng'oQ^22{ssdȥp>S9nX'>u͡٩?):uŮ=`4]շngo-ݐzP5d:f,Eةٟ2|UrZg7aТ }?ҌghӜ2뫥0ת(tD5Szvrzfqc 3c:5N𞼯e&.i?"7<֋C4{֖߇W2- YfB}b":@a31>mj=yw{_bs h*(貛Y[O3 > I\쪹Њ'[@(Ҙ%"ty[n^GqVpz٨v˿qOBۂf\7\%(dbNVIlX,_7z/EӴBH0 3֠w:ːDRplB5z Ѝi1c‡ʲ;gN;Ms¾p}};3S]Bv>Y]̣F-a =`zvԗu,LݙL*ZbW9 ilKCQ_bs|BK"F[23dAD׃n"ry"NΫ̛KpeXڷm*kZsWEv1x;^H ܧQ~^_Z֚DpËh$.̕tؖID</mRKU V{Q̌@+FG^ ٷ޴w"`2س 4aB&1JY.{Oi0̅"*U!10_VGgjm>uv!14f\< ,uvAR}cwB\Z(ݔ"\nDCy'n]NA ̒X- r,^>Ul&=E\%*Aao`YEOW 3L'1/ gEm|n멃'n׹df* re%COiht6\4wv\hHyfUkw Yߓp{A¸;CjSTEuASYƷ_F #l~QT _%4і%NUIؠ^m4b[FS!L%" *8ƱB*e(3pJܯvia$9M"Y!o֋Z+BVc'zL}4| cߖ7odDA󛲸@[i~1;Pl#LvIJ5ݹ_ӆ#$ jPV&f{#V=<^izYBׯvF 0evIњ=\xOEL \ڈAhiw*}V/F> {7AD5g:!1~Cs"nW$'yj',XX@OL#p"as ]yklO:W!UR;h|?7 H/ḩtf豕&UK:'lG23-U&ir2J/Qt O^xhygz;odu_K43+|΋`ѰYr&"믺S8%B9CHb:E⺹idK(P[vKە4,[_Dh{݊DjLɬELfwJr@X)q|/lU|pL67˲^\xlΝSYb}֕H\.X"so\." 't⏪ 5ct  "D n-yQÎq @"hg1E&&\|j\Y8Uƈ~I~6C07([XI .5GT7 jmn1JDC~u("8*թVnBwӔ 1X2KE ڱo!6n5׍= ZXTC)d;9p%qG/.!9r:b7{|4͘1I}1nyoEQIG[MDH|YimϺ5"`0-~̤'Q? P {o_l څAND\o&`D$"crk*8HDfF}~&{V= ϰӈ@ )¶e;"<k(2A_SD!{,kWC%Ҹ܃0PZ{^ s#4$ZWHn{J!+AAaB)3Go A d*g%Q&c/[̾ yhuҪ*UE b, Ҭe@mZx!5ھ¿ixAn vn5;0Nd˽`]Kjs;Tn1GO ݂$C,R:P}`ԑ ]z_2ZNzQD jñdHĵ!yFB'h;3eG-4lY2’2y*y[q 3JF/=o_i_[@H׷g]WvrwA?5RH 7T>8J8 $q!P[\SfehzNq A b~UlsNވsg\-d2YOѺWf="?bt\ߓ" R_6dYXZglC*YYv" Mݚ|k]ՠ3(h.ӛ%a42=8REe+T}p(2LT4˼؞-dNgHBC^r\PN#p^v6uy.5Km`7P%J Qs΂[𡃆Yz dqDWa]ʪ%f Ӿ}-=qga!r6 :ttφ'֡{UV*)H+,8ICQecěEHc-+=2rϦY|hoX`Jek##B5pQs]#)0g)Oc;0R&mW+0[w0?] ǫd48J/#֞)Xdok7|+k[8, ɮnt7Y7ӫF^,äI?wI朋[~n20grq&СKV["Fԋ:pwE~ Q@&v a=0p+,Kħ/L-a"9Zu[|cj@t^VTh1?Knnh^䐤idNLzPH m:)$#;hTɕ[iHTeo=e _Nu3 [ ?!.FZ׵{rAn:aG'-Rap}t#s7qQhthXm4y'J]laT-tp N}z}A'y gmE1oȻ`8'CXτӜjoq!kJm{10?gz%Y19r?cQ/5K=\]ܨ]{3'SZM3G y2M-:{[li/f.T2QҺ[:4*x/Sϓ>SW+zyebIݼ<%ODE9lf 74{(Ko>_dI ͍)ʳFt*1A4}W5!YanCYO:o Ld^,Fmp @Hj ޚU{W2ݯuqTuDݓ7d"F`p'{#jk&|f 7 xcm~kN1m"YCP>s+QY4 90ЬA\$yyiXvVEtjw@XV俱dO\שּ^163"8W?IX[UVQd;,q 8pVss/vOa~S{4[iTQxp7;>(e 㣹L?x 7~'"nc&ܕLm+b6dvWD KhaR|CY(,;'xq$ kZ6V}rȖaEtbCFFFD}ꦈ˙ʦ߼᎕j6 E,'Εh9_ز:hp}pW=NH"tK8ztf)!At7*k H4QhWl*, 2 OAF|KKm"hO# Vuj͕/!Q" 칽'!vֺmM^I ~{GeEݯ{:1臊=Pe h(9;mtľly_ } J6^2*6LnhJF1eHQƢK=X5ce)^(!/m>Ʌ-+(NN2;Y"|_CpKۛuec.%*o)Y"FÌU9>lrjG*<& 0i/SKV;#‹ڴH:-uxfilnލ7\8"!%$W'#ۑ+a3 ԗ7>z" 7Fyfn&o ޵Teȓin:M [ۣS:zZ/>z9EG*Di\x;jndl;HەaR\dpb}{ ȍ/ ݩ j.3eD효Q fd#UYkIvp' gű P#]KM>Fw}8({\MN,Ŵ?Kx"=5Up~1BnbppH$"K_ XS ;VD(0- NMyKY&#e&Ek!uWdyo׺fzJ_s LcUԟw+w:C !85H'1^j1qb.=zgigviTCKP(SG6[Ր Sl5( "s3ILij mq,7wrpI7 W{ypQVĹF(Ƽlxt!r/PݩHaa8.I 5Fs{>بȳT[Feʗ'נCWN/#^Z># k{j*{hI!m/iÆOȎ!WGand/åvpﵡHUt=Օ+<4 >ʝ%<2^OLR-(/Qx)+2_mzf T8:Z9&-gS MRLl2`?OH,ՐͨnLefrO?ۙbcW22̶z"7uƢg=UL^Ú|c  Mw|Ri:&4K#Q-|@F!r#Yc ;{b /h,Ml+A ek "o쵾8?CcO&QDzzCWq,J^D(Β&cLsT42\F ?2|r4EG. t* EGkMVnw'<ô 루$Ok_v3P/.n=TՊ~zSf궠x$>'ޏy&kچncn4z#a+$+Aee[Faӳ^d"Qx¹y(Ƞ@*OfUG+Ɨ˷l\beGÈa>|"#;Opk-K ^1(>4H{68|zt֪խ}+D^Ȩqn@q{8D-W)C7zȐ@aYGF+b)SITYX {[>@lTnyHB #j$W#H EL sl mO?SY53T]c wy\^ê%"e zZgw}q&Hr|!zoiF2ŁhmﭥGuW(?Eo7W"Hˏf:)`wzT~XRy1p 7 g5^6OTw\7%IJF_m.rlֳ,Ǜ[,A"5_f(@e!=NUrwWh3nP`}QIT?PRmo4$.,'aƬ:(bS8Eo %z{s_ϵ4(S!7zwj"^ӏ,?SQ Y ט%2w24/i^z+68-P`rh6V['M t^[aL3`ո AKt̴ qh/!8^7PǖSno~-4?σ 'seWS4EKxә^=+W;5-(FӬ '`,-tJ2l`9΀-:ٺ89?=Jg]}l<5 i4aqƳ$n%g#Y!{퍶Pߤه12]-~.,5&<˜…͠t=I#hb ޽CN4W;|4xiPCA# jN1Xq~ EMN져CHXK}i8N3!cw7A7E'B@|E'"#y1kZL{LcLkPr$ΖjA44t87Mńe|i!]'EDIT9; (9AꑆGhu56m?zn_3>_k K|C_mjq 5RIZS-PJ^a J`TK xhEilB2N+y*7H;FaJYGY+8*i2oPv ,dQq)PR; Nd⚶Bm[K5gԊ7?e^w2qF7F+(uO5t85qC~K?)O}5 DNgc"+\~d ,yNxp{IF2t7eU5ڝ힞즚Ɗ>,6+Ds榣u'_=:ը<" i?'y x P t cp£=:x-N5/di󓀓 +Ϝ쏃omThݤ9ZL$[3R!+ :[)ϋ,A}?3c*E\<}EwcYL}~ZE_5N)]s/ % (OV E})VXi_~_* '^#E1El~Xu$f]/ЃQ!㉩BM9FFص`Eir.) udžaWTtf11m[|˭Ɯh!xi>5FTY7(+"&Zh NH}JBb؟9 '8Smߑs`mrఋ!E})ղTl)3k_26+hxB,6c Sp!#b/d ErsvSVz3%qB *t!4lK~bDzDTg^;j黎ڲ^ rR?N"Ѵ-QC{1u'첖94R"F.! |k2/P(<U˱" \Wtw'љnkmi7e@j|#g KPEHm+􏭀 Pll{ <-_B҄%|3IPBN2x}aY˿*+G[m+cQٚrI<?n3v_.M]SցQݝM͞Z[ jLM^=݈"< XvD)2S2/Wk5H#g gqyx9g~Rc>Kmmdz)ʮ(2%bhh3CUl|Qjbc{;h$`L+eY"/Mxxr"y>i)7􏃰)~B, >D^FPtrafqـ]~U|b),y,|]n{#!9|` S>?{l-oOkYޠ.n~<:<2ZHDBĹUQaMT ki%u}`»U]#\ۈ~)d09]k@6CyY:Mf/O9Gyw8q ?Ͳ^Rx'7hnoQv0^1~O ן%{6%Nztv-RCno^ FQ8G82sWpFg P;D&_[dpe=&el.>f7o4WWX+Le_8ȼEA:ݳsti#=}ZJuk;*5Z#teHX~Rs;sgy⳼: ?ed-+ƒ\i}<׵jW!Š#syj,V/\rb+*͜ 4͏ul54ӬhcخD~yњ]e)Yj*7fyGo 0(7S,d^&:3 ռz KKS/J\q{1SƘB6d>(2̏&Օ% TFZG;}L ~gڣ&F 8_٬mC~n8Xk2@v#k(eh֬^f FܙeӢB@'#&2v7X:~2R0p~U}#s?5=Ql?{mSlƆbA%s6b(#u|)* 'qbҝ?oK?/.S Z&׿>L:{YWYy!HSRoġ/$Zy㗦6.v 0S,Y`/̡ " [> 8VH(r|@g,ͧQ;ZԞ풲ϞLLeA߷mQ{6zl(*MhM_g8R%UD+o'y(dm,3E*U/ JAqMؐ(re }ƞ3#4ܔjjFHQjytcYe,NqNDATfi6U)&aE>iw49gR$—wK l.񛲴M,'E +.[]RK`o(m1)L#8yWw͡qGu Y3Jg#N 'sCKEAg ,aSuPVjI,-{qQqi V|&ߏm#YDQb,{a<r/C lo3D 4<8X :?BkU0uY.^l\KI,">Z~=q$v-u}b{^>-=_ ~Žq S#K̹Ua(B&\nHP8=Jb Q,eU7p0)nT9.Tw5 }&ea@d}E+[4a3u+t+SV1.'+BӔkE,&&SXwf8d|[$|1gT)sT`v%ϊS=|@{`knLuno ;a¢J?ըi(Dȏ7]\Pe1_O nCF%\qTCښ%nBr %oݱURiF^K]\tAVY y*Oe& 1S'aBTuN7cr(;\8G9hs-^*OJYA,8LH 6͢0fWEVN; CW]Q+iR\&9}.dh6]#˚Fl*M51|bP-ls-xZi7~$ q,~M!9CwlMσֵ5bf;ix = |$e$}8>={S8pq0nMdF&-JԔ%MidU4rsYNnIV{A GF<־u y%8BƱ&ofT}4K>5 ]FP;y-d  cX~ȑqbyP}# Z; it-Ff\AST@&KR7%lH;xt(cA`/rϋ?ƨKT㷘iArdPvf 4 ِ%C"8] B|#G&ZשMu9(Qf1F2Yx||9D\05Vs$hM8(ͨ^RRzo-ˏıLl#4㩡éZ'cpzӴ%1؅Qv\F qʕfu &>PNS(BOz{ J#',teZnbUӳ}ҿaVRruI ]ءHdp_OkkpP#%;A+Ƚϋsli1aN<ר&-qLo,_=Iܠ (?49-Nzdj UjT5$D Cː,Y`&)P!FE^79MԴ)7,FS$88aKHRD@o6Ӧc f(@lEo,$,b>(qM*W?J]WѮV8t#R; Sʮ-%߉p: b_o̕ǻˢ嫷YsDQok&Sԁc XG^,7 7b*x}OyCv\km' zvȑ# =>AE4*-&y0/n`|([NcMoN/l.˗B[Ջhv5-4 bb4v6Vh!d^u ĝ ے|3f%.ahjD< f2sU%yޒEMc /,tOm1#M}Qɔ'xkt|'fO/I ejőQj,:3ܔ,"ALq"0/N8Uj[;ג61D89| ?p(M3U͖*eZuvv4I4"ԩ( i:c-Aϫ,9\ܦuZ8P ޘ6( ?E9UnigpBq\6g7X3}޾6nr'֝$ՠTDt3DMⶆAgE!jI;.?$AxR{ Wi-ly`g9)ڛ|mXAM’+Tac]wUA# ^#=j%qz,!zDX*tXk{e؏&d{ֳlzKmcAqp..S%\1 nRhsUwEZخ($6k\hgxyEGr O2Vh4&=/6}MGq6~$kY؃F`U5CUZѬĶ>l,kuښWUAsпq8bh;5aELN]M]v 5xCccZ,{c!}X$ܘe!deƓn WC^'SM\F_w cx{E0YUbdފfNN@oC],r?}kgWpONF]ϏGY}V c Sk] ϩ,k]8qSr` &dEœ#N~Nz9"Pm{̳/ [L;oLli ? 0X0A']^&VƴKZ]称}?0ë3ugj?if^MG^AMʙ-b9D3s-ɚLiRmO'ѿ[MY!a7/瑿sTCޞtS Њ$7Jy3ǩk>GcB  m8]->Ѝri-kE4&Ts馃2{G;45֚g/lt́@y9LUS)cQ>.o ØϢ Yb*֓_cqhӎhVYA/Bo#~-d MY5h? 6.h-Mo OBfJO./[4QP/rQ%I3 $X8Swb:}t{&׏\=A5LY焑kM(&)t:t+whW֫/ 'DAtJwJqƽ/\8OEanӒ"sX+7H@U4xXbgo$P i@.v ֢!^]R+ G0}#87\S,flp-4ZXx%e.4hM5\Ew`y K7砉y-'uC1؏Fv3>- bSkdӓn Is0~D%1yZ6/ ۣ}˗zfM9q쳨Rb"¾>åoԉVp+jimƐQK2'(@3v4N`3hH*8s]e mI9K nƾ͉)+\dyDKgpAll]^ZގUO9P噬PfG/'|,ߜbU<<XO×[É I ֿ产u6Kw))oV08䤆g;KdmswSUhٯ+sQ}FMQ&,!4Up\E@xny\c c_AS$=mIJ(l "b;+`Q|aإq Pm+x],03t a-9ԝv2Wļ=[5$o[uUE,~I&o2<7bTd_oIL3~;A:UBB{ZTԧڲI~ۺ'gޙ R%a8X+ _7l<7*gZ ٲom Ȍ@gw,xBiB e1rh>cr @B0љ*)b&: ްZ: |r[愖YWYWN)wAoh6)?,3҉d[&w}b\J%-֮m# W і")TaHЂԯ@"A{k5<^q[oLa.: prhM{= 6)`S]Sշ+-fOSk"*-4&AY1o&t[y(Z&KFU. O+DŽj9*YH܋R=<bt?Ma{2pz ћTHД[:Z;lI?6z+.`Œ,,LT~&Vnn뉰g^..N.DH<rSq;wwRH#}k~'f_'|tym!TOrw4k'kqT"W <|,WY:v#JJf?]nIĒvZ)N2uPC:32mf"Zd" @ⵑqX؅ִбT";ʬ8[dѕW{/b^LE])qKCEy;79TNYZ<] ޴ oUmRDY- ,f/N,8 X̬Zlv;Y\>c?UaGo̮V.G#lW8ZmEp>jYc |Xܩ֗8lq?swSK$bZU]_T<4@!MCQOs͜Am.gigFSkvgqFH]^˱YާWTQ Jx$+Ii ٧g8A ǐ5:aIou{\Gf'r2a1ss35fߍrK3#jqwdžI|zUYnl<9ո(U&kq9ؼ\--#?9${15*C]]7օm#tg|W5VP4SkM7?{^C}(r-7hasX?0ɝL0$\,^Tmix QI,-йRcu:)I-1Jމf=,` B5PCX8_IGΓ2zb](BûC&M2yb)V}a0 |Wyjā9 -dGr]TJdvגZ'Oz#@mwL+PmgPdiȢ pBMS"/d]%ͼDOž6`argHSt$a~KƺhTtiuN%P c+4ڂ.7@'\oY)hK觇O(V˃NBF fF (0sа</cVh;dMygy4h^˽lNؗ+Uƃ'#=62l%9fؐJv24vސҔ( EL'j6VPm*rZUϐ޶M mHM U:.'4[q ؆P`;ZńJf.+o~ҋDqqڙkBG( :Q=1^<ѕʖ0Vb`%:?ӈ$c;*<""6ֲQ${)ӕU݈I@NI=(xC Wܒ8Y+]*N|1np8!<,B?a(MGg,[&*stRlI,Ŷ<Ƚs4:ZP W$j2Ҏ]e8zU.x81?H20b il2;K>ءU Im'.$L(ee@zn/MMn0Ϟҭ_"b(8=:㢃V"KC C)y' 'iȝXc<`ǓFbXLLjj9iߙkß47?c~µ!{/};5rk~scuZޟGN9ܫ˲Qiv0^ba1_$✠~)村0xB>͎x)<5h1sw9^@g0}kW[mzk o| z]HmeBhq36*cu/hk<5S2;twUK8$iMFeQLjxmD-y/"odg8 _,1aPM_07\~תJw: NKY\ݩ8 Q1/Ql-y3J'&Qjf~[dbY×e(?ӤJFӈuyb]&sn?<\ QҶHٻ`}Ⅸ6`Nvty5$čcS:X͹`u7%s֢ S׶kƧeޠ֎m>N\"fS%C Mn _l .nu{Ⱁ;*?AKc )o8W el#+ QBjJqj7$ }Gښӽ-Wqf xL1uzm 2/i߿/ 1 s+h%q%4OI>{IqBXmĞ؋e G2GvO? SӉ&"i tPמj]BeF Y:DŽK(${z{um:Wøp2tjѡ͓l䞌e{S`&}V.)sl'l[QʭjwҦuL=:әouPIHW'p$OVq"zlDDNL e_ˍh9+ ^BBo ,X4EXfjX,e>wZjr0iΙ7*ugUpղV}:#^Tq!uZ 8t\37#_MNBp}F\ ^F5#pQ>KP! uw8T=ezst8PK.h]FFutils/observer.phpnu[commands = []; \MongoDB\Driver\Monitoring\addSubscriber($this); try { call_user_func($execution); } finally { \MongoDB\Driver\Monitoring\removeSubscriber($this); foreach ($this->commands as $command) { call_user_func($commandCallback, $command); } } } public function commandStarted(CommandStartedEvent $event) { $this->commands[] = $event->getCommand(); } public function commandSucceeded(CommandSucceededEvent $event) { } public function commandFailed(CommandFailedEvent $event) { } } ?> PK.h];W%%utils/basic.incnu[getCode(), $e->getMessage(), $e->getFile(), $e->getLine())); }); register_shutdown_function(function() { $lastError = error_get_last(); if ($lastError !== null) { exit(sprintf('skip %s: %s', errno_as_string($lastError['type']), $lastError['message'])); } }); PK.h]/F3F3utils/skipif.phpnu[selectServer(new ReadPreference('nearest')); $mongosNodes = array_filter($manager->getServers(), function(Server $server) { return $server->getType() === Server::TYPE_MONGOS; }); if (count($mongosNodes) > 1) { exit('skip topology contains multiple mongos nodes'); } } /** * Skips the test if the topology is not a shard cluster. */ function skip_if_not_mongos() { is_mongos(URI) or exit('skip topology is not a sharded cluster'); } function skip_if_not_sharded_cluster_with_replica_set() { is_sharded_cluster_with_replica_set(URI) or exit('skip topology is not a sharded cluster with replica set'); } /** * Skips the test if the topology is a replica set. */ function skip_if_replica_set() { is_replica_set(URI) and exit('skip topology is a replica set'); } /** * Skips the test if the topology is not a replica set. */ function skip_if_not_replica_set() { is_replica_set(URI) or exit('skip topology is not a replica set'); } /** * Skips the test if the topology is not a replica set or sharded cluster backed by replica sets */ function skip_if_not_replica_set_or_sharded_cluster_with_replica_set() { is_replica_set(URI) or is_sharded_cluster_with_replica_set(URI) or exit('skip topology is not a replica set or sharded cluster with replica set'); } function skip_if_no_transactions() { if (is_sharded_cluster_with_replica_set(URI)) { skip_if_server_version('<', '4.2'); } elseif (is_replica_set(URI)) { skip_if_server_version('<', '4.0'); } else { exit('skip topology does not support transactions'); } } /** * Skips the test if the topology has no arbiter. */ function skip_if_no_arbiter() { try { $primary = get_primary_server(URI); } catch (ConnectionException $e) { exit('skip primary server is not accessible: ' . $e->getMessage()); } $info = $primary->getInfo(); if (!isset($info['arbiters']) || count($info['arbiters']) < 1) { exit('skip no arbiters available'); } } /** * Skips the test if the topology has no secondary. */ function skip_if_no_secondary() { try { $primary = get_primary_server(URI); } catch (ConnectionException $e) { exit('skip primary server is not accessible: ' . $e->getMessage()); } $info = $primary->getInfo(); if (!isset($info['hosts']) || count($info['hosts']) < 2) { exit('skip no secondaries available'); } } /** * Skips the test if the topology does not have enough data carrying nodes */ function skip_if_not_enough_data_nodes($requiredNodes, $maxNodeCount = null) { try { $primary = get_primary_server(URI); } catch (ConnectionException $e) { exit('skip primary server is not accessible: ' . $e->getMessage()); } $info = $primary->getInfo(); $dataNodeCount = isset($info['hosts']) ? count($info['hosts']) : 0; if ($dataNodeCount < $requiredNodes) { exit("skip not enough nodes available (wanted: {$requiredNodes}, available: " . count($info['hosts']) . ')'); } if ($maxNodeCount !== null && $dataNodeCount > $requiredNodes) { exit("skip too many nodes available (wanted: {$requiredNodes}, available: " . count($info['hosts']) . ')'); } } /** * Skips the test if the topology does not have enough nodes */ function skip_if_not_enough_nodes($requiredNodes, $maxNodeCount = null) { try { $primary = get_primary_server(URI); } catch (ConnectionException $e) { exit('skip primary server is not accessible: ' . $e->getMessage()); } $info = $primary->getInfo(); $nodeCount = (isset($info['hosts']) ? count($info['hosts']) : 0) + (isset($info['arbiters']) ? count($info['arbiters']) : 0); if ($nodeCount < $requiredNodes) { exit("skip not enough nodes available (wanted: {$requiredNodes}, available: " . count($info['hosts']) . ')'); } if ($maxNodeCount !== null && $nodeCount > $requiredNodes) { exit("skip too many nodes available (wanted: {$requiredNodes}, available: " . count($info['hosts']) . ')'); } } /** * Skips the test if the topology is a standalone. */ function skip_if_standalone() { is_standalone(URI) and exit('skip topology is a standalone'); } /** * Skips the test if the topology is not a standalone. */ function skip_if_not_standalone() { is_standalone(URI) or exit('skip topology is not a standalone'); } /** * Skips the test if the connection string uses SSL. */ function skip_if_ssl() { is_ssl(URI) and exit('skip URI is using SSL'); } /** * Skips the test if the connection string uses SSL. */ function skip_if_not_ssl() { is_ssl(URI) or exit('skip URI is not using SSL'); } /** * Skips the test if no SSL directory has been defined. */ function skip_if_no_ssl_dir() { $sslDir = getenv('SSL_DIR'); $sslDir !== false or exit('skip SSL_DIR environment variable not set'); $sslDir = realpath($sslDir); ($sslDir !== false && is_dir($sslDir)) or exit('skip SSL_DIR is not a valid directory'); } /** * Skips the test if the connection string is using auth. */ function skip_if_auth() { is_auth(URI) and exit('skip URI is using auth'); } /** * Skips the test if the connection string is not using auth. */ function skip_if_not_auth() { is_auth(URI) or exit('skip URI is not using auth'); } /** * Skips the test if the connection string is not using a particular * authMechanism. * * @param string $authMechanism */ function skip_if_not_auth_mechanism($authMechanism) { $uriAuthMechanism = get_uri_option(URI, 'authMechanism'); if ($uriAuthMechanism === null && $authMechanism !== null) { exit('skip URI is not using authMechanism'); } if ($uriAuthMechanism !== $authMechanism) { exit("skip URI authMechanism is '$uriAuthMechanism' (needed: '$authMechanism')"); } } /** * Skips the test if the server is not accessible. */ function skip_if_not_live() { try { get_primary_server(URI); } catch (ConnectionException $e) { exit('skip server is not accessible: ' . $e->getMessage()); } } /** * Skips the test if the server version satisfies a comparison. * * @see http://php.net/version_compare * @param string $operator Comparison operator * @param string $version Version to compare against */ function skip_if_server_version($operator, $version) { $serverVersion = get_server_version(URI); if (version_compare($serverVersion, $version, $operator)) { exit("skip Server version '$serverVersion' $operator '$version'"); } } /** * Skips the test if the PHP version satisfies a comparison. * * @see http://php.net/version_compare * @param string $operator Comparison operator * @param string $version Version to compare against */ function skip_if_php_version($operator, $version) { if (version_compare(PHP_VERSION, $version, $operator)) { exit("skip PHP version '" . PHP_VERSION . "' $operator '$version'"); } } /** * Skips the test if the server not using a particular storage engine. * * @param string $storageEngine Storage engine name */ function skip_if_not_server_storage_engine($storageEngine) { $serverStorageEngine = get_server_storage_engine(URI); if ($serverStorageEngine !== $storageEngine) { exit("skip Server storage engine is '$serverStorageEngine' (needed '$storageEngine')"); } } /** * Skips the test if the server does not support the sleep command. */ function skip_if_sleep_command_unavailable() { if (!command_works(URI, ['sleep' => 1, 'secs' => 1, 'w' => false])) { exit('skip sleep command not available'); } } /** * Skips the test if the server does not support test commands. */ function skip_if_test_commands_disabled() { if (!get_server_parameter(URI, 'enableTestCommands')) { exit('skip test commands are disabled'); } } /** * Skips the test if libmongoc does not support crypto. * * If one or more libaries are provided, additionally check that the reported * library is in that array. Possible values are "libcrypto", "Common Crypto", * and "CNG". * * @param array $libs Optional list of crypto libraries to require */ function skip_if_not_libmongoc_crypto(array $libs = []) { $lib = get_module_info('libmongoc crypto library'); if ($lib === null) { exit('skip libmongoc crypto is not enabled'); } if (!empty($libs) && !in_array($lib, $libs)) { exit('skip Needs libmongoc crypto library ' . implode(', ', $libs) . ', but found ' . $lib); } } /** * Skips the test if libmongoc does not support SSL. * * If one or more libaries are provided, additionally check that the reported * library is in that array. Possible values are "OpenSSL", "LibreSSL", * "Secure Transport", and "Secure Channel". * * @param array $libs Optional list of SSL libraries to require */ function skip_if_not_libmongoc_ssl(array $libs = []) { $lib = get_module_info('libmongoc SSL library'); if ($lib === null) { exit('skip libmongoc SSL is not enabled'); } if (!empty($libs) && !in_array($lib, $libs)) { exit('skip Needs libmongoc SSL library ' . implode(', ', $libs) . ', but found ' . $lib); } } /** * Skips the test if the driver was not compiled with support for FLE */ function skip_if_not_libmongocrypt() { $lib = get_module_info('libmongocrypt'); if ($lib === 'disabled') { exit('skip libmongocrypt is not enabled'); } } /** * Skips the test if the driver was compiled with support for FLE */ function skip_if_libmongocrypt() { $lib = get_module_info('libmongocrypt'); if ($lib !== 'disabled') { exit('skip libmongocrypt is enabled'); } } /** * Skips the test if the collection cannot be dropped. * * @param string $databaseName Database name * @param string $collectionName Collection name */ function skip_if_not_clean($databaseName = DATABASE_NAME, $collectionName = COLLECTION_NAME) { try { drop_collection(URI, $databaseName, $collectionName); } catch (RuntimeException $e) { exit("skip Could not drop '$databaseName.$collectionName': " . $e->getMessage()); } /* Since this function modifies the state of the database, we need it to run * each time before a test. */ disable_skipif_caching(); } function skip_if_no_getmore_failpoint() { $serverVersion = get_server_version(URI); if ( version_compare($serverVersion, '3.2', '>=') && version_compare($serverVersion, '4.0', '<') ) { exit("skip Server version '$serverVersion' does not support a getMore failpoint'"); } } function skip_if_no_failcommand_failpoint() { skip_if_test_commands_disabled(); $serverVersion = get_server_version(URI); if (is_mongos(URI) && version_compare($serverVersion, '4.1.8', '<')) { exit("skip mongos version '$serverVersion' does not support 'failCommand' failpoint'"); } elseif (version_compare($serverVersion, '4.0', '<')) { exit("skip mongod version '$serverVersion' does not support 'failCommand' failpoint'"); } } function skip_if_no_mongo_orchestration() { $ctx = stream_context_create(['http' => ['timeout' => 0.5]]); $result = @file_get_contents(MONGO_ORCHESTRATION_URI, false, $ctx); /* Note: file_get_contents emits an E_WARNING on failure, which will be * caught by the error handler in basic-skipif.inc. In that case, this may * never be reached. */ if ($result === false) { exit("skip mongo-orchestration is not accessible: '" . MONGO_ORCHESTRATION_URI . "'"); } } function skip_if_appveyor() { if (getenv('APPVEYOR')) { exit('skip Test cannot be run on AppVeyor'); } } PK.h] ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]!vxWWtests/double-valid-004.phptnu[--TEST-- Double type: -1.0001220703125 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000016400000000008000f0bf00 {"d":{"$numberDouble":"-1.0001220703125"}} {"d":-1.0001220703125} 10000000016400000000008000f0bf00 {"d":-1.0001220703125} ===DONE===PK.h]ߥ^&tests/decimal128-7-parseError-008.phptnu[--TEST-- Decimal128: [basx575] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]yT``!tests/decimal128-2-valid-096.phptnu[--TEST-- Decimal128: [decq840] VG testcase --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364003c17258419d710c42f0000000000002400 {"d":{"$numberDecimal":"8.81125000000001349436E-1548"}} 180000001364003c17258419d710c42f0000000000002400 ===DONE===PK.h]ad (tests/executiontimeoutexception-002.phptnu[--TEST-- ExecutionTimeoutException: exceeding maxTimeMS (commands) --SKIPIF-- --FILE-- selectServer(new \MongoDB\Driver\ReadPreference('primary')); $cmd = array( "count" => "collection", "query" => array("a" => 1), "maxTimeMS" => 100, ); $command = new MongoDB\Driver\Command($cmd); failMaxTimeMS($server); throws(function() use ($server, $command) { $result = $server->executeCommand(DATABASE_NAME, $command); }, "MongoDB\Driver\Exception\ExecutionTimeoutException"); ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\ExecutionTimeoutException ===DONE=== PK.h]K[c11!tests/manager-ctor_error-003.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid types in URI options arrays --FILE-- 1], ]; foreach ($integerOptions as $option) { foreach ($invalidIntegerValues as $value) { echo throws(function() use ($option, $value) { create_test_manager(null, [$option => $value]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; } } echo "\nTesting string options:\n"; $stringOptions = [ 'appname', 'authMechanism', 'authSource', 'gssapiServiceName', 'password', 'replicaSet', 'username', ]; $invalidStringValues = [ true, 1.0, 42, new MongoDB\BSON\ObjectId, [ 1, 2, 3 ], ['x' => 1], ]; foreach ($stringOptions as $option) { foreach ($invalidStringValues as $value) { echo throws(function() use ($option, $value) { create_test_manager(null, [$option => $value]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; } } echo "\nTesting document options:\n"; $invalidDocumentValues = [ true, 1.0, 42, 'string', new MongoDB\BSON\ObjectId, [ 1, 2, 3 ], ]; foreach ($invalidDocumentValues as $value) { echo throws(function() use ($value) { create_test_manager(null, ['authMechanismProperties' => $value]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; } ?> ===DONE=== --EXPECT-- Testing 32-bit integer options: OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "connectTimeoutMS" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "connectTimeoutMS" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "connectTimeoutMS" URI option, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "connectTimeoutMS" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "connectTimeoutMS" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "connectTimeoutMS" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "heartbeatFrequencyMS" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "heartbeatFrequencyMS" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "heartbeatFrequencyMS" URI option, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "heartbeatFrequencyMS" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "heartbeatFrequencyMS" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "heartbeatFrequencyMS" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "localThresholdMS" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "localThresholdMS" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "localThresholdMS" URI option, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "localThresholdMS" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "localThresholdMS" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "localThresholdMS" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "serverSelectionTimeoutMS" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "serverSelectionTimeoutMS" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "serverSelectionTimeoutMS" URI option, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "serverSelectionTimeoutMS" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "serverSelectionTimeoutMS" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "serverSelectionTimeoutMS" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketCheckIntervalMS" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketCheckIntervalMS" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketCheckIntervalMS" URI option, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketCheckIntervalMS" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketCheckIntervalMS" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketCheckIntervalMS" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketTimeoutMS" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketTimeoutMS" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketTimeoutMS" URI option, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketTimeoutMS" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketTimeoutMS" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer for "socketTimeoutMS" URI option, document given Testing string options: OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "appname" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "appname" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "appname" URI option, 32-bit integer given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "appname" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "appname" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "appname" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authMechanism" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authMechanism" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authMechanism" URI option, 32-bit integer given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authMechanism" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authMechanism" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authMechanism" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authSource" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authSource" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authSource" URI option, 32-bit integer given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authSource" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authSource" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "authSource" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "gssapiServiceName" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "gssapiServiceName" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "gssapiServiceName" URI option, 32-bit integer given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "gssapiServiceName" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "gssapiServiceName" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "gssapiServiceName" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "password" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "password" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "password" URI option, 32-bit integer given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "password" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "password" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "password" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "replicaSet" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "replicaSet" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "replicaSet" URI option, 32-bit integer given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "replicaSet" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "replicaSet" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "replicaSet" URI option, document given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "username" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "username" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "username" URI option, 32-bit integer given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "username" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "username" URI option, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "username" URI option, document given Testing document options: OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected array or object for "authMechanismProperties" URI option, boolean given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected array or object for "authMechanismProperties" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected array or object for "authMechanismProperties" URI option, 32-bit integer given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected array or object for "authMechanismProperties" URI option, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected array or object for "authMechanismProperties" URI option, ObjectId given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected array or object for "authMechanismProperties" URI option, array given ===DONE=== PK.h]Qtests/cursorid-debug-003.phptnu[--TEST-- MongoDB\Driver\CursorId debug output on 64-bit platform --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> int(7250031947823432848) } ===DONE=== PK.h]-8'tests/bson-regex-serialization-002.phptnu[--TEST-- MongoDB\BSON\Regex serialization with flags omitted (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(0) "" } string(83) "C:18:"MongoDB\BSON\Regex":52:{a:2:{s:7:"pattern";s:6:"regexp";s:5:"flags";s:0:"";}}" object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(0) "" } ===DONE=== PK.h]%^+tests/top-parseError-002.phptnu[--TEST-- Top-level document validity: Bad $regularExpression (missing options field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h] 3pũ&tests/decimal128-6-parseError-009.phptnu[--TEST-- Decimal128: Decimal with no digits --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]Boo!tests/causal-consistency-012.phptnu[--TEST-- Causal consistency: $clusterTime is sent in commands to supported deployments --SKIPIF-- --FILE-- observe( function() { $manager = create_test_manager(); $session = $manager->startSession(); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); $manager->executeQuery(NS, $query, ['session' => $session]); }, function(stdClass $command) { $hasClusterTime = isset($command->{'$clusterTime'}); printf("Command includes \$clusterTime: %s\n", ($hasClusterTime ? 'yes' : 'no')); } ); ?> ===DONE=== --EXPECT-- Command includes $clusterTime: yes Command includes $clusterTime: yes ===DONE=== PK.h]X`-tests/bson-timestamp-set_state_error-001.phptnu[--TEST-- MongoDB\BSON\Timestamp::__set_state() requires "increment" and "timestamp" integer fields --FILE-- 1234]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['timestamp' => 5678]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['increment' => '1234', 'timestamp' => 5678]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['increment' => 1234, 'timestamp' => '5678']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields ===DONE=== PK.h]f++!tests/decimal128-2-valid-046.phptnu[--TEST-- Decimal128: [decq541] Specials --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007c00 {"d":{"$numberDecimal":"NaN"}} 180000001364000000000000000000000000000000007c00 ===DONE===PK.h]*y&tests/decimal128-4-parseError-013.phptnu[--TEST-- Decimal128: [dqbsr532] negatives (Rounded & Inexact) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]:O(aa!tests/decimal128-3-valid-132.phptnu[--TEST-- Decimal128: [basx016] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000c000000000000000000000000003a3000 {"d":{"$numberDecimal":"0.012"}} 180000001364000c000000000000000000000000003a3000 ===DONE===PK.h]]RRtests/double-valid-003.phptnu[--TEST-- Double type: +1.0001220703125 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000016400000000008000f03f00 {"d":{"$numberDouble":"1.0001220703125"}} {"d":1.0001220703125} 10000000016400000000008000f03f00 {"d":1.0001220703125} ===DONE===PK.h]2i!tests/decimal128-3-valid-103.phptnu[--TEST-- Decimal128: [basx611] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]Χ tests/cursor-batchsize-002.phptnu[--TEST-- MongoDB\Driver\Command batchSize of zero is ignored for getMore --SKIPIF-- --FILE-- insert(['_id' => $i]); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$match' => new stdClass]], 'cursor' => ['batchSize' => 0] ]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); $cursor->toArray(); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); if ($event->getCommandName() === 'aggregate') { printf("aggregate command specifies batchSize: %d\n", $command->cursor->batchSize); } if ($event->getCommandName() === 'getMore') { printf("getMore command specifies batchSize: %s\n", isset($command->batchSize) ? 'yes' : 'no'); } } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { $reply = $event->getReply(); if ($event->getCommandName() === 'aggregate') { printf("aggregate response contains %d document(s)\n", count($reply->cursor->firstBatch)); } if ($event->getCommandName() === 'getMore') { printf("getMore response contains %d document(s)\n", count($reply->cursor->nextBatch)); } } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } (new Test)->executeCommand(); ?> ===DONE=== --EXPECT-- Inserted: 5 aggregate command specifies batchSize: 0 aggregate response contains 0 document(s) getMore command specifies batchSize: no getMore response contains 5 document(s) ===DONE=== PK.h]?!tests/binary-decodeError-002.phptnu[--TEST-- Binary type: Negative length --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]4zJVV!tests/decimal128-2-valid-072.phptnu[--TEST-- Decimal128: [decq650] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000ca9a3b00000000000000000000fe5f00 {"d":{"$numberDecimal":"1.000000000E+6120"}} 1800000013640000ca9a3b00000000000000000000fe5f00 ===DONE===PK.h]b9DD(tests/bson-symbol-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\Symbol::jsonSerialize() with json_encode() --FILE-- ===DONE=== --EXPECTF-- { "foo" : "symbolValue" } {"foo":{"$symbol":"symbolValue"}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Symbol)#%d (%d) { ["symbol"]=> string(11) "symbolValue" } } ===DONE=== PK.h]l  $tests/server-executeCommand-009.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $servers = $manager->getServers(); $selectedServer = array_pop($servers); $wrongServer = array_pop($servers); var_dump($selectedServer != $wrongServer); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$group' => ['_id' => 1]]], 'cursor' => (object) [] ]); $selectedServer->executeCommand(DATABASE_NAME, $command, ['session' => $session]); var_dump($session->getServer() == $selectedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); echo throws(function () use ($wrongServer, $session) { $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$group' => ['_id' => 1]]], 'cursor' => (object) [] ]); $wrongServer->executeCommand(DATABASE_NAME, $command, ['session' => $session]); }, \MongoDB\Driver\Exception\RuntimeException::class), "\n"; $session->commitTransaction(); var_dump($session->getServer() == $selectedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) OK: Got MongoDB\Driver\Exception\RuntimeException Requested server id does not matched pinned server id bool(true) bool(false) ===DONE=== PK.h]彷!tests/decimal128-3-valid-125.phptnu[--TEST-- Decimal128: [basx143] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000523000 {"d":{"$numberDecimal":"1E+9"}} 180000001364000100000000000000000000000000523000 180000001364000100000000000000000000000000523000 ===DONE===PK.h]IGntests/boolean-valid-001.phptnu[--TEST-- Boolean: True --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 090000000862000100 {"b":true} 090000000862000100 ===DONE===PK.h]Ϊ&tests/decimal128-4-parseError-019.phptnu[--TEST-- Decimal128: Inexact rounding#1 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]&tests/decimal128-7-parseError-027.phptnu[--TEST-- Decimal128: [basx580] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]6G66tests/cursor-getmore-003.phptnu[--TEST-- MongoDB\Driver\Cursor command result iteration with batchSize requiring getmore with full batches --SKIPIF-- --FILE-- insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $command = new MongoDB\Driver\Command(array( 'aggregate' => COLLECTION_NAME, 'pipeline' => array( array('$match' => new stdClass), ), 'cursor' => array('batchSize' => 2), )); $cursor = $manager->executeCommand(DATABASE_NAME, $command); foreach ($cursor as $i => $document) { printf("%d => {_id: %d}\n", $i, $document->_id); } ?> ===DONE=== --EXPECT-- Inserted: 6 0 => {_id: 0} 1 => {_id: 1} 2 => {_id: 2} 3 => {_id: 3} 4 => {_id: 4} 5 => {_id: 5} ===DONE=== PK.h] tests/top-parseError-039.phptnu[--TEST-- Top-level document validity: Bad $maxKey (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]*CC3tests/bson-utcdatetime-serialization_error-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime unserialization requires "milliseconds" integer or numeric string field (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\UTCDateTime initialization requires "milliseconds" integer or numeric string field ===DONE=== PK.h]Ktests/top-valid-004.phptnu[--TEST-- Top-level document validity: Dot as key in top-level document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0e000000022e0002000000610000 {".":"a"} 0e000000022e0002000000610000 ===DONE===PK.h]一tests/bson-toPHP_error-006.phptnu[--TEST-- MongoDB\BSON\toPHP(): BSON decoding exception with unknown BSON type --FILE-- ["cruel" => "world"]]); $bson[15] = chr(0x42); echo throws(function() use ($bson) { toPHP($bson); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected unknown BSON type 0x42 for field path "hello.cruel". Are you using the latest driver? ===DONE=== PK.h]( <77!tests/decimal128-5-valid-053.phptnu[--TEST-- Decimal128: [decq637] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000080c6a47e8d0300000000000000fe5f00 {"d":{"$numberDecimal":"1.000000000000000E+6126"}} 180000001364000080c6a47e8d0300000000000000fe5f00 180000001364000080c6a47e8d0300000000000000fe5f00 ===DONE===PK.h]o!tests/decimal128-5-valid-032.phptnu[--TEST-- Decimal128: [decq434] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000fedf00 {"d":{"$numberDecimal":"-0E+6111"}} 180000001364000000000000000000000000000000fedf00 180000001364000000000000000000000000000000fedf00 ===DONE===PK.h]Ĥ]'tests/bson-decimal128interface-001.phptnu[--TEST-- MongoDB\BSON\Decimal128Interface is implemented by MongoDB\BSON\Decimal128 --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]ڱ`L%tests/manager-executeCommand-007.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() does not inherit read or write concern --SKIPIF-- --FILE-- 'local', 'w' => 2, 'wtimeoutms' => 1000]); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$group' => ['_id' => 1]], ['$out' => COLLECTION_NAME . '.out'], ], 'cursor' => (object) [], ]); (new CommandObserver)->observe( function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command); $manager->executeCommand(DATABASE_NAME, $command, [ 'readConcern' => new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE), 'writeConcern' => new MongoDB\Driver\WriteConcern(1), ]); }, function(stdClass $command) { echo json_encode($command->readConcern ?? null), "\n"; echo json_encode($command->writeConcern ?? null), "\n"; } ); ?> ===DONE=== --EXPECT-- null null {"level":"available"} {"w":1} ===DONE=== PK.h]!DAA!tests/decimal128-5-valid-011.phptnu[--TEST-- Decimal128: [decq090] underflows cannot be tested for simple copies, check edge cases (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000000000 {"d":{"$numberDecimal":"1E-6176"}} 180000001364000100000000000000000000000000000000 180000001364000100000000000000000000000000000000 ===DONE===PK.h]+11!tests/decimal128-5-valid-007.phptnu[--TEST-- Decimal128: [decq081] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000020000 {"d":{"$numberDecimal":"1E-6175"}} 180000001364000100000000000000000000000000020000 180000001364000100000000000000000000000000020000 ===DONE===PK.h]es sstests/manager-ctor-004.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): Deprecated boolean options in URI string --FILE-- getWriteConcern()->getJournal()); } ?> ===DONE=== --EXPECTF-- bool(true) bool(true) bool(true) bool(true) bool(false) bool(false) bool(false) bool(false) bool(false) ===DONE=== PK.h]!tests/decimal128-3-valid-191.phptnu[--TEST-- Decimal128: [basx387] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000003e3000 {"d":{"$numberDecimal":"0.7"}} 1800000013640007000000000000000000000000003e3000 1800000013640007000000000000000000000000003e3000 ===DONE===PK.h]%%!tests/decimal128-3-valid-080.phptnu[--TEST-- Decimal128: [basx296] some more negative zeros [systematic tests below] --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003ab000 {"d":{"$numberDecimal":"-0.000"}} 1800000013640000000000000000000000000000003ab000 1800000013640000000000000000000000000000003ab000 ===DONE===PK.h]tests/bug1713-001.phptnu[--TEST-- PHPC-1713: MongoDB\Driver\Cursor::current() does not return anything --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query([])); var_dump($cursor->valid()); var_dump($cursor->current()); ?> ===DONE=== --EXPECTF-- bool(false) NULL ===DONE=== PK.h]\\!tests/decimal128-2-valid-095.phptnu[--TEST-- Decimal128: [decq841] VG testcase --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000203b9db5056f000000000000002400 {"d":{"$numberDecimal":"8.000000000000000000E-1550"}} 180000001364000000203b9db5056f000000000000002400 ===DONE===PK.h]hp'ww!tests/decimal128-1-valid-034.phptnu[--TEST-- Decimal128: Scientific - Large --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000a5bc138938d44c64d31fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000000000000000E+6144"}} 18000000136400000000000a5bc138938d44c64d31fe5f00 ===DONE===PK.h]:W-tests/manager-executeBulkWrite_error-003.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() write concern error --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); try { $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(30)); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { printf("BulkWriteException: %s\n", $e->getMessage()); echo "\n===> WriteResult\n"; printWriteResult($e->getWriteResult()); } echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- BulkWriteException: Not enough data-bearing nodes ===> WriteResult server: %s:%d insertedCount: 1 matchedCount: 0 modifiedCount: 0 upsertedCount: 0 deletedCount: 0 object(MongoDB\Driver\WriteConcernError)#%d (%d) { ["message"]=> string(29) "Not enough data-bearing nodes" ["code"]=> int(100) ["info"]=> %a } writeConcernError.message: Not enough data-bearing nodes writeConcernError.code: 100 writeConcernError.info: %a ===> Collection array(1) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(1) ["x"]=> int(1) } } ===DONE=== PK.h]"s1GG!tests/decimal128-5-valid-022.phptnu[--TEST-- Decimal128: [decq184] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000008000 {"d":{"$numberDecimal":"-1E-6176"}} 180000001364000100000000000000000000000000008000 ===DONE===PK.h]P=s!tests/decimal128-3-valid-107.phptnu[--TEST-- Decimal128: [basx689] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000040b000 {"d":{"$numberDecimal":"-0"}} 18000000136400000000000000000000000000000040b000 18000000136400000000000000000000000000000040b000 ===DONE===PK.h]˶ff%tests/cursorid-serialization-002.phptnu[--TEST-- MongoDB\Driver\CursorId serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> %rint\(7250031947823432848\)|string\(19\) "7250031947823432848"%r } O:23:"MongoDB\Driver\CursorId":1:{s:2:"id";s:19:"7250031947823432848";} object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> %rint\(7250031947823432848\)|string\(19\) "7250031947823432848"%r } object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> int(0) } O:23:"MongoDB\Driver\CursorId":1:{s:2:"id";s:1:"0";} object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> int(0) } ===DONE=== PK.h]>I&tests/cursorid_error-001.phptnu[--TEST-- MongoDB\Driver\CursorId cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyCursorId %s final class %SMongoDB\Driver\CursorId%S in %s on line %d PK.h]Dgtests/top-parseError-021.phptnu[--TEST-- Top-level document validity: Bad $code (type is number, not string) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]H&tests/writeconcern-ctor_error-004.phptnu[--TEST-- MongoDB\Driver\WriteConcern construction (invalid wtimeout range) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected wtimeout to be >= 0, -1 given ===DONE=== PK.h]yͻ,  !tests/decimal128-3-valid-144.phptnu[--TEST-- Decimal128: [basx254] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000323000 {"d":{"$numberDecimal":"0.0001265"}} 18000000136400f104000000000000000000000000323000 18000000136400f104000000000000000000000000323000 ===DONE===PK.h]Y8!tests/decimal128-3-valid-058.phptnu[--TEST-- Decimal128: [basx634] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000443000 {"d":{"$numberDecimal":"0E+2"}} 180000001364000000000000000000000000000000443000 180000001364000000000000000000000000000000443000 ===DONE===PK.h]!tests/writeerror-getCode-001.phptnu[--TEST-- MongoDB\Driver\WriteError::getCode() --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 1]); try { $manager->executeBulkWrite(NS, $bulk); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteErrors()[0]->getCode()); } ?> ===DONE=== --EXPECT-- int(11000) ===DONE=== PK.h]-bb!tests/decimal128-2-valid-147.phptnu[--TEST-- Decimal128: [decq824] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400feffff7f00000000000000000000403000 {"d":{"$numberDecimal":"2147483646"}} 18000000136400feffff7f00000000000000000000403000 ===DONE===PK.h] 00tests/bson-toPHP-008.phptnu[--TEST-- MongoDB\BSON\toPHP(): Setting fieldPath typemaps for compound types with string keys --FILE-- 1, 'array' => [1, 2, 3], 'object' => ['string' => 'keys', 'for' => 'ever'] ] ); function fetch($bson, $typeMap = []) { return \MongoDB\BSON\toPHP($bson, $typeMap); } echo "Default\n"; $document = fetch($bson); var_dump($document instanceof stdClass); var_dump(is_array($document->array)); var_dump($document->object instanceof stdClass); echo "\nSetting 'object' path to 'MyArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'object' => "MyArrayObject" ]]); var_dump($document instanceof stdClass); var_dump(is_array($document->array)); var_dump($document->object instanceof MyArrayObject); echo "\nSetting 'object' and 'array' path to 'MyArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'object' => "MyArrayObject", 'array' => "MyArrayObject", ]]); var_dump($document instanceof stdClass); var_dump($document->array instanceof MyArrayObject); var_dump($document->object instanceof MyArrayObject); ?> ===DONE=== --EXPECT-- Default bool(true) bool(true) bool(true) Setting 'object' path to 'MyArrayObject' bool(true) bool(true) bool(true) Setting 'object' and 'array' path to 'MyArrayObject' bool(true) bool(true) bool(true) ===DONE=== PK.h]~tests/top-parseError-033.phptnu[--TEST-- Top-level document validity: Bad $date (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h],ゐ+tests/manager-ctor-read_preference-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): read preference options (maxStalenessSeconds) --FILE-- 1231]], ['mongodb://127.0.0.1/?readPreference=secondary&maxStalenessSeconds=1000', ['maxStalenessSeconds' => 2000]], ['mongodb://127.0.0.1/?readpreference=secondary&maxstalenessseconds=1231', []], ['mongodb://127.0.0.1/?readpreference=secondary', ['maxstalenessseconds' => 1231]], ]; foreach ($tests as $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getReadPreference()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1231) } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1231) } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(2000) } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1231) } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1231) } ===DONE=== PK.h]^?? tests/writeconcernerror-001.phptnu[--TEST-- WriteConcernError: Populate WriteConcernError on WriteConcern errors --SKIPIF-- --FILE-- insert(array("my" => "value")); $w = new MongoDB\Driver\WriteConcern(30, 100); try { $retval = $manager->executeBulkWrite(NS, $bulk, $w); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { $server = $e->getWriteResult()->getServer(); $server->getPort(); printWriteResult($e->getWriteResult(), false); } ?> ===DONE=== --EXPECTF-- server: %s:%d insertedCount: 1 matchedCount: 0 modifiedCount: 0 upsertedCount: 0 deletedCount: 0 writeConcernError: %s (%d) ===DONE=== PK.h]T"x!tests/decimal128-1-valid-047.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - inf --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007800 {"d":{"$numberDecimal":"Infinity"}} 180000001364000000000000000000000000000000007800 180000001364000000000000000000000000000000007800 ===DONE===PK.h]oxPPtests/bson-unknown-001.phptnu[--TEST-- BSON Serializing a PHP resource should throw exception --FILE-- STDERR); $b = fromPHP($a); }, "MongoDB\Driver\Exception\UnexpectedValueException"); throws(function() { $a = array("stderr" => STDERR, "stdout" => STDOUT); $b = fromPHP($a); }, "MongoDB\Driver\Exception\UnexpectedValueException"); ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE=== PK.h]!tests/decimal128-3-valid-216.phptnu[--TEST-- Decimal128: [basx347] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000002a3000 {"d":{"$numberDecimal":"1.0E-10"}} 180000001364000a000000000000000000000000002a3000 180000001364000a000000000000000000000000002a3000 ===DONE===PK.h];jd))!tests/decimal128-3-valid-034.phptnu[--TEST-- Decimal128: [basx290] some more negative zeros [systematic tests below] --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000038b000 {"d":{"$numberDecimal":"-0.0000"}} 18000000136400000000000000000000000000000038b000 18000000136400000000000000000000000000000038b000 ===DONE===PK.h]-,6W&tests/decimal128-7-parseError-018.phptnu[--TEST-- Decimal128: [basx519] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]1X<&tests/session-isInTransaction-001.phptnu[--TEST-- MongoDB\Driver\Session::isInTransaction() --SKIPIF-- --FILE-- COLLECTION_NAME, ]); $manager->executeCommand(DATABASE_NAME, $cmd); /* Start a session */ $session = $manager->startSession(); /* Empty transaction, and aborted empty transaction */ var_dump($session->isInTransaction()); $session->startTransaction(); var_dump($session->isInTransaction()); $session->abortTransaction(); var_dump($session->isInTransaction()); /* Empty transaction, and committed empty transaction */ var_dump($session->isInTransaction()); $session->startTransaction(); var_dump($session->isInTransaction()); $session->commitTransaction(); var_dump($session->isInTransaction()); /* Aborted transaction with one operation */ var_dump($session->isInTransaction()); $session->startTransaction(); $bw = new \MongoDB\Driver\BulkWrite(); $bw->insert( [ '_id' => 0, 'msg' => 'Initial Value' ] ); $manager->executeBulkWrite(NS, $bw, ['session' => $session]); var_dump($session->isInTransaction()); $session->abortTransaction(); var_dump($session->isInTransaction()); /* Committed transaction with one operation */ var_dump($session->isInTransaction()); $session->startTransaction(); $bw = new \MongoDB\Driver\BulkWrite(); $bw->insert( [ '_id' => 0, 'msg' => 'Initial Value' ] ); $manager->executeBulkWrite(NS, $bw, ['session' => $session]); var_dump($session->isInTransaction()); $session->commitTransaction(); var_dump($session->isInTransaction()); ?> ===DONE=== --EXPECTF-- bool(false) bool(true) bool(false) bool(false) bool(true) bool(false) bool(false) bool(true) bool(false) bool(false) bool(true) bool(false) ===DONE=== PK.h]j[[!tests/decimal128-5-valid-002.phptnu[--TEST-- Decimal128: [decq037] fold-downs (more below) (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000a5bc138938d44c64d31fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000000000000000E+6144"}} 18000000136400000000000a5bc138938d44c64d31fe5f00 18000000136400000000000a5bc138938d44c64d31fe5f00 ===DONE===PK.h]'3,__!tests/decimal128-3-valid-245.phptnu[--TEST-- Decimal128: [basx013] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006e000000000000000000000000003e3000 {"d":{"$numberDecimal":"11.0"}} 180000001364006e000000000000000000000000003e3000 ===DONE===PK.h][cc!tests/decimal128-1-valid-040.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - Positive Sign --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f2af967ed05c82de3297ff6fde3c403000 {"d":{"$numberDecimal":"1234567890123456789012345678901234"}} 18000000136400f2af967ed05c82de3297ff6fde3c403000 18000000136400f2af967ed05c82de3297ff6fde3c403000 ===DONE===PK.h]݃Q Q tests/bson-objectid-001.phptnu[--TEST-- MongoDB\BSON\ObjectId #001 --SKIPIF-- =', '7.99'); ?> --FILE-- my = $sameid; $samearr = array("my" => $sameid); $std = new stdclass; $std->_id = new MongoDB\BSON\ObjectId; $array = array( "_id" => new MongoDB\BSON\ObjectId, "id" => new MongoDB\BSON\ObjectId, "d" => new MongoDB\BSON\ObjectId, ); $pregenerated = new MongoDB\BSON\ObjectId("53e28b650640fd3162152de1"); $tests = array( $array, $std, $samestd, $samearr, array("pregenerated" => $pregenerated), ); foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $bson = fromJSON($json); $testagain = toPHP($bson); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } throws(function() { $id = new MongoDB\BSON\ObjectId("53e28b650640fd3162152de12"); }, MongoDB\Driver\Exception\InvalidArgumentException::class); throws(function() { $id = new MongoDB\BSON\ObjectId("53e28b650640fd3162152dg1"); }, MongoDB\Driver\Exception\InvalidArgumentException::class); throws(function() { $id = new MongoDB\BSON\ObjectId("-3e28b650640fd3162152da1"); }, MongoDB\Driver\Exception\InvalidArgumentException::class); throws(function() { $id = new MongoDB\BSON\ObjectId(" 3e28b650640fd3162152da1"); }, MongoDB\Driver\Exception\InvalidArgumentException::class); throws(function() use ($pregenerated) { $pregenerated->__toString(1); }, MongoDB\Driver\Exception\InvalidArgumentException::class); ?> ===DONE=== --EXPECTF-- Test#0 { "_id" : { "$oid" : "%s" }, "id" : { "$oid" : "%s" }, "d" : { "$oid" : "%s" } } string(146) "{ "_id" : { "$oid" : "%s" }, "id" : { "$oid" : "%s" }, "d" : { "$oid" : "%s" } }" string(146) "{ "_id" : { "$oid" : "%s" }, "id" : { "$oid" : "%s" }, "d" : { "$oid" : "%s" } }" bool(true) Test#1 { "_id" : { "$oid" : "%s" } } string(51) "{ "_id" : { "$oid" : "%s" } }" string(51) "{ "_id" : { "$oid" : "%s" } }" bool(true) Test#2 { "my" : { "$oid" : "53e2a1c40640fd72175d4603" } } string(50) "{ "my" : { "$oid" : "53e2a1c40640fd72175d4603" } }" string(50) "{ "my" : { "$oid" : "53e2a1c40640fd72175d4603" } }" bool(true) Test#3 { "my" : { "$oid" : "53e2a1c40640fd72175d4603" } } string(50) "{ "my" : { "$oid" : "53e2a1c40640fd72175d4603" } }" string(50) "{ "my" : { "$oid" : "53e2a1c40640fd72175d4603" } }" bool(true) Test#4 { "pregenerated" : { "$oid" : "53e28b650640fd3162152de1" } } string(60) "{ "pregenerated" : { "$oid" : "53e28b650640fd3162152de1" } }" string(60) "{ "pregenerated" : { "$oid" : "53e28b650640fd3162152de1" } }" bool(true) OK: Got MongoDB\Driver\Exception\InvalidArgumentException OK: Got MongoDB\Driver\Exception\InvalidArgumentException OK: Got MongoDB\Driver\Exception\InvalidArgumentException OK: Got MongoDB\Driver\Exception\InvalidArgumentException OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE=== PK.h]>>-tests/manager-executeBulkWrite_error-009.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() with invalid options --SKIPIF-- --FILE-- insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['writeConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['writeConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given ===DONE=== PK.h]ؤ\s&tests/decimal128-7-parseError-025.phptnu[--TEST-- Decimal128: [basx583] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]c/tests/writeconcern-serialization_error-002.phptnu[--TEST-- MongoDB\Driver\WriteConcern unserialization errors (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot enable journaling when using w = 0 ===DONE=== PK.h]ekk4tests/manager-executeReadWriteCommand_error-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeReadWriteCommand() cannot combine session with unacknowledged write concern --SKIPIF-- --FILE-- COLLECTION_NAME, 'documents' => [['x' => 1]], ]); $manager->executeReadWriteCommand(DATABASE_NAME, $command, [ 'session' => $manager->startSession(), 'writeConcern' => new MongoDB\Driver\WriteConcern(0), ]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { $manager = create_test_manager(URI, ['w' => 0]); $command = new MongoDB\Driver\Command([ 'insert' => COLLECTION_NAME, 'documents' => [['x' => 1]], ]); $manager->executeReadWriteCommand(DATABASE_NAME, $command, [ 'session' => $manager->startSession(), ]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot combine "session" option with an unacknowledged write concern OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot combine "session" option with an unacknowledged write concern ===DONE=== PK.h]s33!tests/decimal128-2-valid-107.phptnu[--TEST-- Decimal128: [decq709] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364003100000000000000000000000000403000 {"d":{"$numberDecimal":"49"}} 180000001364003100000000000000000000000000403000 ===DONE===PK.h]u"tests/top-parseError-041.phptnu[--TEST-- Top-level document validity: Null byte in document key --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]7Q zz%tests/bulkwrite-delete_error-003.phptnu[--TEST-- MongoDB\Driver\BulkWrite::delete() with BSON encoding error (null bytes in keys) --FILE-- delete(["\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->delete(["x\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->delete(["\0\0\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->delete(['x' => 1], ['collation' => ["\0" => 1]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->delete(['x' => 1], ['collation' => ["x\0" => 1]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->delete(['x' => 1], ['collation' => ["\0\0\0" => 1]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "x". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "x". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". ===DONE=== PK.h]S(tests/query-ctor-002.phptnu[--TEST-- MongoDB\Driver\Query construction with options --FILE-- 1], [ 'allowDiskUse' => false, 'allowPartialResults' => false, 'awaitData' => false, 'batchSize' => 10, 'collation' => ['locale' => 'en_US'], 'comment' => 'foo', 'exhaust' => false, 'limit' => 20, 'max' => ['y' => 100], 'maxScan' => 50, 'maxTimeMS' => 1000, 'min' => ['y' => 1], 'noCursorTimeout' => false, 'oplogReplay' => false, 'projection' => ['x' => 1, 'y' => 1], 'returnKey' => false, 'showRecordId' => false, 'singleBatch' => false, 'skip' => 5, 'sort' => ['y' => -1], 'snapshot' => false, 'tailable' => false, ] )); var_dump(new MongoDB\Driver\Query( ['x' => 1], ['hint' => 'y_1'] )); var_dump(new MongoDB\Driver\Query( ['x' => 1], ['hint' => ['y' => 1]] )); var_dump(new MongoDB\Driver\Query( ['x' => 1], ['readConcern' => new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL)] )); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Query::__construct(): The "maxScan" option is deprecated and will be removed in a future release in %s on line %d Deprecated: MongoDB\Driver\Query::__construct(): The "oplogReplay" option is deprecated and will be removed in a future release in %s on line %d Deprecated: MongoDB\Driver\Query::__construct(): The "snapshot" option is deprecated and will be removed in a future release in %s on line %d object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["allowDiskUse"]=> bool(false) ["allowPartialResults"]=> bool(false) ["awaitData"]=> bool(false) ["batchSize"]=> int(10) ["collation"]=> object(stdClass)#%d (%d) { ["locale"]=> string(5) "en_US" } ["comment"]=> string(3) "foo" ["exhaust"]=> bool(false) ["max"]=> object(stdClass)#%d (%d) { ["y"]=> int(100) } ["maxScan"]=> int(50) ["maxTimeMS"]=> int(1000) ["min"]=> object(stdClass)#%d (%d) { ["y"]=> int(1) } ["noCursorTimeout"]=> bool(false) ["oplogReplay"]=> bool(false) ["projection"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) ["y"]=> int(1) } ["returnKey"]=> bool(false) ["showRecordId"]=> bool(false) ["skip"]=> int(5) ["sort"]=> object(stdClass)#%d (%d) { ["y"]=> int(-1) } ["snapshot"]=> bool(false) ["tailable"]=> bool(false) ["limit"]=> int(20) ["singleBatch"]=> bool(false) } ["readConcern"]=> NULL } object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["hint"]=> string(3) "y_1" } ["readConcern"]=> NULL } object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["hint"]=> object(stdClass)#%d (%d) { ["y"]=> int(1) } } ["readConcern"]=> NULL } object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> array(1) { ["level"]=> string(5) "local" } } ===DONE=== PK.h]eR(tests/bson-symbol-serialization-001.phptnu[--TEST-- MongoDB\BSON\Symbol serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- symbol; var_dump($symbol = $test); var_dump($s = serialize($symbol)); var_dump(unserialize($s)); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Symbol)#%d (%d) { ["symbol"]=> string(11) "symbolValue" } string(70) "C:19:"MongoDB\BSON\Symbol":38:{a:1:{s:6:"symbol";s:11:"symbolValue";}}" object(MongoDB\BSON\Symbol)#%d (%d) { ["symbol"]=> string(11) "symbolValue" } ===DONE=== PK.h]ʤ%GG!tests/decimal128-1-valid-030.phptnu[--TEST-- Decimal128: Scientific - No Decimal with Signed Exponent --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000463000 {"d":{"$numberDecimal":"1E+3"}} 180000001364000100000000000000000000000000463000 ===DONE===PK.h]:W. !tests/commandFailedEvent-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandFailedEvent --SKIPIF-- --FILE-- getCommandName(), "\n"; } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { echo "failed: ", $event->getCommandName(), "\n"; echo "- getError() returns an object: ", is_object( $event->getError() ) ? 'yes' : 'no', "\n"; echo "- getError() returns an MongoDB\Driver\Exception\Exception object: ", $event->getError() instanceof MongoDB\Driver\Exception\Exception ? 'yes' : 'no', "\n"; echo "- getDurationMicros() returns an integer: ", is_integer( $event->getDurationMicros() ) ? 'yes' : 'no', "\n"; echo "- getDurationMicros() returns > 0: ", $event->getDurationMicros() > 0 ? 'yes' : 'no', "\n"; echo "- getCommandName() returns a string: ", is_string( $event->getCommandName() ) ? 'yes' : 'no', "\n"; echo "- getCommandName() returns '", $event->getCommandName(), "'\n"; echo "- getServer() returns an object: ", is_object( $event->getServer() ) ? 'yes' : 'no', "\n"; echo "- getServer() returns a Server object: ", $event->getServer() instanceof MongoDB\Driver\Server ? 'yes' : 'no', "\n"; echo "- getOperationId() returns a string: ", is_string( $event->getOperationId() ) ? 'yes' : 'no', "\n"; echo "- getRequestId() returns a string: ", is_string( $event->getRequestId() ) ? 'yes' : 'no', "\n"; } } $subscriber = new MySubscriber; MongoDB\Driver\Monitoring\addSubscriber( $subscriber ); $primary = get_primary_server(URI); $command = new \MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$unsupported' => 1]] ]); try { $primary->executeCommand(DATABASE_NAME, $command); } catch (Exception $e) { /* Swallow */ } ?> --EXPECT-- started: aggregate failed: aggregate - getError() returns an object: yes - getError() returns an MongoDB\Driver\Exception\Exception object: yes - getDurationMicros() returns an integer: yes - getDurationMicros() returns > 0: yes - getCommandName() returns a string: yes - getCommandName() returns 'aggregate' - getServer() returns an object: yes - getServer() returns a Server object: yes - getOperationId() returns a string: yes - getRequestId() returns a string: yes PK.h]/tests/top-parseError-018.phptnu[--TEST-- Top-level document validity: Bad $binary (missing $type) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]g]\MM"tests/replicaset-seedlist-001.phptnu[--TEST-- MongoDB\Driver\Manager: Connecting to Replica Set with only secondary in seedlist --SKIPIF-- --FILE-- getInfo(); // As we're building our own URL here, we do need to extract username and password $url = parse_url(URI); if (array_key_exists('user', $url) && array_key_exists('pass', $url)) { $dsn = sprintf('mongodb://%s:%s@%s', $url['user'], $url['pass'], $info['me']); } else { $dsn = 'mongodb://' . $info['me']; } $manager = create_test_manager($dsn, ['replicaSet' => $info['setName']]); // load fixtures for test $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array("_id" => 1, "x" => 2, "y" => 3)); $bulk->insert(array("_id" => 2, "x" => 3, "y" => 4)); $bulk->insert(array("_id" => 3, "x" => 4, "y" => 5)); $manager->executeBulkWrite(NS, $bulk); ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]&tests/decimal128-6-parseError-004.phptnu[--TEST-- Decimal128: 2 decimal places --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]Ȇ==!tests/decimal128-5-valid-050.phptnu[--TEST-- Decimal128: [decq631] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000064a7b3b6e00d000000000000fe5f00 {"d":{"$numberDecimal":"1.000000000000000000E+6129"}} 18000000136400000064a7b3b6e00d000000000000fe5f00 18000000136400000064a7b3b6e00d000000000000fe5f00 ===DONE===PK.h]33!tests/decimal128-2-valid-115.phptnu[--TEST-- Decimal128: [decq717] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004900000000000000000000000000403000 {"d":{"$numberDecimal":"73"}} 180000001364004900000000000000000000000000403000 ===DONE===PK.h]..!tests/decimal128-3-valid-030.phptnu[--TEST-- Decimal128: [basx616] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003ab000 {"d":{"$numberDecimal":"-0.000"}} 1800000013640000000000000000000000000000003ab000 ===DONE===PK.h]Tp tests/bson-toJSON_error-002.phptnu[--TEST-- MongoDB\BSON\toJSON(): BSON decoding exceptions for malformed documents --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader ===DONE=== PK.h];j+tests/writeresult-getinsertedcount-001.phptnu[--TEST-- MongoDB\Driver\WriteResult::getInsertedCount() --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk); var_dump($result->getInsertedCount()); ?> ===DONE=== --EXPECT-- int(1) ===DONE=== PK.h]e%rr&tests/writeconcernerror-debug-001.phptnu[--TEST-- MongoDB\Driver\WriteConcernError debug output --SKIPIF-- =', '3.1'); ?> --FILE-- insert(['x' => 1]); try { /* We assume that the replica set does not have 12 nodes */ $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(12)); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteConcernError()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcernError)#%d (%d) { ["message"]=> string(29) "Not enough data-bearing nodes" ["code"]=> int(100) ["info"]=> NULL } ===DONE=== PK.h]dUfp$tests/server-executeCommand-008.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() does not send read preference to standalone --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); (new CommandObserver)->observe( function() use ($server) { $command = new MongoDB\Driver\Command([ 'ping' => true, ]); try { $server->executeCommand( DATABASE_NAME, $command, [ 'readPreference' => new \MongoDB\Driver\ReadPreference(\MongoDB\Driver\ReadPreference::RP_SECONDARY), 'readConcern' => new \MongoDB\Driver\ReadConcern(\MongoDB\Driver\ReadConcern::LOCAL), 'writeConcern' => new \MongoDB\Driver\WriteConcern(\MongoDB\Driver\WriteConcern::MAJORITY), ] ); } catch ( Exception $e ) { // Ignore exception that ping doesn't support writeConcern } }, function(stdClass $command) { echo isset($command->{'$readPreference'}) ? 'Read preference set' : 'No read preference set', "\n"; echo "Read Concern: ", $command->readConcern->level, "\n"; echo "Write Concern: ", $command->writeConcern->w, "\n"; } ); ?> ===DONE=== --EXPECTF-- No read preference set Read Concern: local Write Concern: majority ===DONE=== PK.h]ؼ&tests/decimal128-7-parseError-067.phptnu[--TEST-- Decimal128: [basx512] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h][tests/top-parseError-004.phptnu[--TEST-- Top-level document validity: Bad $regularExpression (options are number, not string) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]?!>!tests/decimal128-3-valid-139.phptnu[--TEST-- Decimal128: [basx258] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003a3000 {"d":{"$numberDecimal":"1.265"}} 18000000136400f1040000000000000000000000003a3000 18000000136400f1040000000000000000000000003a3000 ===DONE===PK.h]GA%tests/readconcern-ctor_error-002.phptnu[--TEST-- MongoDB\Driver\ReadConcern construction (invalid level type) --SKIPIF-- =', '7.99'); ?> --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException %SMongoDB\Driver\ReadConcern::__construct()%sstring, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException %SMongoDB\Driver\ReadConcern::__construct()%sstring, %r(object|stdClass)%r given ===DONE=== PK.h],**!tests/decimal128-3-valid-074.phptnu[--TEST-- Decimal128: [basx614] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003eb000 {"d":{"$numberDecimal":"-0.0"}} 1800000013640000000000000000000000000000003eb000 ===DONE===PK.h]18=+tests/readpreference-bsonserialize-002.phptnu[--TEST-- MongoDB\Driver\ReadPreference::bsonSerialize() returns an object --FILE-- 'ny']]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, [['dc' => 'ny'], ['dc' => 'sf', 'use' => 'reporting'], []]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => 1000]), ]; foreach ($tests as $test) { var_dump($test->bsonSerialize()); } ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["mode"]=> string(7) "primary" } object(stdClass)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } object(stdClass)#%d (%d) { ["mode"]=> string(9) "secondary" } object(stdClass)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } object(stdClass)#%d (%d) { ["mode"]=> string(7) "nearest" } object(stdClass)#%d (%d) { ["mode"]=> string(7) "primary" } object(stdClass)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } } } object(stdClass)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(3) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } [1]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "sf" ["use"]=> string(9) "reporting" } [2]=> object(stdClass)#%d (%d) { } } } object(stdClass)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1000) } ===DONE=== PK.h]/`Whh!tests/decimal128-2-valid-063.phptnu[--TEST-- Decimal128: [decq632] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000064a7b3b6e00d000000000000fe5f00 {"d":{"$numberDecimal":"1.000000000000000000E+6129"}} 18000000136400000064a7b3b6e00d000000000000fe5f00 ===DONE===PK.h]x&tests/writeconcern-ctor_error-005.phptnu[--TEST-- MongoDB\Driver\WriteConcern construction (journaling with unacknowledged w) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot enable journaling when using w = 0 ===DONE=== PK.h]Dqr)tests/writeconcern-serialization-002.phptnu[--TEST-- MongoDB\Driver\WriteConcern serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- 1 new MongoDB\Driver\WriteConcern(-2, 1000), // 64-bit wtimeout is always encoded as as string MongoDB\Driver\WriteConcern::__set_state(['w' => 2, 'wtimeout' => '2147483648']), ]; foreach ($tests as $test) { var_dump($test); echo $s = serialize($test), "\n"; var_dump(unserialize($s)); echo "\n"; } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } O:27:"MongoDB\Driver\WriteConcern":1:{s:1:"w";s:8:"majority";} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } object(MongoDB\Driver\WriteConcern)#%d (%d) { } O:27:"MongoDB\Driver\WriteConcern":0:{} object(MongoDB\Driver\WriteConcern)#%d (%d) { } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(-1) } O:27:"MongoDB\Driver\WriteConcern":1:{s:1:"w";i:-1;} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(-1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } O:27:"MongoDB\Driver\WriteConcern":1:{s:1:"w";i:0;} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } O:27:"MongoDB\Driver\WriteConcern":1:{s:1:"w";i:1;} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } O:27:"MongoDB\Driver\WriteConcern":1:{s:1:"w";s:8:"majority";} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(3) "tag" } O:27:"MongoDB\Driver\WriteConcern":1:{s:1:"w";s:3:"tag";} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(3) "tag" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } O:27:"MongoDB\Driver\WriteConcern":1:{s:1:"w";i:1;} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(false) } O:27:"MongoDB\Driver\WriteConcern":2:{s:1:"w";i:1;s:1:"j";b:0;} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(false) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["wtimeout"]=> int(1000) } O:27:"MongoDB\Driver\WriteConcern":2:{s:1:"w";i:1;s:8:"wtimeout";i:1000;} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(true) ["wtimeout"]=> int(1000) } O:27:"MongoDB\Driver\WriteConcern":3:{s:1:"w";i:1;s:1:"j";b:1;s:8:"wtimeout";i:1000;} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(true) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["j"]=> bool(true) } O:27:"MongoDB\Driver\WriteConcern":1:{s:1:"j";b:1;} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["j"]=> bool(true) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["wtimeout"]=> int(1000) } O:27:"MongoDB\Driver\WriteConcern":1:{s:8:"wtimeout";i:1000;} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> %rint\(2147483648\)|string\(10\) "2147483648"%r } O:27:"MongoDB\Driver\WriteConcern":2:{s:1:"w";i:2;s:8:"wtimeout";s:10:"2147483648";} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> %rint\(2147483648\)|string\(10\) "2147483648"%r } ===DONE=== PK.h]ZNx2&tests/decimal128-6-parseError-030.phptnu[--TEST-- Decimal128: Invalid --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]R1tests/commandSucceededEvent-getServiceId-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandSucceededEvent includes serviceId for load balanced topology --SKIPIF-- --FILE-- getCommandName()); $this->commandStartedServiceId = $event->getServiceId(); var_dump($this->commandStartedServiceId); } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { printf("commandSucceeded: %s\n", $event->getCommandName()); printf("same serviceId as last commandStarted: %s\n", $event->getServiceId() == $this->commandStartedServiceId ? 'yes' : 'no'); var_dump($event->getServiceId()); } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $manager = create_test_manager(); $manager->addSubscriber(new MySubscriber); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); ?> --EXPECTF-- commandStarted: ping object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } commandSucceeded: ping same serviceId as last commandStarted: yes object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } PK.h]*28  !tests/decimal128-3-valid-195.phptnu[--TEST-- Decimal128: [basx391] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000003a3000 {"d":{"$numberDecimal":"0.007"}} 1800000013640007000000000000000000000000003a3000 1800000013640007000000000000000000000000003a3000 ===DONE===PK.h]tests/top-decodeError-012.phptnu[--TEST-- Top-level document validity: Invalid BSON type low range --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]``tests/bug0347.phptnu[--TEST-- Test for PHPC-347: Memory leak decoding empty buffer --FILE-- getMessage(), "\n"; } ?> ===DONE=== --EXPECT-- Could not read document from BSON reader ===DONE=== PK.h]F<dd!tests/decimal128-2-valid-002.phptnu[--TEST-- Decimal128: [decq823] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400010000800000000000000000000040b000 {"d":{"$numberDecimal":"-2147483649"}} 18000000136400010000800000000000000000000040b000 ===DONE===PK.h].m#tests/bson-symbol-tostring-001.phptnu[--TEST-- MongoDB\BSON\Symbol::__toString() --FILE-- symbol; var_dump((string) $symbol); ?> ===DONE=== --EXPECT-- string(11) "symbolValue" ===DONE=== PK.h]gbbtests/bug1151-001.phptnu[--TEST-- PHPC-1151: Segfault if session unset before first getMore (find) --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $session = $manager->startSession(); $cursor = $manager->executeQuery(NS, $query, ['session' => $session]); foreach ($cursor as $document) { unset($session); echo $document->_id, "\n"; } ?> ===DONE=== --EXPECT-- 1 2 3 ===DONE=== PK.h]`tests/top-decodeError-013.phptnu[--TEST-- Top-level document validity: Invalid BSON type high range --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]A3(r33!tests/decimal128-2-valid-104.phptnu[--TEST-- Decimal128: [decq706] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001e00000000000000000000000000403000 {"d":{"$numberDecimal":"30"}} 180000001364001e00000000000000000000000000403000 ===DONE===PK.h]O:!  -tests/bson-utcdatetime-serialization-002.phptnu[--TEST-- MongoDB\BSON\UTCDateTime serialization (unserialize 32-bit data on 64-bit) (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- string(71) "C:24:"MongoDB\BSON\UTCDateTime":34:{a:1:{s:12:"milliseconds";s:1:"0";}}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(1) "0" } string(85) "C:24:"MongoDB\BSON\UTCDateTime":48:{a:1:{s:12:"milliseconds";s:14:"-1416445411987";}}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(14) "-1416445411987" } string(84) "C:24:"MongoDB\BSON\UTCDateTime":47:{a:1:{s:12:"milliseconds";s:13:"1416445411987";}}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1416445411987" } ===DONE=== PK.h]WB!tests/decimal128-3-valid-046.phptnu[--TEST-- Decimal128: [basx631] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003e3000 {"d":{"$numberDecimal":"0.0"}} 1800000013640000000000000000000000000000003e3000 1800000013640000000000000000000000000000003e3000 ===DONE===PK.h]GH#tests/bson-binary-tostring-001.phptnu[--TEST-- MongoDB\BSON\Binary::__toString() --FILE-- ===DONE=== --EXPECT-- string(6) "foobar" ===DONE=== PK.h]F!tests/decimal128-1-valid-004.phptnu[--TEST-- Decimal128: Special - Canonical SNaN --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007e00 {"d":{"$numberDecimal":"NaN"}} ===DONE===PK.h]Q&tests/decimal128-7-parseError-032.phptnu[--TEST-- Decimal128: [basx587] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]ȠT&tests/cursor-setTypeMap_error-003.phptnu[--TEST-- Cursor::setTypeMap(): fieldPaths must be an array, with single key/string elements --SKIPIF-- --FILE-- 'MissingClass'], ['abstract' => 'MyAbstractDocument'], ['my' => 'MyDocument'], ['unserialize' => 'MongoDB\BSON\Unserializable'], ]; $manager = create_test_manager(); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); foreach ($fieldPaths as $fieldPath) { $typeMap = ['fieldPaths' => $fieldPath]; printf("Test typeMap: %s\n", json_encode($typeMap)); echo throws(function() use ($cursor, $typeMap) { $cursor->setTypeMap($typeMap); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; } ?> ===DONE=== --EXPECT-- Test typeMap: {"fieldPaths":"notAnArray"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException The 'fieldPaths' element is not an array Test typeMap: {"fieldPaths":["notAssociative"]} OK: Got MongoDB\Driver\Exception\InvalidArgumentException The 'fieldPaths' element is not an associative array Test typeMap: {"fieldPaths":{"missing":"MissingClass"}} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MissingClass does not exist Test typeMap: {"fieldPaths":{"abstract":"MyAbstractDocument"}} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyAbstractDocument is not instantiatable Test typeMap: {"fieldPaths":{"my":"MyDocument"}} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyDocument does not implement MongoDB\BSON\Unserializable Test typeMap: {"fieldPaths":{"unserialize":"MongoDB\\BSON\\Unserializable"}} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MongoDB\BSON\Unserializable is not instantiatable ===DONE=== PK.h]-tests/server-getInfo-001.phptnu[--TEST-- MongoDB\Driver\Server::getInfo() --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY))->getInfo()); } catch (Exception $e) {} ?> ===DONE=== --EXPECTF-- array(%d) { %a } ===DONE=== PK.h]Mtests/dbpointer-valid-003.phptnu[--TEST-- DBPointer type (deprecated): With two-byte UTF-8 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1b0000000c610003000000c3a90056e1fc72e0c917e9c471416100 {"a":{"$dbPointer":{"$ref":"\u00e9","$id":{"$oid":"56e1fc72e0c917e9c4714161"}}}} 1b0000000c610003000000c3a90056e1fc72e0c917e9c471416100 ===DONE===PK.h]qq!tests/decimal128-4-valid-012.phptnu[--TEST-- Decimal128: [dqbsr431] check rounding modes heeded (Rounded) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640099761cc7b548f377dc80a131c836fe2f00 {"d":{"$numberDecimal":"1.111111111111111111111111111112345"}} 1800000013640099761cc7b548f377dc80a131c836fe2f00 1800000013640099761cc7b548f377dc80a131c836fe2f00 ===DONE===PK.h]Ѿ99tests/bug1053.phptnu[--TEST-- PHPC-1053: MongoDB\BSON\UTCDateTime's constructor has argument defined as required --FILE-- getParameters()[0]->isOptional()); ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]Fs8~GG%tests/readconcern-var_export-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern: var_export() --FILE-- ===DONE=== --EXPECT-- MongoDB\Driver\ReadConcern::__set_state(array( )) MongoDB\Driver\ReadConcern::__set_state(array( 'level' => 'linearizable', )) MongoDB\Driver\ReadConcern::__set_state(array( 'level' => 'local', )) MongoDB\Driver\ReadConcern::__set_state(array( 'level' => 'majority', )) MongoDB\Driver\ReadConcern::__set_state(array( 'level' => 'available', )) MongoDB\Driver\ReadConcern::__set_state(array( 'level' => 'snapshot', )) ===DONE=== PK.h]]~ww!tests/decimal128-3-valid-307.phptnu[--TEST-- Decimal128: [basx030] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640080910f8648700000000000000000343000 {"d":{"$numberDecimal":"123456789.123456"}} 1800000013640080910f8648700000000000000000343000 ===DONE===PK.h]S&tests/decimal128-6-parseError-010.phptnu[--TEST-- Decimal128: 2 signs --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]K lEE!tests/decimal128-5-valid-010.phptnu[--TEST-- Decimal128: [decq084] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000000000 {"d":{"$numberDecimal":"1E-6176"}} 180000001364000100000000000000000000000000000000 ===DONE===PK.h]􆑌o o &tests/cursor-setTypeMap_error-001.phptnu[--TEST-- Cursor::setTypeMap(): Type classes must be instantiatable and implement Unserializable --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query([])); foreach ($types as $type) { foreach ($classes as $class) { $typeMap = [$type => $class]; printf("Test typeMap: %s\n", json_encode($typeMap)); echo throws(function() use ($cursor, $typeMap) { $cursor->setTypeMap($typeMap); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo "\n"; } } ?> ===DONE=== --EXPECT-- Test typeMap: {"array":"MissingClass"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MissingClass does not exist Test typeMap: {"array":"MyAbstractDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyAbstractDocument is not instantiatable Test typeMap: {"array":"MyDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyDocument does not implement MongoDB\BSON\Unserializable Test typeMap: {"array":"MongoDB\\BSON\\Unserializable"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MongoDB\BSON\Unserializable is not instantiatable Test typeMap: {"document":"MissingClass"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MissingClass does not exist Test typeMap: {"document":"MyAbstractDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyAbstractDocument is not instantiatable Test typeMap: {"document":"MyDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyDocument does not implement MongoDB\BSON\Unserializable Test typeMap: {"document":"MongoDB\\BSON\\Unserializable"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MongoDB\BSON\Unserializable is not instantiatable Test typeMap: {"root":"MissingClass"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MissingClass does not exist Test typeMap: {"root":"MyAbstractDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyAbstractDocument is not instantiatable Test typeMap: {"root":"MyDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyDocument does not implement MongoDB\BSON\Unserializable Test typeMap: {"root":"MongoDB\\BSON\\Unserializable"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MongoDB\BSON\Unserializable is not instantiatable ===DONE=== PK.h]BK&tests/decimal128-7-parseError-068.phptnu[--TEST-- Decimal128: [basx517] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]+g)tests/connectiontimeoutexception-001.phptnu[--TEST-- ConnectionTimeoutException: exceeding sockettimeoutms --SKIPIF-- --FILE-- 1, 'secs' => 1, 'w' => false, ]); echo throws(function() use ($manager, $command) { $manager->executeCommand('admin', $command); }, 'MongoDB\Driver\Exception\\ConnectionTimeoutException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException Failed to send "sleep" command with database "admin": %Ssocket error or timeout ===DONE=== PK.h]P^ ==!tests/decimal128-3-valid-170.phptnu[--TEST-- Decimal128: [basx183] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000623000 {"d":{"$numberDecimal":"1.265E+20"}} 18000000136400f104000000000000000000000000623000 ===DONE===PK.h]`&tests/decimal128-7-parseError-080.phptnu[--TEST-- Decimal128: [basx522] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]ns(tests/manager-ctor-read_concern-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): read concern options --FILE-- 'local']], ]; foreach ($tests as $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getReadConcern()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(5) "local" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(1) "1" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(5) "local" } ===DONE=== PK.h]!tests/decimal128-3-valid-264.phptnu[--TEST-- Decimal128: [basx049] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364002c00000000000000000000000000403000 {"d":{"$numberDecimal":"44"}} 180000001364002c00000000000000000000000000403000 180000001364002c00000000000000000000000000403000 ===DONE===PK.h]nY%tests/bulkwrite-delete_error-005.phptnu[--TEST-- MongoDB\Driver\BulkWrite::delete() hint option requires MongoDB 4.4 (server-side error) --SKIPIF-- =', '4.3.4'); ?> --FILE-- delete(['_id' => 1], ['hint' => '_id_']); echo throws(function() use ($manager, $bulk) { $manager->executeBulkWrite(NS, $bulk); }, 'MongoDB\Driver\Exception\BulkWriteException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\BulkWriteException BSON field 'delete.deletes.hint' is an unknown field. ===DONE=== PK.h]`~!tests/decimal128-3-valid-248.phptnu[--TEST-- Decimal128: [basx197] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003c3000 {"d":{"$numberDecimal":"12.65"}} 18000000136400f1040000000000000000000000003c3000 18000000136400f1040000000000000000000000003c3000 ===DONE===PK.h]v.^^tests/bson-fromPHP-006.phptnu[--TEST-- BSON\fromPHP(): PHP documents with null bytes in field name --FILE-- 1])); echo "\nTesting object with multiple null bytes in field name\n"; hex_dump(fromPHP((object) ["\0\0\0" => 1])); ?> ===DONE=== --EXPECT-- Testing object with one leading null byte in field name 0 : 05 00 00 00 00 [.....] Testing object with multiple null bytes in field name 0 : 05 00 00 00 00 [.....] ===DONE=== PK.h]fMEE!tests/decimal128-5-valid-046.phptnu[--TEST-- Decimal128: [decq623] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000040b2bac9e0191e0200000000fe5f00 {"d":{"$numberDecimal":"1.0000000000000000000000E+6133"}} 18000000136400000040b2bac9e0191e0200000000fe5f00 18000000136400000040b2bac9e0191e0200000000fe5f00 ===DONE===PK.h]X;;!tests/decimal128-5-valid-051.phptnu[--TEST-- Decimal128: [decq633] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000008a5d78456301000000000000fe5f00 {"d":{"$numberDecimal":"1.00000000000000000E+6128"}} 1800000013640000008a5d78456301000000000000fe5f00 1800000013640000008a5d78456301000000000000fe5f00 ===DONE===PK.h] ,,!tests/decimal128-1-valid-021.phptnu[--TEST-- Decimal128: Regular - 2.000 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400d0070000000000000000000000003a3000 {"d":{"$numberDecimal":"2.000"}} 18000000136400d0070000000000000000000000003a3000 ===DONE===PK.h]OO!tests/decimal128-2-valid-015.phptnu[--TEST-- Decimal128: [decq004] derivative canonical plain strings --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ee0200000000000000000000000042b000 {"d":{"$numberDecimal":"-7.50E+3"}} 18000000136400ee0200000000000000000000000042b000 ===DONE===PK.h]<2H0tests/bson-objectid-serialization_error-001.phptnu[--TEST-- MongoDB\BSON\ObjectId unserialization requires "oid" string field (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\ObjectId initialization requires "oid" string field ===DONE=== PK.h]ZTTtests/regex-valid-005.phptnu[--TEST-- Regular Expression type: regex with slash --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 110000000b610061622f636400696d0000 {"a":{"$regularExpression":{"pattern":"ab\/cd","options":"im"}}} 110000000b610061622f636400696d0000 ===DONE===PK.h]8tests/dbref-valid-003.phptnu[--TEST-- Document type (DBRef sub-documents): DBRef with database and additional fields --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 48000000036462726566003c0000000224726566000b000000636f6c6c656374696f6e0010246964002a00000002246462000300000064620002666f6f0004000000626172000000 {"dbref":{"$ref":"collection","$id":{"$numberInt":"42"},"$db":"db","foo":"bar"}} 48000000036462726566003c0000000224726566000b000000636f6c6c656374696f6e0010246964002a00000002246462000300000064620002666f6f0004000000626172000000 ===DONE===PK.h]v)tests/writeconcern-bsonserialize-002.phptnu[--TEST-- MongoDB\Driver\WriteConcern::bsonSerialize() returns an object --FILE-- 1 new MongoDB\Driver\WriteConcern(-2, 1000), ]; foreach ($tests as $test) { var_dump($test->bsonSerialize()); } ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["w"]=> string(8) "majority" } object(stdClass)#%d (%d) { } object(stdClass)#%d (%d) { ["w"]=> int(-1) } object(stdClass)#%d (%d) { ["w"]=> int(0) } object(stdClass)#%d (%d) { ["w"]=> int(1) } object(stdClass)#%d (%d) { ["w"]=> string(8) "majority" } object(stdClass)#%d (%d) { ["w"]=> string(3) "tag" } object(stdClass)#%d (%d) { ["w"]=> int(1) } object(stdClass)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(false) } object(stdClass)#%d (%d) { ["w"]=> int(1) ["wtimeout"]=> int(1000) } object(stdClass)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(true) ["wtimeout"]=> int(1000) } object(stdClass)#%d (%d) { ["j"]=> bool(true) } object(stdClass)#%d (%d) { ["wtimeout"]=> int(1000) } ===DONE=== PK.h]Ѥɍ'tests/bson-regex-serialization-003.phptnu[--TEST-- MongoDB\BSON\Regex unserialization will alphabetize flags (Serializable interface) --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(6) "ilmsux" } ===DONE=== PK.h]!tests/symbol-decodeError-006.phptnu[--TEST-- Symbol: empty symbol, but extra null --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]'@HHtests/dbref-valid-001.phptnu[--TEST-- Document type (DBRef sub-documents): DBRef --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 37000000036462726566002b0000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e0000 {"dbref":{"$ref":"collection","$id":{"$oid":"58921b3e6e32ab156a22b59e"}}} 37000000036462726566002b0000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e0000 ===DONE===PK.h]ys0tests/manager-executeWriteCommand_error-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeWriteCommand() with invalid options --SKIPIF-- --FILE-- 1]); echo throws(function() use ($manager, $command) { $manager->executeWriteCommand(DATABASE_NAME, $command, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeWriteCommand(DATABASE_NAME, $command, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeWriteCommand(DATABASE_NAME, $command, ['writeConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeWriteCommand(DATABASE_NAME, $command, ['writeConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given ===DONE=== PK.h]Xa33!tests/decimal128-3-valid-287.phptnu[--TEST-- Decimal128: [basx230] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000403000 {"d":{"$numberDecimal":"1265"}} 18000000136400f104000000000000000000000000403000 ===DONE===PK.h]Zgtests/bug0231.phptnu[--TEST-- Multiple managers sharing streams: Using stream after closing manager --SKIPIF-- --FILE-- 1)); $retval = $manager->executeCommand("admin", $listdatabases); $retval = $manager2->executeCommand("admin", $listdatabases); foreach($retval as $database) { } $manager = null; $retval = $manager2->executeCommand("admin", $listdatabases); foreach($retval as $database) { } echo "All Good!\n"; ?> ===DONE=== --EXPECT-- All Good! ===DONE=== PK.h]ZHigtests/bulkwrite-update-003.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() with pipeline option --SKIPIF-- --FILE-- insert([ '_id' => 1, 'x' => 1, 'y' => 1, 't' => [ 'u' => [ 'v' => 1 ] ] ]); $bulk->insert([ '_id' => 2, 'x' => 2, 'y' => 1]); $manager->executeBulkWrite(NS, $bulk); $updateBulk = new MongoDB\Driver\BulkWrite(); $query = ['_id' => 1]; $update = [ [ '$replaceRoot' => [ 'newRoot' => '$t' ], ], [ '$addFields' => [ 'foo' => 1 ], ], ]; $updateBulk->update($query, $update); $manager->executeBulkWrite(NS, $updateBulk); $cursor = $manager->executeQuery(NS, new \MongoDB\Driver\Query([])); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- array(%d) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(1) ["u"]=> object(stdClass)#%d (%d) { ["v"]=> int(1) } ["foo"]=> int(1) } [1]=> object(stdClass)#%d (%d) { ["_id"]=> int(2) ["x"]=> int(2) ["y"]=> int(1) } } ===DONE=== PK.h]e**!tests/decimal128-3-valid-116.phptnu[--TEST-- Decimal128: [basx656] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000004c3000 {"d":{"$numberDecimal":"0E+6"}} 1800000013640000000000000000000000000000004c3000 ===DONE===PK.h]w tests/array-decodeError-001.phptnu[--TEST-- Array: Array length too long: eats outer terminator --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]ߟxxtests/bson-utcdatetime-007.phptnu[--TEST-- MongoDB\BSON\UTCDateTime constructor truncates floating point values --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1416445411987" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(10) "2147483647" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(4) "1234" } ===DONE=== PK.h]VNN!tests/decimal128-2-valid-076.phptnu[--TEST-- Decimal128: [decq658] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400a086010000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.00000E+6116"}} 18000000136400a086010000000000000000000000fe5f00 ===DONE===PK.h]+x5OOtests/bug0898-002.phptnu[--TEST-- PHPC-898: readConcern option should not be included in getMore commands (query option) --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $result = $manager->executeBulkWrite(NS, $bulk); printf("Inserted %d document(s)\n", $result->getInsertedCount()); $rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL); $query = new MongoDB\Driver\Query([], ['batchSize' => 2, 'readConcern' => $rc]); $cursor = $manager->executeQuery(NS, $query); foreach ($cursor as $document) { var_dump($document); } ?> ===DONE=== --EXPECTF-- Inserted 3 document(s) object(stdClass)#%d (1) { ["_id"]=> int(1) } object(stdClass)#%d (1) { ["_id"]=> int(2) } object(stdClass)#%d (1) { ["_id"]=> int(3) } ===DONE=== PK.h]P"[tests/bson-utcdatetime-004.phptnu[--TEST-- MongoDB\BSON\UTCDateTime constructor defaults to current time --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "%d" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "%d" } ===DONE=== PK.h]*+j::!tests/bson-fromPHP_error-006.phptnu[--TEST-- MongoDB\BSON\fromPHP(): PHP documents with null bytes in field name --DESCRIPTION-- BSON Corpus spec prose test #1 --FILE-- 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting array with one trailing null byte in field name\n"; echo throws(function() { fromPHP(["a\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting array with multiple null bytes in field name\n"; echo throws(function() { fromPHP(["\0\0\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting object with one trailing null byte in field name\n"; echo throws(function() { fromPHP((object) ["a\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting nested array with one trailing null byte in field name\n"; echo throws(function() { fromPHP(['a' => ["b\0" => 1]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECT-- Testing array with one leading null byte in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". Testing array with one trailing null byte in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "a". Testing array with multiple null bytes in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". Testing object with one trailing null byte in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "a". Testing nested array with one trailing null byte in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "b". ===DONE=== PK.h]O)Z!tests/decimal128-3-valid-092.phptnu[--TEST-- Decimal128: [basx647] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000004c3000 {"d":{"$numberDecimal":"0E+6"}} 1800000013640000000000000000000000000000004c3000 1800000013640000000000000000000000000000004c3000 ===DONE===PK.h]Wq// tests/ini-debug-ini_get-002.phptnu[--TEST-- ini_get() reports mongodb.debug (master and local) --INI-- mongodb.debug=stderr --FILE-- ===DONE=== --EXPECTF-- %A string(6) "stderr" string(6) "stdout" ===DONE=== PK.h]e22'tests/code_w_scope-decodeError-004.phptnu[--TEST-- Javascript Code with Scope: field length too short (truncates scope) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]z-tests/bson-decimal128-get_properties-002.phptnu[--TEST-- MongoDB\BSON\Decimal128 get_properties handler (foreach) --SKIPIF-- --FILE-- $value) { var_dump($key); var_dump($value); } ?> ===DONE=== --EXPECT-- string(3) "dec" string(9) "1234.5678" ===DONE=== PK.h]|%!tests/decimal128-3-valid-215.phptnu[--TEST-- Decimal128: [basx303] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000563000 {"d":{"$numberDecimal":"1.0E+12"}} 180000001364000a00000000000000000000000000563000 180000001364000a00000000000000000000000000563000 ===DONE===PK.h]eri"tests/bson-objectid-clone-001.phptnu[--TEST-- MongoDB\BSON\ObjectId can be cloned --FILE-- foo = 'bar'; $clone = clone $objectId; var_dump($clone == $objectId); var_dump($clone === $objectId); unset($objectId); var_dump($clone); var_dump($clone->foo); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) object(MongoDB\BSON\ObjectId)#%d (1) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } string(3) "bar" ===DONE=== PK.h]ص77!tests/decimal128-2-valid-045.phptnu[--TEST-- Decimal128: [decq528] Specials --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000000f800 {"d":{"$numberDecimal":"-Infinity"}} 18000000136400000000000000000000000000000000f800 ===DONE===PK.h]-Mtests/string-valid-003.phptnu[--TEST-- String: Multi-character --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000261000d0000006162616261626162616261620000 {"a":"abababababab"} 190000000261000d0000006162616261626162616261620000 ===DONE===PK.h]e?00(tests/writeconcernerror-getinfo-002.phptnu[--TEST-- MongoDB\Driver\WriteConcernError::getInfo() --SKIPIF-- =', '3.1'); ?> --FILE-- insert(['x' => $i, 'y' => str_repeat('a', 4194304)]); } try { $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(2, 1)); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteConcernError()->getInfo()); } ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["wtimeout"]=> bool(true) } ===DONE=== PK.h]N!  !tests/decimal128-3-valid-239.phptnu[--TEST-- Decimal128: [basx343] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000002e3000 {"d":{"$numberDecimal":"1.0E-8"}} 180000001364000a000000000000000000000000002e3000 180000001364000a000000000000000000000000002e3000 ===DONE===PK.h] Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1d000000057800100000000473ffd26444b34c6990e8e7d1dfc035d400 {"x":{"$binary":{"base64":"c\/\/SZESzTGmQ6OfR38A11A==","subType":"04"}}} 1d000000057800100000000473ffd26444b34c6990e8e7d1dfc035d400 1d000000057800100000000473ffd26444b34c6990e8e7d1dfc035d400 ===DONE===PK.h]s]C``!tests/decimal128-2-valid-067.phptnu[--TEST-- Decimal128: [decq640] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000407a10f35a0000000000000000fe5f00 {"d":{"$numberDecimal":"1.00000000000000E+6125"}} 1800000013640000407a10f35a0000000000000000fe5f00 ===DONE===PK.h]4V/tests/manager-ctor-write_concern-error-006.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid write concern (safe) --FILE-- 'invalid']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?safe=invalid'. Unsupported value for "safe": "invalid". OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected boolean for "safe" URI option, string given ===DONE=== PK.h]z.tests/bson-javascript-set_state_error-001.phptnu[--TEST-- MongoDB\BSON\Javascript::__set_state() requires "code" string field --FILE-- 0]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Javascript initialization requires "code" string field ===DONE=== PK.h]*Cw&tests/decimal128-7-parseError-011.phptnu[--TEST-- Decimal128: [basx505] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]tests/bson-maxkey-001.phptnu[--TEST-- MongoDB\BSON\MaxKey #001 --FILE-- $maxkey), ); foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $bson = fromJSON($json); $testagain = toPHP($bson); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- Test#0 { "max" : { "$maxKey" : 1 } } string(29) "{ "max" : { "$maxKey" : 1 } }" string(29) "{ "max" : { "$maxKey" : 1 } }" bool(true) ===DONE=== PK.h]!tests/decimal128-3-valid-015.phptnu[--TEST-- Decimal128: [basx621] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000030b000 {"d":{"$numberDecimal":"-0E-8"}} 18000000136400000000000000000000000000000030b000 18000000136400000000000000000000000000000030b000 ===DONE===PK.h]>DCCtests/dbref-valid-008.phptnu[--TEST-- Document type (DBRef sub-documents): Sub-document resembles DBRef but $ref is not a string --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 2c000000036462726566002000000010247265660001000000072469640058921b3e6e32ab156a22b59e0000 {"dbref":{"$ref":{"$numberInt":"1"},"$id":{"$oid":"58921b3e6e32ab156a22b59e"}}} 2c000000036462726566002000000010247265660001000000072469640058921b3e6e32ab156a22b59e0000 ===DONE===PK.h]Z4{-tests/bson-regex-serialization_error-001.phptnu[--TEST-- MongoDB\BSON\Regex unserialization requires "pattern" and "flags" string fields (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex initialization requires "pattern" and "flags" string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex initialization requires "pattern" and "flags" string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex initialization requires "pattern" and "flags" string fields ===DONE=== PK.h]&tests/bug1839-008.phptnu[--TEST-- PHPC-1839: Referenced, local, interned string in typeMap (PHP >= 8.1) --SKIPIF-- --FILE-- &$rootValue, 'document' => &$documentValue]; $bson = MongoDB\BSON\fromPhp((object) []); echo "Before:\n"; debug_zval_dump($typemap); MongoDB\BSON\toPHP($bson, $typemap); echo "After:\n"; debug_zval_dump($typemap); ?> ===DONE=== --EXPECT-- Before: array(2) refcount(2){ ["root"]=> reference refcount(2) { string(5) "array" interned } ["document"]=> reference refcount(2) { string(5) "array" interned } } After: array(2) refcount(2){ ["root"]=> reference refcount(2) { string(5) "array" interned } ["document"]=> reference refcount(2) { string(5) "array" interned } } ===DONE=== PK.h]Ltests/cursorinterface-001.phptnu[--TEST-- MongoDB\Driver\CursorInterface is implemented by MongoDB\Driver\Cursor --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 1)); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array("x" => 1))); var_dump($cursor instanceof MongoDB\Driver\CursorInterface); ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]&tests/bulkwrite_error-001.phptnu[--TEST-- MongoDB\Driver\BulkWrite cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyBulkWrite %s final class %SMongoDB\Driver\BulkWrite%S in %s on line %d PK.h]T tests/retryable-writes-004.phptnu[--TEST-- Retryable writes: unacknowledged write operations do not include transaction IDs --SKIPIF-- --FILE-- getCommand(); $hasTransactionId = isset($command->lsid) && isset($command->txnNumber); printf("%s command includes transaction ID: %s\n", $event->getCommandName(), $hasTransactionId ? 'yes' : 'no'); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $observer = new TransactionIdObserver; MongoDB\Driver\Monitoring\addSubscriber($observer); $manager = create_test_manager(); $writeConcern = new MongoDB\Driver\WriteConcern(0); echo "Testing unacknowledged deleteOne\n"; $bulk = new MongoDB\Driver\BulkWrite; $bulk->delete(['x' => 1], ['limit' => 1]); $manager->executeBulkWrite(NS, $bulk, ['writeConcern' => $writeConcern]); echo "\nTesting unacknowledged insertOne\n"; $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['writeConcern' => $writeConcern]); echo "\nTesting unacknowledged replaceOne\n"; $bulk = new MongoDB\Driver\BulkWrite; $bulk->update(['x' => 1], ['x' => 2]); $manager->executeBulkWrite(NS, $bulk, ['writeConcern' => $writeConcern]); echo "\nTesting unacknowledged updateOne\n"; $bulk = new MongoDB\Driver\BulkWrite; $bulk->update(['x' => 1], ['$inc' => ['x' => 1]]); $manager->executeBulkWrite(NS, $bulk, ['writeConcern' => $writeConcern]); /* Note: the server does not actually support unacknowledged write concerns for * findAndModify. This is just testing that mongoc_cmd_parts_set_write_concern() * in libmongoc detects w:0 and refrains from adding a transaction ID. */ echo "\nTesting unacknowledged findAndModify\n"; $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['x' => 1], 'update' => ['$inc' => ['x' => 1]], ]); $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['writeConcern' => $writeConcern]); MongoDB\Driver\Monitoring\removeSubscriber($observer); ?> ===DONE=== --EXPECT-- Testing unacknowledged deleteOne delete command includes transaction ID: no Testing unacknowledged insertOne insert command includes transaction ID: no Testing unacknowledged replaceOne update command includes transaction ID: no Testing unacknowledged updateOne update command includes transaction ID: no Testing unacknowledged findAndModify findAndModify command includes transaction ID: no ===DONE=== PK.h]bmV!tests/decimal128-3-valid-106.phptnu[--TEST-- Decimal128: [basx688] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]tests/top-parseError-028.phptnu[--TEST-- Top-level document validity: Bad $timestamp (extra field at same level as $timestamp) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]{Ntests/top-parseError-019.phptnu[--TEST-- Top-level document validity: Bad $binary (missing $binary) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]:;88tests/cursor-iterator-001.phptnu[--TEST-- MongoDB\Driver\Cursor does not allow iterating multiple times (foreach) --SKIPIF-- --FILE-- insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); echo "\nFirst foreach statement:\n"; foreach ($cursor as $document) { var_dump($document); } echo "\nSecond foreach statement:\n"; echo throws(function () use ($cursor) { foreach ($cursor as $document) { echo "FAILED: get_iterator should not yield multiple iterators\n"; } }, MongoDB\Driver\Exception\LogicException::class), "\n"; ?> ===DONE=== --EXPECTF-- Inserted: 3 First foreach statement: object(stdClass)#%d (1) { ["_id"]=> int(0) } object(stdClass)#%d (1) { ["_id"]=> int(1) } object(stdClass)#%d (1) { ["_id"]=> int(2) } Second foreach statement: OK: Got MongoDB\Driver\Exception\LogicException Cursors cannot rewind after starting iteration ===DONE=== PK.h]n `__!tests/decimal128-3-valid-244.phptnu[--TEST-- Decimal128: [basx012] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006d000000000000000000000000003e3000 {"d":{"$numberDecimal":"10.9"}} 180000001364006d000000000000000000000000003e3000 ===DONE===PK.h]ut  &tests/bson-undefined-tostring-001.phptnu[--TEST-- MongoDB\BSON\Undefined::__toString() --FILE-- undefined; var_dump((string) $undefined); ?> ===DONE=== --EXPECT-- string(0) "" ===DONE=== PK.h]e&tests/decimal128-7-parseError-053.phptnu[--TEST-- Decimal128: [basx557] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]Ck !tests/code_w_scope-valid-005.phptnu[--TEST-- Javascript Code with Scope: Unicode and embedded null in code string, empty scope --XFAIL-- Embedded null in code string is not supported in libbson (CDRIVER-1879) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1a0000000f61001200000005000000c3a9006400050000000000 {"a":{"$code":"\u00e9\u0000d","$scope":{}}} 1a0000000f61001200000005000000c3a9006400050000000000 ===DONE===PK.h]=\`pp!tests/decimal128-2-valid-059.phptnu[--TEST-- Decimal128: [decq624] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000040b2bac9e0191e0200000000fe5f00 {"d":{"$numberDecimal":"1.0000000000000000000000E+6133"}} 18000000136400000040b2bac9e0191e0200000000fe5f00 ===DONE===PK.h]#.&tests/decimal128-6-parseError-028.phptnu[--TEST-- Decimal128: Invalid --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]==!tests/decimal128-1-valid-031.phptnu[--TEST-- Decimal128: Scientific - Trailing Zero --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001a04000000000000000000000000423000 {"d":{"$numberDecimal":"1.050E+4"}} 180000001364001a04000000000000000000000000423000 ===DONE===PK.h]0&tests/server-executeBulkWrite-001.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query(array()))->getServer(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 2)); $bulk->update(array('x' => 2), array('$set' => array('x' => 1)), array("limit" => 1, "upsert" => false)); $bulk->update(array('_id' => 3), array('$set' => array('x' => 3)), array("limit" => 1, "upsert" => true)); $bulk->delete(array('x' => 1), array("limit" => 1)); $result = $server->executeBulkWrite(NS, $bulk); printf("WriteResult.server is the same: %s\n", $server == $result->getServer() ? 'yes' : 'no'); echo "\n===> WriteResult\n"; printWriteResult($result); var_dump($result); echo "\n===> Collection\n"; $cursor = $server->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- WriteResult.server is the same: yes ===> WriteResult server: %s:%d insertedCount: 2 matchedCount: 1 modifiedCount: 1 upsertedCount: 1 deletedCount: 1 upsertedId[3]: int(3) object(MongoDB\Driver\WriteResult)#%d (%d) { ["nInserted"]=> int(2) ["nMatched"]=> int(1) ["nModified"]=> int(1) ["nRemoved"]=> int(1) ["nUpserted"]=> int(1) ["upsertedIds"]=> array(1) { [0]=> array(%d) { ["index"]=> int(3) ["_id"]=> int(3) } } ["writeErrors"]=> array(0) { } ["writeConcernError"]=> NULL ["writeConcern"]=> object(MongoDB\Driver\WriteConcern)#%d (%d) { } } ===> Collection array(2) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(2) ["x"]=> int(1) } [1]=> object(stdClass)#%d (%d) { ["_id"]=> int(3) ["x"]=> int(3) } } ===DONE=== PK.h]tests/bson-encode-005.phptnu[--TEST-- BSON encoding: Object Document Mapper --FILE-- array(), "emptyclass" => new stdclass, ); $s = fromPHP($data); echo "Test ", toJSON($s), "\n"; hex_dump($s); $ret = toPHP($s); var_dump($ret); ?> ===DONE=== --EXPECTF-- Test { "emptyarray" : [ ], "emptyclass" : { } } 0 : 27 00 00 00 04 65 6d 70 74 79 61 72 72 61 79 00 ['....emptyarray.] 10 : 05 00 00 00 00 03 65 6d 70 74 79 63 6c 61 73 73 [......emptyclass] 20 : 00 05 00 00 00 00 00 [.......] object(stdClass)#%d (2) { ["emptyarray"]=> array(0) { } ["emptyclass"]=> object(stdClass)#%d (0) { } } ===DONE=== PK.h] tests/bug1274-002.phptnu[--TEST-- PHPC-1274: Session destruct should not end session from parent process --SKIPIF-- --FILE-- pid = getmypid(); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); $commandName = $event->getCommandName(); $process = $this->pid === getmypid() ? 'Parent' : 'Child'; if ($commandName === 'find' || $commandName === 'getMore') { printf("%s executes %s with batchSize: %d\n", $process, $commandName, $command->batchSize); return; } printf("%s executes %s\n", $process, $commandName); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(); $session = $manager->startSession(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $bulk->insert(['x' => 3]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); MongoDB\Driver\Monitoring\addSubscriber(new CommandLogger); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $cursor = $manager->executeQuery(NS, $query, ['session' => $session]); $childPid = pcntl_fork(); if ($childPid === 0) { echo "Child exits\n"; exit; } function isSessionOnServer($manager, $session) { /* Note: use $listLocalSessions since sessions are only synced to the config * database's system.sessions collection every 30 minutes. Alternatively, we * could run the refreshLogicalSessionCacheNow command on the primary. */ $command = new MongoDB\Driver\Command([ 'aggregate' => 1, 'pipeline' => [ ['$listLocalSessions' => new stdClass], ['$match' => ['_id.id' => $session->getLogicalSessionId()->id]], ], 'cursor' => new stdClass, ]); $cursor = $manager->executeReadCommand(DATABASE_NAME, $command); return iterator_count($cursor) > 0; } if ($childPid > 0) { $waitPid = pcntl_waitpid($childPid, $status); if ($waitPid === $childPid) { echo "Parent waited for child to exit\n"; } printf("Session is on server: %s\n", isSessionOnServer($manager, $session) ? 'yes' : 'no'); printf("Parent fully iterated cursor for %d documents\n", iterator_count($cursor)); } ?> ===DONE=== --EXPECT-- Parent executes find with batchSize: 2 Child exits Parent waited for child to exit Parent executes aggregate Session is on server: yes Parent executes getMore with batchSize: 2 Parent fully iterated cursor for 3 documents ===DONE=== PK.h]**!tests/decimal128-3-valid-113.phptnu[--TEST-- Decimal128: [basx653] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000463000 {"d":{"$numberDecimal":"0E+3"}} 180000001364000000000000000000000000000000463000 ===DONE===PK.h]n@-tests/bson-regex-serialization_error-004.phptnu[--TEST-- MongoDB\BSON\Regex unserialization does not allow pattern or flags to contain null bytes (__serialize and __unserialize) --DESCRIPTION-- BSON Corpus spec prose test #1 --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Pattern cannot contain null bytes OK: Got MongoDB\Driver\Exception\InvalidArgumentException Flags cannot contain null bytes ===DONE=== PK.h]s'OO!tests/decimal128-2-valid-016.phptnu[--TEST-- Decimal128: [decq018] derivative canonical plain strings --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ee020000000000000000000000002eb000 {"d":{"$numberDecimal":"-7.50E-7"}} 18000000136400ee020000000000000000000000002eb000 ===DONE===PK.h]F{##!tests/decimal128-5-valid-063.phptnu[--TEST-- Decimal128: [decq657] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400a086010000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.00000E+6116"}} 18000000136400a086010000000000000000000000fe5f00 18000000136400a086010000000000000000000000fe5f00 ===DONE===PK.h]ed__!tests/decimal128-3-valid-286.phptnu[--TEST-- Decimal128: [basx006] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400e803000000000000000000000000403000 {"d":{"$numberDecimal":"1000"}} 18000000136400e803000000000000000000000000403000 ===DONE===PK.h]^Nr'dd!tests/decimal128-2-valid-003.phptnu[--TEST-- Decimal128: [decq822] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000800000000000000000000040b000 {"d":{"$numberDecimal":"-2147483648"}} 18000000136400000000800000000000000000000040b000 ===DONE===PK.h]qS*tests/commandFailedEvent-getReply-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandFailedEvent::getReply() --SKIPIF-- --FILE-- getCommandName(), "\n"; } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { var_dump($event); } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { echo "failed: ", $event->getCommandName(), "\n"; var_dump($event->getReply()); } } $subscriber = new MySubscriber; MongoDB\Driver\Monitoring\addSubscriber( $subscriber ); $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['_id' => 'foo'], 'upsert' => true, 'new' => true, ]); try { $manager->executeWriteCommand(DATABASE_NAME, $command); } catch (MongoDB\Driver\Exception\CommandException $e) {} ?> --EXPECTF-- started: findAndModify failed: findAndModify object(stdClass)#%d (%d) {%A ["ok"]=> float(0) ["errmsg"]=> string(49) "Either an update or remove=true must be specified" ["code"]=> int(9) ["codeName"]=> string(13) "FailedToParse"%A } PK.h]0ٺ!tests/decimal128-3-valid-257.phptnu[--TEST-- Decimal128: [basx193] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000343000 {"d":{"$numberDecimal":"0.001265"}} 18000000136400f104000000000000000000000000343000 18000000136400f104000000000000000000000000343000 ===DONE===PK.h]ޤ}JJ%tests/manager-executeCommand-003.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() takes a read preference as legacy option --SKIPIF-- --FILE-- 1]); $cursor = $manager->executeCommand(DATABASE_NAME, $command, $primary); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; echo "Testing secondary:\n"; $command = new MongoDB\Driver\Command(['ping' => 1]); $cursor = $manager->executeCommand(DATABASE_NAME, $command, $secondary); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; ?> ===DONE=== --EXPECTF-- Testing primary: is_primary: true is_secondary: false Testing secondary: is_primary: false is_secondary: true ===DONE=== PK.h]^^!tests/decimal128-2-valid-068.phptnu[--TEST-- Decimal128: [decq642] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000a0724e18090000000000000000fe5f00 {"d":{"$numberDecimal":"1.0000000000000E+6124"}} 1800000013640000a0724e18090000000000000000fe5f00 ===DONE===PK.h]_**!tests/decimal128-3-valid-123.phptnu[--TEST-- Decimal128: [basx659] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000523000 {"d":{"$numberDecimal":"0E+9"}} 180000001364000000000000000000000000000000523000 ===DONE===PK.h]j? ZZ!tests/decimal128-2-valid-070.phptnu[--TEST-- Decimal128: [decq646] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000e8764817000000000000000000fe5f00 {"d":{"$numberDecimal":"1.00000000000E+6122"}} 1800000013640000e8764817000000000000000000fe5f00 ===DONE===PK.h]DD,tests/bson-timestamp-get_properties-001.phptnu[--TEST-- MongoDB\BSON\Timestamp get_properties handler (get_object_vars) --FILE-- ===DONE=== --EXPECT-- array(2) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } ===DONE=== PK.h]X̤,tests/bson-decimal128-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\Decimal128::jsonSerialize() return value --SKIPIF-- --FILE-- jsonSerialize()); ?> ===DONE=== --EXPECT-- array(1) { ["$numberDecimal"]=> string(14) "12389719287312" } ===DONE=== PK.h]n1bb!tests/decimal128-3-valid-009.phptnu[--TEST-- Decimal128: [dqbsr531] negatives (Rounded) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640099761cc7b548f377dc80a131c836feaf00 {"d":{"$numberDecimal":"-1.111111111111111111111111111112345"}} 1800000013640099761cc7b548f377dc80a131c836feaf00 1800000013640099761cc7b548f377dc80a131c836feaf00 ===DONE===PK.h]V+A~~!tests/bson-fromPHP_error-003.phptnu[--TEST-- MongoDB\BSON\fromPHP(): Encoding non-Serializable Type objects as a root element --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException MongoDB\BSON\Type instance UnknownType cannot be serialized as a root element OK: Got MongoDB\Driver\Exception\UnexpectedValueException MongoDB\BSON\Type instance MongoDB\BSON\Binary cannot be serialized as a root element OK: Got MongoDB\Driver\Exception\UnexpectedValueException MongoDB\BSON\Type instance MongoDB\BSON\Javascript cannot be serialized as a root element OK: Got MongoDB\Driver\Exception\UnexpectedValueException MongoDB\BSON\Type instance MongoDB\BSON\MinKey cannot be serialized as a root element OK: Got MongoDB\Driver\Exception\UnexpectedValueException MongoDB\BSON\Type instance MongoDB\BSON\MaxKey cannot be serialized as a root element OK: Got MongoDB\Driver\Exception\UnexpectedValueException MongoDB\BSON\Type instance MongoDB\BSON\ObjectId cannot be serialized as a root element OK: Got MongoDB\Driver\Exception\UnexpectedValueException MongoDB\BSON\Type instance MongoDB\BSON\Regex cannot be serialized as a root element OK: Got MongoDB\Driver\Exception\UnexpectedValueException MongoDB\BSON\Type instance MongoDB\BSON\Timestamp cannot be serialized as a root element OK: Got MongoDB\Driver\Exception\UnexpectedValueException MongoDB\BSON\Type instance MongoDB\BSON\UTCDateTime cannot be serialized as a root element ===DONE=== PK.h]~ޅp!tests/decimal128-3-valid-095.phptnu[--TEST-- Decimal128: [basx668] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000002e3000 {"d":{"$numberDecimal":"0E-9"}} 1800000013640000000000000000000000000000002e3000 1800000013640000000000000000000000000000002e3000 ===DONE===PK.h].A#tests/manager-ctor-wireversion.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): wire version support --FILE-- 1]); try { $manager->executeCommand("test", $command); } catch (\MongoDB\Driver\Exception\ConnectionException $e) { if ($e->getCode() == 15) { // MONGOC_ERROR_PROTOCOL_BAD_WIRE_VERSION echo "Bad wire version detected: ", $e->getMessage(), "\n"; } } ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]tests/bson-fromJSON-002.phptnu[--TEST-- MongoDB\BSON\fromJSON(): Decoding extended JSON types --FILE-- ===DONE=== --EXPECT-- Test { "_id": { "$oid": "56315a7c6118fd1b920270b1" }} 0 : 16 00 00 00 07 5f 69 64 00 56 31 5a 7c 61 18 fd [....._id.V1Z|a..] 10 : 1b 92 02 70 b1 00 [...p..] Test { "binary": { "$binary": "Zm9v", "$type": "00" }} 0 : 15 00 00 00 05 62 69 6e 61 72 79 00 03 00 00 00 [.....binary.....] 10 : 00 66 6f 6f 00 [.foo.] Test { "date": { "$date": "2015-10-28T00:00:00Z" }} 0 : 13 00 00 00 09 64 61 74 65 00 00 80 be ab 50 01 [.....date.....P.] 10 : 00 00 00 [...] Test { "timestamp": { "$timestamp": { "t": 1446084619, "i": 0 }}} 0 : 18 00 00 00 11 74 69 6d 65 73 74 61 6d 70 00 00 [.....timestamp..] 10 : 00 00 00 0b 80 31 56 00 [.....1V.] Test { "regex": { "$regex": "pattern", "$options": "i" }} 0 : 16 00 00 00 0b 72 65 67 65 78 00 70 61 74 74 65 [.....regex.patte] 10 : 72 6e 00 69 00 00 [rn.i..] Test { "undef": { "$undefined": true }} 0 : 0c 00 00 00 06 75 6e 64 65 66 00 00 [.....undef..] Test { "minkey": { "$minKey": 1 }} 0 : 0d 00 00 00 ff 6d 69 6e 6b 65 79 00 00 [.....minkey..] Test { "maxkey": { "$maxKey": 1 }} 0 : 0d 00 00 00 7f 6d 61 78 6b 65 79 00 00 [.....maxkey..] Test { "long": { "$numberLong": "1234" }} 0 : 13 00 00 00 12 6c 6f 6e 67 00 d2 04 00 00 00 00 [.....long.......] 10 : 00 00 00 [...] ===DONE=== PK.h]gз4tests/manager-ctor-disableClientPersistence-004.phptnu[--TEST-- MongoDB\Driver\Manager with disableClientPersistence=true referenced by Server --SKIPIF-- --FILE-- true]); ini_set('mongodb.debug', ''); echo "Creating server\n"; $server = $manager->selectServer(new MongoDB\Driver\ReadPreference('nearest')); echo "Unsetting manager\n"; ini_set('mongodb.debug', 'stderr'); unset($manager); ini_set('mongodb.debug', ''); echo "Unsetting server\n"; ini_set('mongodb.debug', 'stderr'); unset($server); ini_set('mongodb.debug', ''); ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client Creating server Unsetting manager Unsetting server%A [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A ===DONE=== PK.h]A_EEtests/regex-valid-003.phptnu[--TEST-- Regular Expression type: regex with options --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0f0000000b610061626300696d0000 {"a":{"$regularExpression":{"pattern":"abc","options":"im"}}} 0f0000000b610061626300696d0000 ===DONE===PK.h]N]]!tests/decimal128-3-valid-152.phptnu[--TEST-- Decimal128: [basx003] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000003e3000 {"d":{"$numberDecimal":"1.0"}} 180000001364000a000000000000000000000000003e3000 ===DONE===PK.h])}  !tests/decimal128-3-valid-175.phptnu[--TEST-- Decimal128: [basx173] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000323000 {"d":{"$numberDecimal":"0.0001265"}} 18000000136400f104000000000000000000000000323000 18000000136400f104000000000000000000000000323000 ===DONE===PK.h]!štests/double-valid-009.phptnu[--TEST-- Double type: NaN --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000016400000000000000f87f00 {"d":{"$numberDouble":"NaN"}} {"d":{"$numberDouble":"NaN"}} {"d":{"$numberDouble":"NaN"}} ===DONE===PK.h][^(('tests/manager-removeSubscriber-001.phptnu[--TEST-- MongoDB\Driver\Manager::removeSubscriber() unregisters a subscriber --SKIPIF-- --FILE-- id = $id; } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { printf("MySubscriber(%s) commandStarted: %s\n", $this->id, $event->getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { printf("MySubscriber(%s) commandSucceeded: %s\n", $this->id, $event->getCommandName()); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { printf("MySubscriber(%s) commandFailed: %s\n", $this->id, $event->getCommandName()); } } $m = create_test_manager(); $pingCommand = new MongoDB\Driver\Command(['ping' => 1]); $s1 = new MySubscriber('s1'); $s2 = new MySubscriber('s2'); $m->addSubscriber($s1); $m->addSubscriber($s2); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); $m->removeSubscriber($s2); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); $m->removeSubscriber($s1); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); ?> --EXPECT-- MySubscriber(s1) commandStarted: ping MySubscriber(s2) commandStarted: ping MySubscriber(s1) commandSucceeded: ping MySubscriber(s2) commandSucceeded: ping ping: 1 MySubscriber(s1) commandStarted: ping MySubscriber(s1) commandSucceeded: ping ping: 1 ping: 1 PK.h].u!tests/decimal128-3-valid-258.phptnu[--TEST-- Decimal128: [basx201] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000443000 {"d":{"$numberDecimal":"1.265E+5"}} 18000000136400f104000000000000000000000000443000 18000000136400f104000000000000000000000000443000 ===DONE===PK.h](/Χ  tests/top-decodeError-006.phptnu[--TEST-- Top-level document validity: One object, sized correctly, with a spot for an EOO, but the EOO is 0x70 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]GG)tests/bson-binary-get_properties-001.phptnu[--TEST-- MongoDB\BSON\Binary get_properties handler (get_object_vars) --FILE-- ===DONE=== --EXPECT-- array(2) { ["data"]=> string(6) "foobar" ["type"]=> int(0) } ===DONE=== PK.h]ǵ!tests/decimal128-3-valid-182.phptnu[--TEST-- Decimal128: [basx385] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000403000 {"d":{"$numberDecimal":"7"}} 180000001364000700000000000000000000000000403000 180000001364000700000000000000000000000000403000 ===DONE===PK.h]4{tests/top-parseError-008.phptnu[--TEST-- Top-level document validity: Bad $numberInt (number, not string) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]en!tests/decimal128-5-valid-029.phptnu[--TEST-- Decimal128: [decq418] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000fe5f00 {"d":{"$numberDecimal":"0E+6111"}} 180000001364000000000000000000000000000000fe5f00 180000001364000000000000000000000000000000fe5f00 ===DONE===PK.h] &tests/manager-set-uri-options-003.phptnu[--TEST-- MongoDB\Driver\Manager: SSL options in URI and 'options' don't leak --SKIPIF-- --FILE-- "does-not-matter", ); $manager = create_test_manager(URI . '&sslclientcertificatekeypassword=does-also-not-matter', [], $options); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "pem_pwd" driver option is deprecated. Please use the "tlsCertificateKeyFilePassword" URI option instead.%s ===DONE=== PK.h]lLD(tests/bson-int64-get_properties-001.phptnu[--TEST-- MongoDB\BSON\Int64 get_properties handler (get_object_vars) --FILE-- ===DONE=== --EXPECT-- array(1) { ["integer"]=> string(19) "9223372036854775807" } array(1) { ["integer"]=> string(20) "-9223372036854775808" } array(1) { ["integer"]=> string(1) "0" } ===DONE=== PK.h]22!tests/decimal128-3-valid-021.phptnu[--TEST-- Decimal128: [basx618] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000036b000 {"d":{"$numberDecimal":"-0.00000"}} 18000000136400000000000000000000000000000036b000 ===DONE===PK.h]Nxgtests/bug1698-001.phptnu[--TEST-- PHPC-1698: php_phongo_read_preference_prep_tagsets may leak in convert_to_object --FILE-- 'secondary', 'tags' => [['dc' => 'ny']]]; var_dump(MongoDB\Driver\ReadPreference::__set_state($args)); var_dump($args); $tagSets = [['dc' => 'ny']]; var_dump(new MongoDB\Driver\ReadPreference('secondary', $tagSets)); var_dump($tagSets); $uriTagSets = [['dc' => 'ny']]; var_dump((create_test_manager(null, ['readPreference' => 'secondary', 'readPreferenceTags' => $uriTagSets]))->getReadPreference()); var_dump($uriTagSets); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadPreference)#%d (2) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (1) { ["dc"]=> string(2) "ny" } } } array(2) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> array(1) { ["dc"]=> string(2) "ny" } } } object(MongoDB\Driver\ReadPreference)#%d (2) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (1) { ["dc"]=> string(2) "ny" } } } array(1) { [0]=> array(1) { ["dc"]=> string(2) "ny" } } object(MongoDB\Driver\ReadPreference)#%d (2) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (1) { ["dc"]=> string(2) "ny" } } } array(1) { [0]=> array(1) { ["dc"]=> string(2) "ny" } } ===DONE=== PK.h]{Ce(tests/bson-minkey-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\MinKey::jsonSerialize() return value --FILE-- jsonSerialize()); ?> ===DONE=== --EXPECT-- array(1) { ["$minKey"]=> int(1) } ===DONE=== PK.h] 1@$tests/server-executeCommand-003.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() with conflicting read preference for secondary --SKIPIF-- --FILE-- selectServer($secondaryRp); /* Note: this is testing that the read preference (even a conflicting one) has * no effect when directly querying a server, since the secondaryOk flag is always * set for hinted commands. */ $primaryRp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY); $cursor = $secondary->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(array('ping' => 1)), $primaryRp); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- array(1) { [0]=> object(stdClass)#%d (%d) { ["ok"]=> float(1)%A } } ===DONE=== PK.h]rtests/top-decodeError-002.phptnu[--TEST-- Top-level document validity: An object size that's only enough for the object size, but is a well-formed, empty object --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]]&tests/server-executeBulkWrite-006.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() with legacy write concern (replica set primary) --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); $writeConcerns = [0, 1, 2, MongoDB\Driver\WriteConcern::MAJORITY]; foreach ($writeConcerns as $wc) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['wc' => $wc]); $options = [ 'writeConcern' => new MongoDB\Driver\WriteConcern($wc), ]; $result = $server->executeBulkWrite(NS, $bulk, $options); var_dump($result->isAcknowledged()); var_dump($result->getInsertedCount()); } ?> ===DONE=== --EXPECT-- bool(false) NULL bool(true) int(1) bool(true) int(1) bool(true) int(1) ===DONE=== PK.h]0tests/manager-executeWriteCommand_error-004.phptnu[--TEST-- MongoDB\Driver\Manager::executeWriteCommand() cannot combine session with unacknowledged write concern --SKIPIF-- --FILE-- COLLECTION_NAME, 'documents' => [['x' => 1]], ]); $manager->executeWriteCommand(DATABASE_NAME, $command, [ 'session' => $manager->startSession(), 'writeConcern' => new MongoDB\Driver\WriteConcern(0), ]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { $manager = create_test_manager(URI, ['w' => 0]); $command = new MongoDB\Driver\Command([ 'insert' => COLLECTION_NAME, 'documents' => [['x' => 1]], ]); $manager->executeWriteCommand(DATABASE_NAME, $command, [ 'session' => $manager->startSession(), ]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot combine "session" option with an unacknowledged write concern OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot combine "session" option with an unacknowledged write concern ===DONE=== PK.h]y\!tests/decimal128-3-valid-280.phptnu[--TEST-- Decimal128: [basx214] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000383000 {"d":{"$numberDecimal":"0.1265"}} 18000000136400f104000000000000000000000000383000 18000000136400f104000000000000000000000000383000 ===DONE===PK.h]ݵ&tests/writeconcern-ctor_error-003.phptnu[--TEST-- MongoDB\Driver\WriteConcern construction (invalid w range) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected w to be >= -3, -4 given ===DONE=== PK.h]6!tests/decimal128-3-valid-237.phptnu[--TEST-- Decimal128: [basx162] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000523000 {"d":{"$numberDecimal":"1.0E+10"}} 180000001364000a00000000000000000000000000523000 180000001364000a00000000000000000000000000523000 ===DONE===PK.h]-G33!tests/decimal128-2-valid-103.phptnu[--TEST-- Decimal128: [decq705] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001d00000000000000000000000000403000 {"d":{"$numberDecimal":"29"}} 180000001364001d00000000000000000000000000403000 ===DONE===PK.h]ߨ.33$tests/manager-addSubscriber-001.phptnu[--TEST-- MongoDB\Driver\Manager::addSubscriber() with one Manager --SKIPIF-- --FILE-- getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { printf("commandSucceeded: %s\n", $event->getCommandName()); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { printf("commandFailed: %s\n", $event->getCommandName()); } } $m = create_test_manager(); $pingCommand = new MongoDB\Driver\Command(['ping' => 1]); $unsupportedCommand = new MongoDB\Driver\Command(['unsupportedCommand' => 1]); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); $subscriber = new MySubscriber; echo "adding subscriber\n"; $m->addSubscriber($subscriber); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); throws(function () use ($m, $unsupportedCommand) { $m->executeCommand(DATABASE_NAME, $unsupportedCommand); }, MongoDB\Driver\Exception\CommandException::class); echo "removing subscriber\n"; $m->removeSubscriber($subscriber); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); ?> --EXPECT-- ping: 1 adding subscriber commandStarted: ping commandSucceeded: ping ping: 1 commandStarted: unsupportedCommand commandFailed: unsupportedCommand OK: Got MongoDB\Driver\Exception\CommandException removing subscriber ping: 1 PK.h]Zpptests/typemap-001.phptnu[--TEST-- MongoDB\Driver\Cursor::setTypeMap(): Setting typemaps --SKIPIF-- --FILE-- insert(array('_id' => 1, 'bson_array' => array(1, 2, 3), 'bson_object' => array("string" => "keys", "for" => "ever"))); $bulk->insert(array('_id' => 2, 'bson_array' => array(4, 5, 6))); $manager->executeBulkWrite(NS, $bulk); function fetch($manager, $typemap = array()) { $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array('bson_array' => 1))); if ($typemap) { $cursor->setTypeMap($typemap); } $documents = $cursor->toArray(); return $documents; } echo "Default\n"; $documents = fetch($manager); var_dump($documents[0] instanceof stdClass); var_dump(is_array($documents[0]->bson_array)); var_dump($documents[0]->bson_object instanceof stdClass); echo "\nSetting to 'MyArrayObject' for arrays\n"; $documents = fetch($manager, array("array" => "MyArrayObject")); var_dump($documents[0] instanceof stdClass); var_dump($documents[0]->bson_array instanceof MyArrayObject); var_dump($documents[0]->bson_object instanceof stdClass); echo "\nSetting to 'MyArrayObject' for arrays, embedded, and root documents\n"; $documents = fetch($manager, array("array" => "MyArrayObject", "document" => "MyArrayObject", "root" => "MyArrayObject")); var_dump($documents[0] instanceof MyArrayObject); var_dump($documents[0]['bson_array'] instanceof MyArrayObject); var_dump($documents[0]['bson_object'] instanceof MyArrayObject); echo "\nSetting to 'array' for arrays, embedded, and root documents\n"; $documents = fetch($manager, array("array" => "array", "document" => "array", "root" => "array")); var_dump(is_array($documents[0])); var_dump(is_array($documents[0]['bson_array'])); var_dump(is_array($documents[0]['bson_object'])); echo "\nSetting to 'stdclass' for arrays and 'array' for embedded and root documents\n"; $documents = fetch($manager, array("array" => "stdclass", "document" => "array", "root" => "array")); var_dump(is_array($documents[0])); var_dump($documents[0]['bson_array'] instanceof stdClass); var_dump(is_array($documents[0]['bson_object'])); echo "\nSetting to 'array' for arrays, 'stdclass' for embedded document, and 'MyArrayObject' for root document\n"; $documents = fetch($manager, array("array" => "array", "document" => "stdclass", "root" => "MyArrayObject")); var_dump($documents[0] instanceof MyArrayObject); var_dump(is_array($documents[0]['bson_array'])); var_dump($documents[0]['bson_object'] instanceof stdClass); echo "\nSetting to 'stdclass' for arrays, embedded, and root documents\n"; $documents = fetch($manager, array("array" => "stdclass", "document" => "stdclass", "root" => "stdclass")); var_dump($documents[0] instanceof stdClass); var_dump($documents[0]->bson_array instanceof stdClass); var_dump($documents[0]->bson_object instanceof stdClass); ?> ===DONE=== --EXPECT-- Default bool(true) bool(true) bool(true) Setting to 'MyArrayObject' for arrays bool(true) bool(true) bool(true) Setting to 'MyArrayObject' for arrays, embedded, and root documents bool(true) bool(true) bool(true) Setting to 'array' for arrays, embedded, and root documents bool(true) bool(true) bool(true) Setting to 'stdclass' for arrays and 'array' for embedded and root documents bool(true) bool(true) bool(true) Setting to 'array' for arrays, 'stdclass' for embedded document, and 'MyArrayObject' for root document bool(true) bool(true) bool(true) Setting to 'stdclass' for arrays, embedded, and root documents bool(true) bool(true) bool(true) ===DONE=== PK.h]Vll!tests/decimal128-2-valid-001.phptnu[--TEST-- Decimal128: [decq021] Normality --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f2af967ed05c82de3297ff6fde3c40b000 {"d":{"$numberDecimal":"-1234567890123456789012345678901234"}} 18000000136400f2af967ed05c82de3297ff6fde3c40b000 ===DONE===PK.h]꧜;"tests/server-executeQuery-004.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() finds no matching documents --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query(array()))->getServer(); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 1)); $server->executeBulkWrite(NS, $bulk); $cursor = $server->executeQuery(NS, new MongoDB\Driver\Query(array("x" => 2))); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECT-- array(0) { } ===DONE=== PK.h]~~!tests/decimal128-2-valid-052.phptnu[--TEST-- Decimal128: [decq610] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000a0ca17726dae0f1e430100fe5f00 {"d":{"$numberDecimal":"1.00000000000000000000000000000E+6140"}} 18000000136400000000a0ca17726dae0f1e430100fe5f00 ===DONE===PK.h]ytests/bson-toPHP-002.phptnu[--TEST-- MongoDB\BSON\fromPHP(): Null type map values imply default behavior --FILE-- data = array( 'list' => array(1, 2, 3), 'map' => (object) array('foo' => 'bar'), ); } public function bsonSerialize() { return $this->data; } public function bsonUnserialize(array $data) { foreach (array('list', 'map') as $key) { if (isset($data[$key])) { $this->data[$key] = $data[$key]; } } } } $bson = fromPHP(new MyDocument); echo "Test ", toJSON($bson), "\n"; hex_dump($bson); $typeMap = array( 'array' => null, 'document' => null, 'root' => null, ); var_dump(toPHP($bson, $typeMap)); ?> ===DONE=== --EXPECTF-- Test { "__pclass" : { "$binary" : "TXlEb2N1bWVudA==", "$type" : "80" }, "list" : [ 1, 2, 3 ], "map" : { "foo" : "bar" } } 0 : 55 00 00 00 05 5f 5f 70 63 6c 61 73 73 00 0a 00 [U....__pclass...] 10 : 00 00 80 4d 79 44 6f 63 75 6d 65 6e 74 04 6c 69 [...MyDocument.li] 20 : 73 74 00 1a 00 00 00 10 30 00 01 00 00 00 10 31 [st......0......1] 30 : 00 02 00 00 00 10 32 00 03 00 00 00 00 03 6d 61 [......2.......ma] 40 : 70 00 12 00 00 00 02 66 6f 6f 00 04 00 00 00 62 [p......foo.....b] 50 : 61 72 00 00 00 [ar...] object(MyDocument)#%d (1) { ["data"]=> array(2) { ["list"]=> array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } ["map"]=> object(stdClass)#%d (1) { ["foo"]=> string(3) "bar" } } } ===DONE=== PK.h]("tests/replicaset-seedlist-002.phptnu[--TEST-- MongoDB\Driver\Manager: Connecting to Replica Set with only arbiter in seedlist --SKIPIF-- --FILE-- getInfo(); // As we're building our own URL here, we do need to extract username and password // We already checked whether there is an arbiter through `skip_if_no_arbiter` $url = parse_url(URI); if (array_key_exists('user', $url) && array_key_exists('pass', $url)) { $dsn = sprintf('mongodb://%s:%s@%s', $url['user'], $url['pass'], $info['arbiters'][0]); } else { $dsn = 'mongodb://' . $info['arbiters'][0]; } $manager = create_test_manager($dsn, ['replicaSet' => $info['setName']]); // load fixtures for test $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array("_id" => 1, "x" => 2, "y" => 3)); $bulk->insert(array("_id" => 2, "x" => 3, "y" => 4)); $bulk->insert(array("_id" => 3, "x" => 4, "y" => 5)); $manager->executeBulkWrite(NS, $bulk); ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]GG#tests/manager-selectServer-002.phptnu[--TEST-- MongoDB\Driver\Manager::selectServer() defaults to primary read preference --SKIPIF-- --FILE-- 'secondary']); function isPrimary(Server $server): bool { return in_array($server->getType(), [Server::TYPE_STANDALONE, Server::TYPE_MONGOS, Server::TYPE_RS_PRIMARY, Server::TYPE_LOAD_BALANCER]); } var_dump(isPrimary($manager->selectServer())); var_dump(isPrimary($manager->selectServer(null))); ?> ===DONE=== --EXPECT-- bool(true) bool(true) ===DONE=== PK.h]ja!tests/decimal128-3-valid-149.phptnu[--TEST-- Decimal128: [basx262] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000483000 {"d":{"$numberDecimal":"1.265E+7"}} 18000000136400f104000000000000000000000000483000 18000000136400f104000000000000000000000000483000 ===DONE===PK.h] %zHH!tests/decimal128-2-valid-079.phptnu[--TEST-- Decimal128: [decq664] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006400000000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.00E+6113"}} 180000001364006400000000000000000000000000fe5f00 ===DONE===PK.h] !!/tests/manager-ctor-write_concern-error-003.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid write concern (wtimeoutms) --FILE-- 'invalid']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?wtimeoutms=invalid'. Unsupported value for "wtimeoutms": "invalid". OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected integer for "wTimeoutMS" URI option, string given ===DONE=== PK.h]EGbb!tests/decimal128-2-valid-148.phptnu[--TEST-- Decimal128: [decq825] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffff7f00000000000000000000403000 {"d":{"$numberDecimal":"2147483647"}} 18000000136400ffffff7f00000000000000000000403000 ===DONE===PK.h] tests/writeconcern-getw-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern::getW() --FILE-- getW()); } ?> ===DONE=== --EXPECT-- string(8) "majority" string(8) "majority" NULL int(-1) int(0) int(1) int(2) string(3) "tag" string(1) "2" ===DONE=== PK.h] ?!tests/decimal128-3-valid-173.phptnu[--TEST-- Decimal128: [basx174] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000343000 {"d":{"$numberDecimal":"0.001265"}} 18000000136400f104000000000000000000000000343000 18000000136400f104000000000000000000000000343000 ===DONE===PK.h]>__tests/bug0631.phptnu[--TEST-- PHPC-631: UTCDateTime::toDateTime() may return object that cannot be serialized --INI-- date.timezone=UTC --FILE-- toDateTime(); $s = serialize($datetime); var_dump($datetime); echo "\n", $s, "\n\n"; var_dump(unserialize($s)); ?> ===DONE=== --EXPECTF-- object(DateTime)#%d (%d) { ["date"]=> string(26) "2016-06-21 20:25:55.123000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" } O:8:"DateTime":3:{s:4:"date";s:26:"2016-06-21 20:25:55.123000";s:13:"timezone_type";i:1;s:8:"timezone";s:6:"+00:00";} object(DateTime)#%d (%d) { ["date"]=> string(26) "2016-06-21 20:25:55.123000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" } ===DONE=== PK.h]w7k!tests/decimal128-5-valid-004.phptnu[--TEST-- Decimal128: [decq078] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000081efac855b416d2dee04000000 {"d":{"$numberDecimal":"1.00000000000000000000000000000000E-6144"}} 180000001364000000000081efac855b416d2dee04000000 ===DONE===PK.h]JіF  !tests/decimal128-3-valid-292.phptnu[--TEST-- Decimal128: [basx243] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000683000 {"d":{"$numberDecimal":"1.265E+23"}} 18000000136400f104000000000000000000000000683000 18000000136400f104000000000000000000000000683000 ===DONE===PK.h]C!tests/symbol-decodeError-001.phptnu[--TEST-- Symbol: bad symbol length: 0 (but no 0x00 either) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]Ů-tests/manager-executeBulkWrite_error-005.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() WriteResult accessible for network error --SKIPIF-- --FILE-- selectServer(new \MongoDB\Driver\ReadPreference('primary')); configureTargetedFailPoint($server, 'failCommand', [ 'times' => 1 ], [ 'failCommands' => ['delete'], 'closeConnection' => true, ]); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 1]]); $bulk->delete(['x' => 1]); try { $server->executeBulkWrite(NS, $bulk); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { printf("%s(%d): %s\n", get_class($e), $e->getCode(), $e->getMessage()); $prev = $e->getPrevious(); printf("%s(%d): %s\n", get_class($prev), $prev->getCode(), $prev->getMessage()); var_dump($e->getWriteResult()); } ?> ===DONE=== --EXPECTF-- MongoDB\Driver\Exception\BulkWriteException(0): Bulk write failed due to previous MongoDB\Driver\Exception\ConnectionTimeoutException: Failed to send "delete" command with database "%s": Failed to read 4 bytes: socket error or timeout MongoDB\Driver\Exception\ConnectionTimeoutException(%d): Failed to send "delete" command with database "%s": Failed to read 4 bytes: socket error or timeout object(MongoDB\Driver\WriteResult)#%d (9) { ["nInserted"]=> int(1) ["nMatched"]=> int(1) ["nModified"]=> int(1) ["nRemoved"]=> int(0) ["nUpserted"]=> int(0) ["upsertedIds"]=> array(0) { } ["writeErrors"]=> array(0) { } ["writeConcernError"]=> NULL ["writeConcern"]=> object(MongoDB\Driver\WriteConcern)#%d (0) { } } ===DONE=== PK.h]+Ztests/bson-javascript-001.phptnu[--TEST-- MongoDB\BSON\Javascript #001 --FILE-- 42)); $tests = array( array("js" => $js), array("js" => $jswscope), ); foreach($tests as $n => $test) { echo "Test#{$n}", "\n"; $s = fromPHP($test); $testagain = toPHP($s); var_dump($test['js'] instanceof MongoDB\BSON\Javascript); var_dump($testagain->js instanceof MongoDB\BSON\Javascript); } ?> ===DONE=== --EXPECT-- Test#0 bool(true) bool(true) Test#1 bool(true) bool(true) ===DONE=== PK.h])tests/code-decodeError-006.phptnu[--TEST-- Javascript Code: empty code string, but extra null --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h][ +tests/session-advanceOperationTime-003.phptnu[--TEST-- MongoDB\Driver\Session::advanceOperationTime() with TimestampInterface --SKIPIF-- --FILE-- getIncrement(), $this->getTimestamp()); } } $manager = create_test_manager(); $session = $manager->startSession(); echo "Initial operation time of session:\n"; var_dump($session->getOperationTime()); $session->advanceOperationTime(new MyTimestamp); echo "\nOperation time after advancing session:\n"; var_dump($session->getOperationTime()); ?> ===DONE=== --EXPECTF-- Initial operation time of session: NULL Operation time after advancing session: object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(4) "5678" ["timestamp"]=> string(4) "1234" } ===DONE=== PK.h]K**!tests/decimal128-3-valid-117.phptnu[--TEST-- Decimal128: [basx657] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000004e3000 {"d":{"$numberDecimal":"0E+7"}} 1800000013640000000000000000000000000000004e3000 ===DONE===PK.h]EG@33!tests/decimal128-2-valid-108.phptnu[--TEST-- Decimal128: [decq710] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364003200000000000000000000000000403000 {"d":{"$numberDecimal":"50"}} 180000001364003200000000000000000000000000403000 ===DONE===PK.h]7 //!tests/decimal128-2-valid-034.phptnu[--TEST-- Decimal128: [decq428] negative zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000040b000 {"d":{"$numberDecimal":"-0"}} 18000000136400000000000000000000000000000040b000 ===DONE===PK.h]ll tests/bson-minkey-clone-001.phptnu[--TEST-- MongoDB\BSON\MinKey can be cloned --FILE-- foo = 'bar'; $clone = clone $minKey; var_dump($clone == $minKey); var_dump($clone === $minKey); var_dump($clone->foo); ?> ===DONE=== --EXPECT-- bool(true) bool(false) string(3) "bar" ===DONE=== PK.h]ەhFtests/oid-valid-002.phptnu[--TEST-- ObjectId: All ones --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 14000000076100ffffffffffffffffffffffff00 {"a":{"$oid":"ffffffffffffffffffffffff"}} 14000000076100ffffffffffffffffffffffff00 ===DONE===PK.h]q!tests/decimal128-1-valid-046.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - infiniTY --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007800 {"d":{"$numberDecimal":"Infinity"}} 180000001364000000000000000000000000000000007800 180000001364000000000000000000000000000000007800 ===DONE===PK.h]Y,--)tests/bson-regex-set_state_error-001.phptnu[--TEST-- MongoDB\BSON\Regex::__set_state() requires "pattern" and "flags" string fields --FILE-- 'regexp']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Regex::__set_state(['flags' => 'i']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Regex::__set_state(['pattern' => 0, 'flags' => 0]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex initialization requires "pattern" and "flags" string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex initialization requires "pattern" and "flags" string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex initialization requires "pattern" and "flags" string fields ===DONE=== PK.h]"Y%%*tests/session-getLogicalSessionId-001.phptnu[--TEST-- MongoDB\Driver\Session::getLogicalSessionId() --SKIPIF-- --FILE-- startSession(); $lsid = $session->getLogicalSessionId(); /* Note: we avoid dumping the Binary object as it may contain bytes that * intefere with the test suite's ability to compare expected output. */ var_dump($lsid instanceof stdClass); var_dump($lsid->id instanceof MongoDB\BSON\Binary); var_dump($lsid->id->getType() === MongoDB\BSON\Binary::TYPE_UUID); ?> ===DONE=== --EXPECTF-- bool(true) bool(true) bool(true) ===DONE=== PK.h]Ftests/session-debug-004.phptnu[--TEST-- MongoDB\Driver\Session debug output (after ending session) --SKIPIF-- --FILE-- startSession(); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); $session->endSession(); var_dump($session); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Session)#%d (%d) { ["logicalSessionId"]=> NULL ["clusterTime"]=> NULL ["causalConsistency"]=> NULL ["snapshot"]=> NULL ["operationTime"]=> NULL ["server"]=> NULL ["inTransaction"]=> NULL ["transactionState"]=> NULL ["transactionOptions"]=> NULL } ===DONE=== PK.h](˘'tests/bson-javascript-getScope-001.phptnu[--TEST-- MongoDB\BSON\Javascript::getScope() --FILE-- 42]], ['function foo() { return id; }', ['id' => new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4603')]], ]; foreach ($tests as $test) { list($code, $scope) = $test; $js = new MongoDB\BSON\Javascript($code, $scope); var_dump($js->getScope()); } ?> ===DONE=== --EXPECTF-- NULL object(stdClass)#%d (%d) { } object(stdClass)#%d (%d) { ["foo"]=> int(42) } object(stdClass)#%d (%d) { ["id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } } ===DONE=== PK.h]l,tests/bson-dbpointer-get_properties-002.phptnu[--TEST-- MongoDB\BSON\DBPointer get_properties handler (foreach) --FILE-- dbptr; foreach ($dbptr as $key => $value) { var_dump($key); var_dump($value); } ?> ===DONE=== --EXPECT-- string(3) "ref" string(11) "phongo.test" string(2) "id" string(24) "5a2e78accd485d55b405ac12" ===DONE=== PK.h]ް%tests/bson-undefined-compare-001.phptnu[--TEST-- MongoDB\BSON\Undefined comparisons --FILE-- MongoDB\BSON\toPHP(MongoDB\BSON\fromJSON('{ "undefined": {"$undefined": true} }'))); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) ===DONE=== PK.h]ytests/top-parseError-005.phptnu[--TEST-- Top-level document validity: Bad $regularExpression (missing pattern field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]$%'tests/session-startTransaction-001.phptnu[--TEST-- MongoDB\Driver\Session::startTransaction() ensure that methods can be called --SKIPIF-- --FILE-- startSession(); $session->startTransaction(); $session->abortTransaction(); $session->startTransaction(); $session->commitTransaction(); ?> ===DONE=== --EXPECTF-- ===DONE=== PK.h]ӏ*  tests/binary-valid-010.phptnu[--TEST-- Binary type: subtype 0x80 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0f0000000578000200000080ffff00 {"x":{"$binary":{"base64":"\/\/8=","subType":"80"}}} 0f0000000578000200000080ffff00 ===DONE===PK.h]F__!tests/decimal128-3-valid-010.phptnu[--TEST-- Decimal128: [basx022] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000003eb000 {"d":{"$numberDecimal":"-1.0"}} 180000001364000a000000000000000000000000003eb000 ===DONE===PK.h]z/##/tests/commandStartedEvent-getServiceId-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandStartedEvent includes serviceId for load balanced topology --SKIPIF-- --FILE-- getCommandName()); if (isset($this->commandStartedServiceId)) { printf("same serviceId as last commandStarted: %s\n", $event->getServiceId() == $this->commandStartedServiceId ? 'yes' : 'no'); } $this->commandStartedServiceId = $event->getServiceId(); var_dump($this->commandStartedServiceId); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(); $manager->addSubscriber(new MySubscriber); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); ?> --EXPECTF-- commandStarted: ping object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } commandStarted: ping same serviceId as last commandStarted: yes object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } PK.h]nsV;;!tests/decimal128-3-valid-176.phptnu[--TEST-- Decimal128: [basx181] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000423000 {"d":{"$numberDecimal":"1.265E+4"}} 18000000136400f104000000000000000000000000423000 ===DONE===PK.h]bMtests/session-001.phptnu[--TEST-- MongoDB\Driver\Session spec test: Pool is LIFO --SKIPIF-- --FILE-- startSession(); $firstSessionId = $firstSession->getLogicalSessionId(); /* libmongoc does not pool unused sessions (CDRIVER-3322), so we must use this * session with a command to ensure it enters the pool. */ $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $firstSession]); unset($firstSession); $secondSession = $manager->startSession(); $secondSessionId = $secondSession->getLogicalSessionId(); var_dump($firstSessionId == $secondSessionId); ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]pqtests/top-parseError-035.phptnu[--TEST-- Top-level document validity: Bad $minKey (wrong integer) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]x5IItests/cursorid-001.phptnu[--TEST-- Sorting single field, ascending, using the Cursor Iterator --SKIPIF-- --FILE-- array('_id' => 0, 'username' => 1), 'sort' => array('username' => 1), 'batchSize' => 11, 'limit' => 110, )); $cursor = $manager->executeQuery(NS, $query); $cursorid = $cursor->getId(); $s1 = (string)$cursorid; var_dump( $cursorid, $s1 ); var_dump($s1 > 0); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> %rint\(\d+\)|string\(\d+\) "\d+"%r } string(%d) "%d" bool(true) ===DONE=== PK.h]'tests/bson-int64-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\Int64::jsonSerialize() with json_encode() --FILE-- unserialize('C:18:"MongoDB\BSON\Int64":47:{a:1:{s:7:"integer";s:19:"9223372036854775807";}}')], ['min' => unserialize('C:18:"MongoDB\BSON\Int64":48:{a:1:{s:7:"integer";s:20:"-9223372036854775808";}}')], ['zero' => unserialize('C:18:"MongoDB\BSON\Int64":28:{a:1:{s:7:"integer";s:1:"0";}}')], ]; foreach ($tests as $test) { var_dump(json_encode($test)); } ?> ===DONE=== --EXPECT-- string(45) "{"max":{"$numberLong":"9223372036854775807"}}" string(46) "{"min":{"$numberLong":"-9223372036854775808"}}" string(28) "{"zero":{"$numberLong":"0"}}" ===DONE=== PK.h]8nn!tests/decimal128-2-valid-060.phptnu[--TEST-- Decimal128: [decq626] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000a0dec5adc935360000000000fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000E+6132"}} 180000001364000000a0dec5adc935360000000000fe5f00 ===DONE===PK.h]ڕ'tests/bson-regex-serialization-001.phptnu[--TEST-- MongoDB\BSON\Regex serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(1) "i" } string(84) "C:18:"MongoDB\BSON\Regex":53:{a:2:{s:7:"pattern";s:6:"regexp";s:5:"flags";s:1:"i";}}" object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(1) "i" } ===DONE=== PK.h]+>>'tests/manager-executeBulkWrite-013.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); $pinnedServer = $session->getServer(); var_dump($pinnedServer instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); $session->commitTransaction(); var_dump($session->getServer() == $pinnedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(false) bool(false) bool(true) bool(true) bool(false) ===DONE=== PK.h] &AAtests/cursor-session-001.phptnu[--TEST-- MongoDB\Driver\Cursor debug output for query cursor includes explicit session --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $session = $manager->startSession(); $cursor = $manager->executeQuery(NS, $query, ['session' => $session]); $iterator = new IteratorIterator($cursor); $iterator->rewind(); $iterator->next(); printf("Cursor ID is zero: %s\n", (string) $cursor->getId() === '0' ? 'yes' : 'no'); var_dump($cursor); $iterator->next(); /* Per PHPC-1161, the Cursor will free a reference to the Session as soon as it * is exhausted. While this is primarily done to ensure implicit sessions for * command cursors are returned to the pool ASAP, it also applies to explicit * sessions. */ printf("\nCursor ID is zero: %s\n", (string) $cursor->getId() === '0' ? 'yes' : 'no'); var_dump($cursor); ?> ===DONE=== --EXPECTF-- Cursor ID is zero: no object(MongoDB\Driver\Cursor)#%d (%d) { %a ["session"]=> object(MongoDB\Driver\Session)#%d (%d) { %a } %a } Cursor ID is zero: yes object(MongoDB\Driver\Cursor)#%d (%d) { %a ["session"]=> NULL %a } ===DONE=== PK.h]/dPtests/bug0705-001.phptnu[--TEST-- PHPC-705: Do not unnecessarily wrap filters in $query (profiled query) --SKIPIF-- =', '3.1'); ?> --FILE-- 2]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); $result = current($cursor->toArray()); printf("Set profile level to 2 successfully: %s\n", (empty($result->ok) ? 'no' : 'yes')); $manager->executeQuery(NS, new MongoDB\Driver\Query(["x" => 1])); $query = new MongoDB\Driver\Query( [ 'op' => 'query', 'ns' => NS, ], [ 'sort' => ['ts' => -1], 'limit' => 1, ] ); $cursor = $manager->executeQuery(DATABASE_NAME . '.system.profile', $query); $profileEntry = current($cursor->toArray()); var_dump($profileEntry->query); $command = new MongoDB\Driver\Command(array('profile' => 0)); $cursor = $manager->executeCommand(DATABASE_NAME, $command); $result = current($cursor->toArray()); printf("Set profile level to 0 successfully: %s\n", (empty($result->ok) ? 'no' : 'yes')); ?> ===DONE=== --EXPECTF-- Set profile level to 2 successfully: yes object(stdClass)#%d (%d) { ["x"]=> int(1) } Set profile level to 0 successfully: yes ===DONE=== PK.h]ttests/bug1045.phptnu[--TEST-- PHPC-1045: Segfault if username is not provided for SCRAM-SHA-1 authMechanism --SKIPIF-- --FILE-- 'SCRAM-SHA-1']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: 'SCRAM-SHA-1' authentication mechanism requires username. ===DONE=== PK.h] &tests/transaction-integration-002.phptnu[--TEST-- MongoDB\Driver\Session::startTransaction() Transient Error Test --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); /* Insert Data */ $bw = new \MongoDB\Driver\BulkWrite(); $bw->insert( [ '_id' => 0, 'msg' => 'Initial Value' ] ); $manager->executeBulkWrite(NS, $bw); /* First 'thread', try to update document, but don't close transaction */ $sessionA = $manager->startSession(); $sessionA->startTransaction( [ 'readConcern' => new \MongoDB\Driver\ReadConcern( "snapshot" ), 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $cmd = new \MongoDB\Driver\Command( [ 'update' => COLLECTION_NAME, 'updates' => [ [ 'q' => [ '_id' => 0 ], 'u' => [ '$set' => [ 'msg' => 'Update from session A' ] ], ] ] ] ); $manager->executeCommand(DATABASE_NAME, $cmd, ['session' => $sessionA]); /* Second 'thread', try to update the same document, should trigger exception. In handler, commit * first settion, verify result, and redo this transaction. */ $sessionB = $manager->startSession(); $sessionB->startTransaction( [ 'readConcern' => new \MongoDB\Driver\ReadConcern( "snapshot" ), 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); try { $cmd = new \MongoDB\Driver\Command( [ 'update' => COLLECTION_NAME, 'updates' => [ [ 'q' => [ '_id' => 0 ], 'u' => [ '$set' => [ 'msg' => 'Update from session B' ] ], ] ] ] ); $manager->executeCommand(DATABASE_NAME, $cmd, ['session' => $sessionB]); } catch (MongoDB\Driver\Exception\CommandException $e) { echo $e->hasErrorLabel('TransientTransactionError') ? "found a TransientTransactionError" : "did NOT get a TransientTransactionError", "\n"; } ?> ===DONE=== --EXPECTF-- found a TransientTransactionError ===DONE=== PK.h]HB&tests/decimal128-7-parseError-055.phptnu[--TEST-- Decimal128: [basx559] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]+#SS!tests/decimal128-5-valid-039.phptnu[--TEST-- Decimal128: [decq609] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000a0ca17726dae0f1e430100fe5f00 {"d":{"$numberDecimal":"1.00000000000000000000000000000E+6140"}} 18000000136400000000a0ca17726dae0f1e430100fe5f00 18000000136400000000a0ca17726dae0f1e430100fe5f00 ===DONE===PK.h]-&tests/decimal128-7-parseError-012.phptnu[--TEST-- Decimal128: [basx506] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]Ptests/cursor-getmore-001.phptnu[--TEST-- MongoDB\Driver\Cursor query result iteration with batchSize requiring getmore with full batches --SKIPIF-- --FILE-- insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array(), array('batchSize' => 2))); foreach ($cursor as $i => $document) { printf("%d => {_id: %d}\n", $i, $document->_id); } ?> ===DONE=== --EXPECT-- Inserted: 6 0 => {_id: 0} 1 => {_id: 1} 2 => {_id: 2} 3 => {_id: 3} 4 => {_id: 4} 5 => {_id: 5} ===DONE=== PK.h]  !tests/decimal128-3-valid-183.phptnu[--TEST-- Decimal128: [basx365] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000543000 {"d":{"$numberDecimal":"7E+10"}} 180000001364000700000000000000000000000000543000 180000001364000700000000000000000000000000543000 ===DONE===PK.h]Ga99.tests/bson-utcdatetime-get_properties-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime get_properties handler (get_object_vars) --FILE-- ===DONE=== --EXPECT-- array(1) { ["milliseconds"]=> string(13) "1416445411987" } ===DONE=== PK.h]Ctests/standalone-auth-001.phptnu[--TEST-- Connect to MongoDB with using default auth mechanism --SKIPIF-- --FILE-- insert(array("my" => "value")); $bulk->insert(array("my" => "value", "foo" => "bar")); $bulk->insert(array("my" => "value", "foo" => "bar")); $bulk->delete(array("my" => "value", "foo" => "bar"), array("limit" => 1)); $bulk->update(array("foo" => "bar"), array('$set' => array("foo" => "baz")), array("limit" => 1, "upsert" => 0)); $retval = $manager->executeBulkWrite(NS, $bulk); printf("Inserted: %d\n", getInsertCount($retval)); printf("Deleted: %d\n", getDeletedCount($retval)); printf("Updated: %d\n", getModifiedCount($retval)); printf("Upserted: %d\n", getUpsertedCount($retval)); foreach(getWriteErrors($retval) as $error) { printf("WriteErrors: %", $error); } ?> ===DONE=== --EXPECT-- Inserted: 3 Deleted: 1 Updated: 1 Upserted: 0 ===DONE=== PK.h]uY!tests/decimal128-2-valid-048.phptnu[--TEST-- Decimal128: [decq602] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000a5bc138938d44c64d31fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000000000000000E+6144"}} 18000000136400000000000a5bc138938d44c64d31fe5f00 ===DONE===PK.h]6O̪*tests/manager-executeWriteCommand-003.phptnu[--TEST-- MongoDB\Driver\Manager::executeWriteCommand() write concern inheritance --SKIPIF-- --FILE-- 2, 'wtimeoutms' => 1000]); $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['x' => 1], 'upsert' => true, 'new' => true, 'update' => ['$inc' => ['x' => 1]], ]); (new CommandObserver)->observe( function() use ($manager, $command) { $manager->executeWriteCommand(DATABASE_NAME, $command); $manager->executeWriteCommand(DATABASE_NAME, $command, ['writeConcern' => new MongoDB\Driver\WriteConcern(1)]); }, function(stdClass $command) { echo json_encode($command->writeConcern), "\n"; } ); ?> ===DONE=== --EXPECT-- {"w":2,"wtimeout":1000} {"w":1} ===DONE=== PK.h]!tests/boolean-valid-002.phptnu[--TEST-- Boolean: False --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 090000000862000000 {"b":false} 090000000862000000 ===DONE===PK.h]֩ (tests/readpreference-var_export-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference: var_export() --FILE-- 'ny']]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, [['dc' => 'ny'], ['dc' => 'sf', 'use' => 'reporting'], []]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => 1000]), ]; foreach ($tests as $test) { echo var_export($test, true), "\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'primary', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'primaryPreferred', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'secondary', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'secondaryPreferred', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'nearest', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'primary', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'secondary', 'tags' => array ( 0 => %Sarray( 'dc' => 'ny', %S), ), )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'secondary', 'tags' => array ( 0 => %Sarray( 'dc' => 'ny', %S), 1 => %Sarray( 'dc' => 'sf', 'use' => 'reporting', %S), 2 => %Sarray( %S), ), )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'secondary', 'maxStalenessSeconds' => 1000, )) ===DONE=== PK.h]DYr(tests/server-executeReadCommand-003.phptnu[--TEST-- MongoDB\Driver\Server::executeReadCommand() read concern inheritance --SKIPIF-- --FILE-- 'local']); $server = $manager->selectServer(new MongoDB\Driver\ReadPreference('primary')); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$group' => ['_id' => 1]]], 'cursor' => (object) [], ]); (new CommandObserver)->observe( function() use ($server, $command) { $server->executeReadCommand(DATABASE_NAME, $command); $server->executeReadCommand(DATABASE_NAME, $command, [ 'readConcern' => new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE), ]); }, function(stdClass $command) { echo json_encode($command->readConcern), "\n"; } ); ?> ===DONE=== --EXPECT-- {"level":"local"} {"level":"available"} ===DONE=== PK.h]2 ;;!tests/decimal128-3-valid-178.phptnu[--TEST-- Decimal128: [basx182] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000004a3000 {"d":{"$numberDecimal":"1.265E+8"}} 18000000136400f1040000000000000000000000004a3000 ===DONE===PK.h]IJ#tests/bson-toCanonicalJSON-001.phptnu[--TEST-- MongoDB\BSON\toCanonicalExtendedJSON(): Encoding JSON --FILE-- null ], [ 'boolean' => true ], [ 'string' => 'foo' ], [ 'integer' => 123 ], [ 'double' => 1.0, ], [ 'nan' => NAN ], [ 'pos_inf' => INF ], [ 'neg_inf' => -INF ], [ 'array' => [ 'foo', 'bar' ]], [ 'document' => [ 'foo' => 'bar' ]], ]; foreach ($tests as $value) { $bson = fromPHP($value); echo toCanonicalExtendedJSON($bson), "\n"; } ?> ===DONE=== --EXPECT-- { } { "null" : null } { "boolean" : true } { "string" : "foo" } { "integer" : { "$numberInt" : "123" } } { "double" : { "$numberDouble" : "1.0" } } { "nan" : { "$numberDouble" : "NaN" } } { "pos_inf" : { "$numberDouble" : "Infinity" } } { "neg_inf" : { "$numberDouble" : "-Infinity" } } { "array" : [ "foo", "bar" ] } { "document" : { "foo" : "bar" } } ===DONE=== PK.h]4z)tests/manager-ctor-write_concern-006.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): write concern options (64-bit wtimeoutms) --SKIPIF-- --FILE-- 2, 'wtimeoutms' => 4294967296]], [null, ['w' => 'majority', 'wtimeoutms' => 4294967296]], [null, ['w' => 'customTagSet', 'wtimeoutms' => 4294967296]], ]; foreach ($tests as $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getWriteConcern()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> int(4294967296) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" ["wtimeout"]=> int(4294967296) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(12) "customTagSet" ["wtimeout"]=> int(4294967296) } ===DONE=== PK.h]o4==!tests/decimal128-1-valid-028.phptnu[--TEST-- Decimal128: Scientific - 0 with Exponent --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000205f00 {"d":{"$numberDecimal":"0E+6000"}} 180000001364000000000000000000000000000000205f00 ===DONE===PK.h]q)tests/bug1839-003.phptnu[--TEST-- PHPC-1839: Referenced, out-of-scope, interned string in typeMap (PHP < 8.1) --SKIPIF-- =', '8.1'); ?> --FILE-- &$rootValue, 'document' => &$documentValue]; return $typemap; } $typemap = createTypemap(); $bson = MongoDB\BSON\fromPhp((object) []); echo "Before:\n"; debug_zval_dump($typemap); MongoDB\BSON\toPHP($bson, $typemap); echo "After:\n"; debug_zval_dump($typemap); ?> ===DONE=== --EXPECT-- Before: array(2) refcount(2){ ["root"]=> string(5) "array" refcount(1) ["document"]=> string(5) "array" refcount(1) } After: array(2) refcount(2){ ["root"]=> string(5) "array" refcount(1) ["document"]=> string(5) "array" refcount(1) } ===DONE=== PK.h]~  0tests/bulkwriteexception-getwriteresult-001.phptnu[--TEST-- MongoDB\Driver\Exception\BulkWriteException::getWriteResult() --FILE-- 1]; $reflection = new ReflectionClass($exception); $resultDocumentProperty = $reflection->getProperty('writeResult'); $resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $writeResult); var_dump($writeResult === $exception->getWriteResult()); ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]yLAA!tests/decimal128-3-valid-186.phptnu[--TEST-- Decimal128: [basx407] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000002a3000 {"d":{"$numberDecimal":"7E-11"}} 1800000013640007000000000000000000000000002a3000 ===DONE===PK.h]QK6 6 1tests/manager-ctor-read_preference-error-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid read preference (mode and tags) --FILE-- 1]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager(null, ['readPreference' => 'primary', 'readPreferenceTags' => 'invalid']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; // Invalid values echo throws(function() { create_test_manager('mongodb://127.0.0.1/?readPreference=primary&readPreferenceTags=dc:ny'); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager(null, ['readPreference' => 'nothing']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://127.0.0.1/?readPreference=primary', ['readPreferenceTags' => [[]]]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://127.0.0.1/?readPreference=primary', ['readPreferenceTags' => ['invalid']]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=1'. Unsupported readPreference value [readPreference=1]. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=secondary&readPreferenceTags=invalid'. Unsupported value for "readPreferenceTags": "invalid". OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "readPreference" URI option, 32-bit integer given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected array for "readPreferenceTags" URI option, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=primary&readPreferenceTags=dc:ny'. Invalid readPreferences. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Unsupported readPreference value: 'nothing' OK: Got MongoDB\Driver\Exception\InvalidArgumentException Primary read preference mode conflicts with tags OK: Got MongoDB\Driver\Exception\InvalidArgumentException Read preference tags must be an array of zero or more documents ===DONE=== PK.h]֛  -tests/server-executeReadWriteCommand-003.phptnu[--TEST-- MongoDB\Driver\Server::executeReadWriteCommand() read and write concern inheritance --SKIPIF-- --FILE-- 'local', 'w' => 2, 'wtimeoutms' => 1000]); $server = $manager->selectServer(new MongoDB\Driver\ReadPreference('primary')); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$group' => ['_id' => 1]], ['$out' => COLLECTION_NAME . '.out'], ], 'cursor' => (object) [], ]); (new CommandObserver)->observe( function() use ($server, $command) { $server->executeReadWriteCommand(DATABASE_NAME, $command); $server->executeReadWriteCommand(DATABASE_NAME, $command, [ 'readConcern' => new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE), 'writeConcern' => new MongoDB\Driver\WriteConcern(1), ]); }, function(stdClass $command) { echo json_encode($command->readConcern), "\n"; echo json_encode($command->writeConcern), "\n"; } ); ?> ===DONE=== --EXPECT-- {"level":"local"} {"w":2,"wtimeout":1000} {"level":"available"} {"w":1} ===DONE=== PK.h]JRO!tests/decimal128-1-valid-050.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - -infiniTy --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000000f800 {"d":{"$numberDecimal":"-Infinity"}} 18000000136400000000000000000000000000000000f800 18000000136400000000000000000000000000000000f800 ===DONE===PK.h]OR!tests/causal-consistency-010.phptnu[--TEST-- Causal consistency: unacknowledged write does not update operationTime --SKIPIF-- --FILE-- startSession(); echo "Initial operation time:\n"; var_dump($session->getOperationTime()); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $writeConcern = new MongoDB\Driver\WriteConcern(0); /* Ignore the InvalidArgumentException for trying to combine an unacknowledged * write concern with an explicit session. */ try { $manager->executeBulkWrite(NS, $bulk, ['session' => $session, 'writeConcern' => $writeConcern]); } catch (MongoDB\Driver\Exception\InvalidArgumentException $e) {} echo "\nOperation time after unacknowledged write:\n"; var_dump($session->getOperationTime()); ?> ===DONE=== --EXPECT-- Initial operation time: NULL Operation time after unacknowledged write: NULL ===DONE=== PK.h]+5$tests/bson-javascript_error-003.phptnu[--TEST-- MongoDB\BSON\Javascript::__construct() does not allow code to contain null bytes --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Code cannot contain null bytes ===DONE=== PK.h] jW55!tests/decimal128-5-valid-021.phptnu[--TEST-- Decimal128: [decq183] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000008000 {"d":{"$numberDecimal":"-1E-6176"}} 180000001364000100000000000000000000000000008000 180000001364000100000000000000000000000000008000 ===DONE===PK.h]Z r=GG!tests/decimal128-3-valid-127.phptnu[--TEST-- Decimal128: [basx036] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640015cd5b0700000000000000000000203000 {"d":{"$numberDecimal":"1.23456789E-8"}} 1800000013640015cd5b0700000000000000000000203000 1800000013640015cd5b0700000000000000000000203000 ===DONE===PK.h] gje] ] tests/typemap-005.phptnu[--TEST-- MongoDB\Driver\Cursor::setTypeMap(): Setting fieldPath typemaps for compound types with numerical keys --SKIPIF-- --FILE-- 1, 'array0' => [0 => [ 4, 5, 6 ], 1 => [ 7, 8, 9 ]], 'array1' => [1 => [ 4, 5, 6 ], 2 => [ 7, 8, 9 ]], ]; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert($document); $manager->executeBulkWrite(NS, $bulk); function fetch($manager, $typemap = []) { $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); if ($typemap) { $cursor->setTypeMap($typemap); } $documents = $cursor->toArray(); return $documents; } echo "Default\n"; $documents = fetch($manager); var_dump($documents[0] instanceof stdClass); var_dump(is_array($documents[0]->array0)); var_dump(is_object($documents[0]->array1)); var_dump($documents[0]->array1 instanceof stdClass); echo "\nSetting 'array0' path to 'MyArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'array0' => "MyArrayObject" ]]); var_dump($documents[0] instanceof stdClass); var_dump(is_object($documents[0]->array0)); var_dump($documents[0]->array0 instanceof MyArrayObject); echo "\nSetting 'array0.1' path to 'MyArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'array0.1' => "MyArrayObject", ]]); var_dump($documents[0] instanceof stdClass); var_dump(is_array($documents[0]->array0)); var_dump(is_array($documents[0]->array0[0])); var_dump($documents[0]->array0[1] instanceof MyArrayObject); echo "\nSetting 'array1.1' path to 'MyArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'array1.1' => "MyArrayObject", ]]); var_dump($documents[0] instanceof stdClass); var_dump(is_object($documents[0]->array1)); var_dump($documents[0]->array1 instanceof stdClass); $a = ((array) $documents[0]->array1); var_dump($a[1] instanceof MyArrayObject); var_dump(is_array($a[2])); ?> ===DONE=== --EXPECT-- Default bool(true) bool(true) bool(true) bool(true) Setting 'array0' path to 'MyArrayObject' bool(true) bool(true) bool(true) Setting 'array0.1' path to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'array1.1' path to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]Mtests/bug0544.phptnu[--TEST-- PHPC-544: Consult SIZEOF_ZEND_LONG for 64-bit integer support --SKIPIF-- --FILE-- -2147483648], ['x' => 2147483647], ['x' => -4294967294], ['x' => 4294967294], ['x' => -4294967295], ['x' => 4294967295], ['x' => -9223372036854775807], ['x' => 9223372036854775807], ]; foreach ($tests as $test) { $bson = fromPHP($test); /* Note: Although libbson can parse the extended JSON representation for * 64-bit integers (i.e. "$numberLong"), it currently prints them as * doubles (see: https://jira.mongodb.org/browse/CDRIVER-375). */ printf("Test %s\n", toJSON($bson)); hex_dump($bson); var_dump(toPHP($bson)); echo "\n"; } ?> ===DONE=== --EXPECTF-- Test { "x" : -2147483648 } 0 : 0c 00 00 00 10 78 00 00 00 00 80 00 [.....x......] object(stdClass)#%d (%d) { ["x"]=> int(-2147483648) } Test { "x" : 2147483647 } 0 : 0c 00 00 00 10 78 00 ff ff ff 7f 00 [.....x......] object(stdClass)#%d (%d) { ["x"]=> int(2147483647) } Test { "x" : -4294967294 } 0 : 10 00 00 00 12 78 00 02 00 00 00 ff ff ff ff 00 [.....x..........] object(stdClass)#%d (%d) { ["x"]=> int(-4294967294) } Test { "x" : 4294967294 } 0 : 10 00 00 00 12 78 00 fe ff ff ff 00 00 00 00 00 [.....x..........] object(stdClass)#%d (%d) { ["x"]=> int(4294967294) } Test { "x" : -4294967295 } 0 : 10 00 00 00 12 78 00 01 00 00 00 ff ff ff ff 00 [.....x..........] object(stdClass)#%d (%d) { ["x"]=> int(-4294967295) } Test { "x" : 4294967295 } 0 : 10 00 00 00 12 78 00 ff ff ff ff 00 00 00 00 00 [.....x..........] object(stdClass)#%d (%d) { ["x"]=> int(4294967295) } Test { "x" : -9223372036854775807 } 0 : 10 00 00 00 12 78 00 01 00 00 00 00 00 00 80 00 [.....x..........] object(stdClass)#%d (%d) { ["x"]=> int(-9223372036854775807) } Test { "x" : 9223372036854775807 } 0 : 10 00 00 00 12 78 00 ff ff ff ff ff ff ff 7f 00 [.....x..........] object(stdClass)#%d (%d) { ["x"]=> int(9223372036854775807) } ===DONE=== PK.h]8b!tests/decimal128-3-valid-076.phptnu[--TEST-- Decimal128: [basx640] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003e3000 {"d":{"$numberDecimal":"0.0"}} 1800000013640000000000000000000000000000003e3000 1800000013640000000000000000000000000000003e3000 ===DONE===PK.h]}q55!tests/decimal128-3-valid-165.phptnu[--TEST-- Decimal128: [basx170] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003a3000 {"d":{"$numberDecimal":"1.265"}} 18000000136400f1040000000000000000000000003a3000 ===DONE===PK.h]uu  )tests/writeresult-getwriteerrors-001.phptnu[--TEST-- MongoDB\Driver\WriteResult::getWriteErrors() with ordered execution --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $bulk->insert(['_id' => 4]); $bulk->insert(['_id' => 4]); try { $result = $manager->executeBulkWrite(NS, $bulk); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteErrors()); } ?> ===DONE=== --EXPECTF-- array(1) { [0]=> object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "%SE11000 duplicate key error %s: phongo.writeResult_writeresult_getwriteerrors_001%sdup key: { %S: 2 }" ["code"]=> int(11000) ["index"]=> int(2) ["info"]=> NULL } } ===DONE=== PK.h]P-e"tests/server-executeQuery-005.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() takes a read preference (OP_QUERY) --SKIPIF-- =', '3.1'); ?> --FILE-- selectServer($rp); $command = new MongoDB\Driver\Command(array('profile' => 2)); $cursor = $secondary->executeCommand(DATABASE_NAME, $command); $result = current($cursor->toArray()); printf("Set profile level to 2 successfully: %s\n", (empty($result->ok) ? 'no' : 'yes')); if (empty($result->ok)) { exit("Could not set profile level\n"); } $secondary->executeQuery(NS, new MongoDB\Driver\Query(array("x" => 1)), $rp); $query = new MongoDB\Driver\Query( array( 'op' => 'query', 'ns' => NS, ), array( 'sort' => array('ts' => -1), 'limit' => 1, ) ); $cursor = $secondary->executeQuery(DATABASE_NAME . '.system.profile', $query, $rp); $profileEntry = current($cursor->toArray()); var_dump($profileEntry->query); $command = new MongoDB\Driver\Command(array('profile' => 0)); $cursor = $secondary->executeCommand(DATABASE_NAME, $command); $result = current($cursor->toArray()); printf("Set profile level to 0 successfully: %s\n", (empty($result->ok) ? 'no' : 'yes')); ?> ===DONE=== --EXPECTF-- Set profile level to 2 successfully: yes object(stdClass)#%d (%d) { ["x"]=> int(1) } Set profile level to 0 successfully: yes ===DONE=== PK.h] tests/ini-debug-phpinfo-002.phptnu[--TEST-- phpinfo() reports mongodb.debug (master and local) --INI-- mongodb.debug=stderr --FILE-- ===DONE=== --EXPECTF-- %a mongodb.debug => stdout => stderr %a ===DONE===%A PK.h]lx tests/retryable-writes-002.phptnu[--TEST-- Retryable writes: supported multi-statement operations include transaction IDs --SKIPIF-- --FILE-- getCommand(); $hasTransactionId = isset($command->lsid) && isset($command->txnNumber); printf("%s command includes transaction ID: %s\n", $event->getCommandName(), $hasTransactionId ? 'yes' : 'no'); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $observer = new TransactionIdObserver; MongoDB\Driver\Monitoring\addSubscriber($observer); $manager = create_test_manager(); echo "Testing multi-statement bulk write (ordered=true)\n"; $bulk = new MongoDB\Driver\BulkWrite(['ordered' => true]); $bulk->delete(['x' => 1], ['limit' => 1]); $bulk->insert(['x' => 1]); $bulk->update(['x' => 1], ['$inc' => ['x' => 1]]); $bulk->update(['x' => 1], ['x' => 2]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting multi-statement bulk write (ordered=false)\n"; $bulk = new MongoDB\Driver\BulkWrite(['ordered' => false]); $bulk->delete(['x' => 1], ['limit' => 1]); $bulk->insert(['x' => 1]); $bulk->update(['x' => 1], ['$inc' => ['x' => 1]]); $bulk->update(['x' => 1], ['x' => 2]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting insertMany (ordered=true)\n"; $bulk = new MongoDB\Driver\BulkWrite(['ordered' => true]); $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting insertMany (ordered=false)\n"; $bulk = new MongoDB\Driver\BulkWrite(['ordered' => false]); $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $manager->executeBulkWrite(NS, $bulk); MongoDB\Driver\Monitoring\removeSubscriber($observer); ?> ===DONE=== --EXPECT-- Testing multi-statement bulk write (ordered=true) delete command includes transaction ID: yes insert command includes transaction ID: yes update command includes transaction ID: yes Testing multi-statement bulk write (ordered=false) delete command includes transaction ID: yes insert command includes transaction ID: yes update command includes transaction ID: yes Testing insertMany (ordered=true) insert command includes transaction ID: yes Testing insertMany (ordered=false) insert command includes transaction ID: yes ===DONE=== PK.h] JJtests/bug0655.phptnu[--TEST-- PHPC-655: Use case insensitive parsing for Manager connectTimeoutMS array option --FILE-- 1]); // Invalid host cannot be resolved $manager = create_test_manager('mongodb://example.invalid:27017', ['connectTimeoutMS' => 1]); echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command); }, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n"; // Valid host refuses connection $manager = create_test_manager('mongodb://localhost:54321', ['CONNECTTIMEOUTMS' => 1]); echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command); }, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s ===DONE=== PK.h]_Q  !tests/decimal128-1-valid-053.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - -inF --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000000f800 {"d":{"$numberDecimal":"-Infinity"}} 18000000136400000000000000000000000000000000f800 18000000136400000000000000000000000000000000f800 ===DONE===PK.h]btests/top-parseError-011.phptnu[--TEST-- Top-level document validity: Bad $numberLong (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]k "tests/server-executeQuery-013.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() read concern inheritance --SKIPIF-- --FILE-- 'local']); $server = $manager->selectServer(new MongoDB\Driver\ReadPreference('primary')); (new CommandObserver)->observe( function() use ($server) { $server->executeQuery(NS, new MongoDB\Driver\Query([])); $server->executeQuery(NS, new MongoDB\Driver\Query([], [ 'readConcern' => new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE), ])); }, function(stdClass $command) { echo json_encode($command->readConcern), "\n"; } ); ?> ===DONE=== --EXPECT-- {"level":"local"} {"level":"available"} ===DONE=== PK.h]|&tests/decimal128-7-parseError-071.phptnu[--TEST-- Decimal128: [basx509] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]͖h!tests/decimal128-3-valid-069.phptnu[--TEST-- Decimal128: [basx639] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000004e3000 {"d":{"$numberDecimal":"0E+7"}} 1800000013640000000000000000000000000000004e3000 1800000013640000000000000000000000000000004e3000 ===DONE===PK.h]z&tests/decimal128-7-parseError-033.phptnu[--TEST-- Decimal128: [basx545] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]!A<99!tests/decimal128-5-valid-052.phptnu[--TEST-- Decimal128: [decq635] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000c16ff2862300000000000000fe5f00 {"d":{"$numberDecimal":"1.0000000000000000E+6127"}} 180000001364000000c16ff2862300000000000000fe5f00 180000001364000000c16ff2862300000000000000fe5f00 ===DONE===PK.h]#. JJ!tests/decimal128-2-valid-078.phptnu[--TEST-- Decimal128: [decq662] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400e803000000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.000E+6114"}} 18000000136400e803000000000000000000000000fe5f00 ===DONE===PK.h] g.FF(tests/bson-binary-serialization-002.phptnu[--TEST-- MongoDB\BSON\Binary serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(6) "foobar" ["type"]=> int(0) } string(70) "O:19:"MongoDB\BSON\Binary":2:{s:4:"data";s:6:"foobar";s:4:"type";i:0;}" object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(6) "foobar" ["type"]=> int(0) } object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(0) "" ["type"]=> int(0) } string(64) "O:19:"MongoDB\BSON\Binary":2:{s:4:"data";s:0:"";s:4:"type";i:0;}" object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(0) "" ["type"]=> int(0) } object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(4) "%sfoo" ["type"]=> int(0) } string(68) "O:19:"MongoDB\BSON\Binary":2:{s:4:"data";s:4:"%sfoo";s:4:"type";i:0;}" object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(4) "%sfoo" ["type"]=> int(0) } object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%s" ["type"]=> int(4) } string(81) "O:19:"MongoDB\BSON\Binary":2:{s:4:"data";s:16:"%s";s:4:"type";i:4;}" object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%s" ["type"]=> int(4) } object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%s" ["type"]=> int(5) } string(81) "O:19:"MongoDB\BSON\Binary":2:{s:4:"data";s:16:"%s";s:4:"type";i:5;}" object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%s" ["type"]=> int(5) } ===DONE=== PK.h]%hptests/int32-valid-003.phptnu[--TEST-- Int32 type: -1 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 0c000000106900ffffffff00 {"i":{"$numberInt":"-1"}} {"i":-1} 0c000000106900ffffffff00 {"i":-1} ===DONE===PK.h]Stests/bson-decimal128-001.phptnu[--TEST-- MongoDB\BSON\Decimal128 --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- 1234.5678 -1234.5678 1.234E+8 1.234E+8 1.23456E-75 -234.567 2.345E+9 0.002345 1234.5678 -1234.5678 -234.567 123400000 1.23456E-75 ===DONE=== PK.h]c׳i)i)tests/bson-toPHP-003.phptnu[--TEST-- MongoDB\BSON\toPHP(): Tests from serialization specification --FILE-- $value) { $this->$key = $value; } $this->unserialized = true; } } class OurClass implements MongoDB\BSON\Persistable { function bsonSerialize() { // Not tested with this test, so return empty array return array(); } function bsonUnserialize(array $data) { foreach ($data as $key => $value) { $this->$key = $value; } $this->unserialized = true; } } class TheirClass extends OurClass { } // Create base64-encoded class names for __pclass field's binary data $bMyClass = base64_encode('MyClass'); $bYourClass = base64_encode('YourClass'); $bOurClass = base64_encode('OurClass'); $bTheirClass = base64_encode('TheirClass'); $bInterface = base64_encode('MongoDB\BSON\Unserializable'); $testGroups = array( array( 'name' => 'DEFAULT TYPEMAP', 'typemap' => array(), 'tests' => array( '{ "foo": "yes", "bar" : false }', '{ "foo": "no", "array" : [ 5, 6 ] }', '{ "foo": "no", "obj" : { "embedded" : 4.125 } }', '{ "foo": "yes", "__pclass": "MyClass" }', '{ "foo": "yes", "__pclass": { "$binary": "' . $bMyClass . '", "$type": "80" } }', '{ "foo": "yes", "__pclass": { "$binary": "' . $bYourClass . '", "$type": "80" } }', '{ "foo": "yes", "__pclass": { "$binary": "' . $bOurClass . '", "$type": "80" } }', '{ "foo": "yes", "__pclass": { "$binary": "' . $bYourClass . '", "$type": "44" } }', ), ), array( 'name' => 'NONEXISTING CLASS', 'typemap' => array('root' => 'MissingClass'), 'tests' => array( '{ "foo": "yes" }', ), ), array( 'name' => 'DOES NOT IMPLEMENT UNSERIALIZABLE', 'typemap' => array('root' => 'MyClass'), 'tests' => array( '{ "foo": "yes", "__pclass": { "$binary": "' . $bMyClass . '", "$type": "80" } }', ), ), array( 'name' => 'IS NOT A CONCRETE CLASS', 'typemap' => array('root' => 'MongoDB\BSON\Unserializable'), 'tests' => array( '{ "foo": "yes" }', ), ), array( 'name' => 'IS NOT A CONCRETE CLASS VIA PCLASS', 'typemap' => array('root' => 'YourClass'), 'tests' => array( '{ "foo": "yes", "__pclass" : { "$binary": "' . $bInterface . '", "$type": "80" } }', ), ), array( 'name' => 'PCLASS OVERRIDES TYPEMAP (1)', 'typemap' => array('root' => 'YourClass'), 'tests' => array( '{ "foo": "yes", "__pclass" : { "$binary": "' . $bMyClass . '", "$type": "80" } }', '{ "foo": "yes", "__pclass" : { "$binary": "' . $bOurClass . '", "$type": "80" } }', '{ "foo": "yes", "__pclass" : { "$binary": "' . $bTheirClass . '", "$type": "80" } }', '{ "foo": "yes", "__pclass" : { "$binary": "' . $bYourClass . '", "$type": "80" } }', ), ), array( 'name' => 'PCLASS OVERRIDES TYPEMAP (2)', 'typemap' => array('root' => 'OurClass'), 'tests' => array( '{ "foo": "yes", "__pclass" : { "$binary": "' . $bTheirClass . '", "$type": "80" } }', ), ), array( 'name' => 'OBJECTS AS ARRAY', 'typemap' => array('root' => 'array', 'document' => 'array'), 'tests' => array( '{ "foo": "yes", "bar" : false }', '{ "foo": "no", "array" : [ 5, 6 ] }', '{ "foo": "no", "obj" : { "embedded" : 4.125 } }', '{ "foo": "yes", "__pclass": "MyClass" }', '{ "foo": "yes", "__pclass" : { "$binary": "' . $bMyClass . '", "$type": "80" } }', '{ "foo": "yes", "__pclass" : { "$binary": "' . $bOurClass . '", "$type": "80" } }', ), ), array( 'name' => 'OBJECTS AS STDCLASS', 'typemap' => array('root' => 'object', 'document' => 'object'), 'tests' => array( '{ "foo": "yes", "__pclass" : { "$binary": "' . $bMyClass . '", "$type": "80" } }', '{ "foo": "yes", "__pclass" : { "$binary": "' . $bOurClass . '", "$type": "80" } }', ), ), ); foreach ($testGroups as $testGroup) { printf("=== %s ===\n\n", $testGroup['name']); foreach ($testGroup['tests'] as $test) { echo $test, "\n"; $bson = fromJSON($test); try { var_dump(toPHP($bson, $testGroup['typemap'])); } catch (MongoDB\Driver\Exception\Exception $e) { echo $e->getMessage(), "\n"; } echo "\n"; } echo "\n"; } ?> ===DONE=== --EXPECTF-- === DEFAULT TYPEMAP === { "foo": "yes", "bar" : false } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["bar"]=> bool(false) } { "foo": "no", "array" : [ 5, 6 ] } object(stdClass)#%d (2) { ["foo"]=> string(2) "no" ["array"]=> array(2) { [0]=> int(5) [1]=> int(6) } } { "foo": "no", "obj" : { "embedded" : 4.125 } } object(stdClass)#%d (2) { ["foo"]=> string(2) "no" ["obj"]=> object(stdClass)#%d (1) { ["embedded"]=> float(4.125) } } { "foo": "yes", "__pclass": "MyClass" } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["__pclass"]=> string(7) "MyClass" } { "foo": "yes", "__pclass": { "$binary": "TXlDbGFzcw==", "$type": "80" } } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(7) "MyClass" ["type"]=> int(128) } } { "foo": "yes", "__pclass": { "$binary": "WW91ckNsYXNz", "$type": "80" } } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(9) "YourClass" ["type"]=> int(128) } } { "foo": "yes", "__pclass": { "$binary": "T3VyQ2xhc3M=", "$type": "80" } } object(OurClass)#%d (3) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(8) "OurClass" ["type"]=> int(128) } ["unserialized"]=> bool(true) } { "foo": "yes", "__pclass": { "$binary": "WW91ckNsYXNz", "$type": "44" } } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(9) "YourClass" ["type"]=> int(68) } } === NONEXISTING CLASS === { "foo": "yes" } Class MissingClass does not exist === DOES NOT IMPLEMENT UNSERIALIZABLE === { "foo": "yes", "__pclass": { "$binary": "TXlDbGFzcw==", "$type": "80" } } Class MyClass does not implement MongoDB\BSON\Unserializable === IS NOT A CONCRETE CLASS === { "foo": "yes" } Class MongoDB\BSON\Unserializable is not instantiatable === IS NOT A CONCRETE CLASS VIA PCLASS === { "foo": "yes", "__pclass" : { "$binary": "TW9uZ29EQlxCU09OXFVuc2VyaWFsaXphYmxl", "$type": "80" } } object(YourClass)#%d (3) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(27) "MongoDB\BSON\Unserializable" ["type"]=> int(128) } ["unserialized"]=> bool(true) } === PCLASS OVERRIDES TYPEMAP (1) === { "foo": "yes", "__pclass" : { "$binary": "TXlDbGFzcw==", "$type": "80" } } object(YourClass)#%d (3) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(7) "MyClass" ["type"]=> int(128) } ["unserialized"]=> bool(true) } { "foo": "yes", "__pclass" : { "$binary": "T3VyQ2xhc3M=", "$type": "80" } } object(OurClass)#%d (3) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(8) "OurClass" ["type"]=> int(128) } ["unserialized"]=> bool(true) } { "foo": "yes", "__pclass" : { "$binary": "VGhlaXJDbGFzcw==", "$type": "80" } } object(TheirClass)#%d (3) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(10) "TheirClass" ["type"]=> int(128) } ["unserialized"]=> bool(true) } { "foo": "yes", "__pclass" : { "$binary": "WW91ckNsYXNz", "$type": "80" } } object(YourClass)#%d (3) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(9) "YourClass" ["type"]=> int(128) } ["unserialized"]=> bool(true) } === PCLASS OVERRIDES TYPEMAP (2) === { "foo": "yes", "__pclass" : { "$binary": "VGhlaXJDbGFzcw==", "$type": "80" } } object(TheirClass)#%d (3) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(10) "TheirClass" ["type"]=> int(128) } ["unserialized"]=> bool(true) } === OBJECTS AS ARRAY === { "foo": "yes", "bar" : false } array(2) { ["foo"]=> string(3) "yes" ["bar"]=> bool(false) } { "foo": "no", "array" : [ 5, 6 ] } array(2) { ["foo"]=> string(2) "no" ["array"]=> array(2) { [0]=> int(5) [1]=> int(6) } } { "foo": "no", "obj" : { "embedded" : 4.125 } } array(2) { ["foo"]=> string(2) "no" ["obj"]=> array(1) { ["embedded"]=> float(4.125) } } { "foo": "yes", "__pclass": "MyClass" } array(2) { ["foo"]=> string(3) "yes" ["__pclass"]=> string(7) "MyClass" } { "foo": "yes", "__pclass" : { "$binary": "TXlDbGFzcw==", "$type": "80" } } array(2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(7) "MyClass" ["type"]=> int(128) } } { "foo": "yes", "__pclass" : { "$binary": "T3VyQ2xhc3M=", "$type": "80" } } array(2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(8) "OurClass" ["type"]=> int(128) } } === OBJECTS AS STDCLASS === { "foo": "yes", "__pclass" : { "$binary": "TXlDbGFzcw==", "$type": "80" } } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(7) "MyClass" ["type"]=> int(128) } } { "foo": "yes", "__pclass" : { "$binary": "T3VyQ2xhc3M=", "$type": "80" } } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(8) "OurClass" ["type"]=> int(128) } } ===DONE=== PK.h]pCC,tests/manager-ctor-duplicate-option-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct() with duplicate read concern option --FILE-- 'majority', 'readconcernlevel' => 'local']); echo $manager->getReadConcern()->getLevel(), "\n"; ?> ===DONE=== --EXPECT-- local ===DONE=== PK.h]5q  +tests/writeconcernerror-getmessage-001.phptnu[--TEST-- MongoDB\Driver\WriteConcernError::getMessage() --SKIPIF-- =', '3.1'); ?> --FILE-- insert(['x' => 1]); try { /* We assume that the replica set does not have 12 nodes */ $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(12)); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteConcernError()->getMessage()); } ?> ===DONE=== --EXPECT-- string(29) "Not enough data-bearing nodes" ===DONE=== PK.h]Ǯtests/bson-decimal128-002.phptnu[--TEST-- MongoDB\BSON\Decimal128 NaN values --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- NaN NaN NaN NaN NaN NaN ===DONE=== PK.h]BB)tests/manager-selectserver_error-001.phptnu[--TEST-- MongoDB\Driver\Manager::selectServer() should not issue warning before exception --FILE-- 1]); echo throws(function() use ($manager, $rp) { $manager->selectServer($rp); }, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n"; // Valid host refuses connection $manager = create_test_manager('mongodb://localhost:54321', ['serverSelectionTimeoutMS' => 1]); echo throws(function() use ($manager, $rp) { $manager->selectServer($rp); }, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s ===DONE=== PK.h]1$tests/dbpointer-decodeError-005.phptnu[--TEST-- DBPointer type (deprecated): short OID (greater than minimum, but truncated) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]vtests/double-valid-001.phptnu[--TEST-- Double type: +1.0 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000016400000000000000f03f00 {"d":{"$numberDouble":"1"}} {"d":1} 10000000016400000000000000f03f00 {"d":1} ===DONE===PK.h]{@@tests/retryable-reads-002.phptnu[--TEST-- Retryable reads: executeQuery is retried once --SKIPIF-- --FILE-- getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(URI, ['retryReads' => true]); // Select a specific server for future operations to avoid mongos switching in sharded clusters $server = $manager->selectServer(new \MongoDB\Driver\ReadPreference('primary')); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $server->executeBulkWrite(NS, $bulk); configureTargetedFailPoint($server, 'failCommand', ['times' => 1], ['failCommands' => ['find'], 'closeConnection' => true]); $observer = new Observer; MongoDB\Driver\Monitoring\addSubscriber($observer); $cursor = $server->executeQuery(NS, new \MongoDB\Driver\Query(['x' => 1])); var_dump(iterator_count($cursor)); MongoDB\Driver\Monitoring\removeSubscriber($observer); ?> ===DONE=== --EXPECT-- Command started: find Command started: find int(1) ===DONE=== PK.h]4U^KKtests/manager-debug-001.phptnu[--TEST-- MongoDB\Driver\Manager: Writing debug log files --FILE-- ===DONE=== --EXPECTF-- %A[%s] PHONGO: DEBUG > Connection string: '%s' [%s] PHONGO: DEBUG > Creating Manager, phongo-1.%d.%d%S[%s] - mongoc-1.%s(%s), libbson-1.%s(%s), php-%s %A===DONE===%A PK.h]gX+tests/manager-ctor-read_preference-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): read preference options --FILE-- 'primary']], [null, ['readPreference' => 'secondary', 'readPreferenceTags' => [['tag' => 'one'], []]]], [null, ['readPreference' => 'secondary', 'maxStalenessSeconds' => 1000]], ]; foreach ($tests as $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getReadPreference()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(2) { [0]=> object(stdClass)#%d (%d) { ["tag"]=> string(3) "one" } [1]=> object(stdClass)#%d (%d) { } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1000) } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(2) { [0]=> object(stdClass)#%d (%d) { ["tag"]=> string(3) "one" } [1]=> object(stdClass)#%d (%d) { } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1000) } ===DONE=== PK.h]RW/tests/bulkwriteexception-haserrorlabel-002.phptnu[--TEST-- MongoDB\Driver\Exception\BulkWriteException::hasErrorLabel() with writeConcernError --SKIPIF-- --FILE-- false]); // Select a specific server for future operations to avoid mongos switching in sharded clusters $server = $manager->selectServer(new \MongoDB\Driver\ReadPreference('primary')); configureTargetedFailPoint($server, 'failCommand', [ 'times' => 1 ], [ 'failCommands' => ['insert'], 'writeConcernError' => [ 'code' => 91, 'errmsg' => 'Replication is being shut down', 'errorLabels' => ['RetryableWriteError'], ], ]); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); try { $server->executeBulkWrite(NS, $bulk); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->hasErrorLabel('RetryableWriteError')); } ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]Yfz55!tests/decimal128-2-valid-093.phptnu[--TEST-- Decimal128: [decq443] exponent lengths --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000523000 {"d":{"$numberDecimal":"7E+9"}} 180000001364000700000000000000000000000000523000 ===DONE===PK.h]oII!tests/decimal128-2-valid-127.phptnu[--TEST-- Decimal128: [decq741] DPD: one of each of the huffman groups --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a03000000000000000000000000403000 {"d":{"$numberDecimal":"778"}} 180000001364000a03000000000000000000000000403000 ===DONE===PK.h]&tests/decimal128-4-parseError-011.phptnu[--TEST-- Decimal128: [dqbsr535] negatives (Rounded & Inexact) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]q i!tests/decimal128-1-valid-016.phptnu[--TEST-- Decimal128: Regular - 0.1234567890123456789012345678901234 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f2af967ed05c82de3297ff6fde3cfc2f00 {"d":{"$numberDecimal":"0.1234567890123456789012345678901234"}} 18000000136400f2af967ed05c82de3297ff6fde3cfc2f00 ===DONE===PK.h][{ww!tests/commandFailedEvent-002.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandFailedEvent: requestId and operationId match --SKIPIF-- --FILE-- getCommandName(), "\n"; $this->startRequestId = $event->getRequestId(); $this->startOperationId = $event->getOperationId(); } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { echo "failed: ", $event->getCommandName(), "\n"; echo "- requestId matches: ", $this->startRequestId == $event->getRequestId() ? 'yes' : 'no', " \n"; echo "- operationId matches: ", $this->startOperationId == $event->getOperationId() ? 'yes' : 'no', " \n"; } } $query = new MongoDB\Driver\Query( [] ); $subscriber = new MySubscriber; MongoDB\Driver\Monitoring\addSubscriber( $subscriber ); $primary = get_primary_server(URI); $command = new \MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$unsupported' => 1]] ]); try { $primary->executeCommand(DATABASE_NAME, $command); } catch (Exception $e) { /* Swallow */ } ?> --EXPECT-- started: aggregate failed: aggregate - requestId matches: yes - operationId matches: yes PK.h]ՠd   tests/standalone-plain-0002.phptnu[--TEST-- Connect to MongoDB with using PLAIN auth mechanism #002 --XFAIL-- authMechanism=PLAIN (LDAP) tests must be reimplemented (PHPC-1172) parse_url() tests must be reimplemented (PHPC-1177) --SKIPIF-- --FILE-- "bugs", "roles" => array(array("role" => "readWrite", "db" => DATABASE_NAME)), ); $command = new MongoDB\Driver\Command($cmd); try { $result = $adminmanager->executeCommand('$external', $command); echo "User Created\n"; } catch(Exception $e) { echo $e->getMessage(), "\n"; } $username = "bugs"; $password = "wrong-password"; $database = '$external'; $dsn = sprintf("mongodb://%s:%s@%s:%d/?authSource=%s&authMechanism=PLAIN", $username, $password, $parsed["host"], $parsed["port"], $database); $manager = create_test_manager($dsn); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array("very" => "important")); throws(function() use($manager, $bulk) { $manager->executeBulkWrite(NS, $bulk); }, "MongoDB\Driver\Exception\AuthenticationException"); $cmd = array( "dropUser" => "bugs", ); $command = new MongoDB\Driver\Command($cmd); try { $result = $adminmanager->executeCommand('$external', $command); echo "User deleted\n"; } catch(Exception $e) { echo $e->getMessage(), "\n"; } ?> ===DONE=== --EXPECT-- User Created OK: Got MongoDB\Driver\Exception\AuthenticationException User deleted ===DONE=== PK.h]xlG tests/bug1274-005.phptnu[--TEST-- PHPC-1274: Session destruct should not end session from parent process (disableClientPersistence=true) --SKIPIF-- --FILE-- pid = getmypid(); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); $commandName = $event->getCommandName(); $process = $this->pid === getmypid() ? 'Parent' : 'Child'; if ($commandName === 'find' || $commandName === 'getMore') { printf("%s executes %s with batchSize: %d\n", $process, $commandName, $command->batchSize); return; } printf("%s executes %s\n", $process, $commandName); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(URI, [], ['disableClientPersistence' => true]); $session = $manager->startSession(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $bulk->insert(['x' => 3]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); MongoDB\Driver\Monitoring\addSubscriber(new CommandLogger); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $cursor = $manager->executeQuery(NS, $query, ['session' => $session]); $childPid = pcntl_fork(); if ($childPid === 0) { echo "Child exits\n"; exit; } function isSessionOnServer($manager, $session) { /* Note: use $listLocalSessions since sessions are only synced to the config * database's system.sessions collection every 30 minutes. Alternatively, we * could run the refreshLogicalSessionCacheNow command on the primary. */ $command = new MongoDB\Driver\Command([ 'aggregate' => 1, 'pipeline' => [ ['$listLocalSessions' => new stdClass], ['$match' => ['_id.id' => $session->getLogicalSessionId()->id]], ], 'cursor' => new stdClass, ]); $cursor = $manager->executeReadCommand(DATABASE_NAME, $command); return iterator_count($cursor) > 0; } if ($childPid > 0) { $waitPid = pcntl_waitpid($childPid, $status); if ($waitPid === $childPid) { echo "Parent waited for child to exit\n"; } printf("Session is on server: %s\n", isSessionOnServer($manager, $session) ? 'yes' : 'no'); printf("Parent fully iterated cursor for %d documents\n", iterator_count($cursor)); } ?> ===DONE=== --EXPECT-- Parent executes find with batchSize: 2 Child exits Parent waited for child to exit Parent executes aggregate Session is on server: yes Parent executes getMore with batchSize: 2 Parent fully iterated cursor for 3 documents ===DONE=== PK.h]zvv)tests/manager-executeQuery_error-003.phptnu[--TEST-- MongoDB\Driver\Manager::executeQuery() exposes error document via CommandException --SKIPIF-- --FILE-- ['$unsupportedOperator' => true]]); try { $manager->executeQuery(NS, $query); } catch (\MongoDB\Driver\Exception\CommandException $e) { printf("%s(%d): %s\n", get_class($e), $e->getCode(), $e->getMessage()); $doc = $e->getResultDocument(); var_dump($doc->errmsg === $e->getMessage()); var_dump($doc->code === $e->getCode()); } ?> ===DONE=== --EXPECT-- MongoDB\Driver\Exception\CommandException(2): unknown operator: $unsupportedOperator bool(true) bool(true) ===DONE=== PK.h]б(tests/manager-getreadpreference-001.phptnu[--TEST-- MongoDB\Driver\Manager::getReadPreference() --FILE-- 'primaryPreferred')), array('mongodb://127.0.0.1/?readPreference=secondary', array('readPreference' => 'secondaryPreferred')), array('mongodb://127.0.0.1/?readPreference=secondary&readPreferenceTags=dc:ny,use:reports&readPreferenceTags=', array()), array('mongodb://127.0.0.1/?readPreference=secondary', array('readPreferenceTags' => array(array('dc' => 'ny', 'use' => 'reports'), array()))), array('mongodb://127.0.0.1/?readPreference=secondary&readPreferenceTags=dc:ny,use:reports', array('readPreferenceTags' => array(array('dc' => 'ca')))), ); foreach ($tests as $i => $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getReadPreference()); $manager->getReadPreference(); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(2) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" ["use"]=> string(7) "reports" } [1]=> object(stdClass)#%d (%d) { } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(2) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" ["use"]=> string(7) "reports" } [1]=> object(stdClass)#%d (%d) { } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ca" } } } ===DONE=== PK.h]%HjT1tests/commandexception-getresultdocument-001.phptnu[--TEST-- MongoDB\Driver\Exception\CommandException::getResultDocument() --FILE-- 1]; $reflection = new ReflectionClass($exception); $resultDocumentProperty = $reflection->getProperty('resultDocument'); $resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $resultDocument); var_dump($resultDocument === $exception->getResultDocument()); ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]ZN;&tests/decimal128-7-parseError-016.phptnu[--TEST-- Decimal128: [basx501] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]%-tests/session-startTransaction_error-006.phptnu[--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=== PK.h]:^q&tests/decimal128-7-parseError-039.phptnu[--TEST-- Decimal128: [basx526] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h];남..-tests/runtimeexception-haserrorlabel-001.phptnu[--TEST-- MongoDB\Driver\Exception\RuntimeException::hasErrorLabel() --FILE-- getProperty('errorLabels'); $resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('foo')); var_dump($exception->hasErrorLabel('bar')); ?> ===DONE=== --EXPECT-- bool(true) bool(false) ===DONE=== PK.h]@!33!tests/decimal128-2-valid-112.phptnu[--TEST-- Decimal128: [decq714] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004600000000000000000000000000403000 {"d":{"$numberDecimal":"70"}} 180000001364004600000000000000000000000000403000 ===DONE===PK.h]/tests/bson-utcdatetime-set_state_error-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime::__set_state() requires "milliseconds" integer or numeric string field --FILE-- 1.0]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\UTCDateTime initialization requires "milliseconds" integer or numeric string field ===DONE=== PK.h]mJ__!tests/decimal128-3-valid-072.phptnu[--TEST-- Decimal128: [basx018] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003eb000 {"d":{"$numberDecimal":"-0.0"}} 1800000013640000000000000000000000000000003eb000 ===DONE===PK.h]Mc[$tests/bson-maxkey-set_state-001.phptnu[--TEST-- MongoDB\BSON\MaxKey::__set_state() --FILE-- ===DONE=== --EXPECT-- MongoDB\BSON\MaxKey::__set_state(array( )) ===DONE=== PK.h]l3&tests/decimal128-7-parseError-047.phptnu[--TEST-- Decimal128: [basx552] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]wR!tests/symbol-decodeError-004.phptnu[--TEST-- Symbol: bad symbol length: longer than rest of document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]892,tests/bson-javascript-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\Javascript::jsonSerialize() return value (with scope) --FILE-- 42]); var_dump($js->jsonSerialize()); ?> ===DONE=== --EXPECTF-- array(2) { ["$code"]=> string(33) "function foo(bar) { return bar; }" ["$scope"]=> object(stdClass)#%d (%d) { ["foo"]=> int(42) } } ===DONE=== PK.h]X&tests/decimal128-7-parseError-061.phptnu[--TEST-- Decimal128: [basx529] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]I]2VVtests/bson-objectid-003.phptnu[--TEST-- MongoDB\BSON\ObjectId #003 construction with string argument --FILE-- value = (string) $value; } public function __toString() { return $this->value; } } $oid = new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4603'); $str = new StringObject('53e2a1c40640fd72175d4603'); var_dump($oid); var_dump(new MongoDB\BSON\ObjectId($oid)); var_dump(new MongoDB\BSON\ObjectId($str)); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } ===DONE=== PK.h]0tests/bug0155.phptnu[--TEST-- PHPC-155: WriteConcernError->getInfo() can be scalar --SKIPIF-- --FILE-- insert(array('example' => 'document')); try { $manager->executeBulkWrite(NS, $bulk, $wc); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteConcernError()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcernError)#%d (%d) { ["message"]=> string(%d) "%s" ["code"]=> int(79) ["info"]=> %a } ===DONE=== PK.h]oԭBtests/bson-toPHP_error-003.phptnu[--TEST-- MongoDB\BSON\toPHP(): BSON decoding exceptions for malformed documents --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader ===DONE=== PK.h]?炤4tests/manager-ctor-disableClientPersistence-007.phptnu[--TEST-- MongoDB\Driver\Manager with disableClientPersistence=true referenced by ClientEncryption (explicit keyVaultClient) --SKIPIF-- --FILE-- true]); $keyVaultClient = create_test_manager(null, [], ['disableClientPersistence' => true]); ini_set('mongodb.debug', ''); echo "Creating clientEncryption\n"; $clientEncryption = $manager->createClientEncryption([ 'keyVaultClient' => $keyVaultClient, 'keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary(str_repeat('0', 96), 0)]], ]); echo "Unsetting manager\n"; ini_set('mongodb.debug', 'stderr'); unset($manager); ini_set('mongodb.debug', ''); echo "Unsetting keyVaultClient\n"; ini_set('mongodb.debug', 'stderr'); unset($keyVaultClient); ini_set('mongodb.debug', ''); echo "Unsetting clientEncryption\n"; ini_set('mongodb.debug', 'stderr'); unset($clientEncryption); ini_set('mongodb.debug', ''); ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client Creating clientEncryption Unsetting manager [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A Unsetting keyVaultClient Unsetting clientEncryption%A [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A ===DONE=== PK.h]TT1tests/bson-timestamp-serialization_error-006.phptnu[--TEST-- MongoDB\BSON\Timestamp unserialization requires positive unsigned 32-bit integers (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, -2147483648 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, -2147483648 given ===DONE=== PK.h]jLpJJ"tests/server-executeQuery-003.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() with modifiers and empty filter --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query(array()))->getServer(); // load fixtures for test $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 1, 'x' => 2, 'y' => 3)); $bulk->insert(array('_id' => 2, 'x' => 3, 'y' => 4)); $bulk->insert(array('_id' => 3, 'x' => 4, 'y' => 5)); $server->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query(array(), array('modifiers' => array('$comment' => 'foo'))); $cursor = $server->executeQuery(NS, $query); var_dump($cursor instanceof MongoDB\Driver\Cursor); var_dump($server == $cursor->getServer()); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- bool(true) bool(true) array(3) { [0]=> object(stdClass)#%d (3) { ["_id"]=> int(1) ["x"]=> int(2) ["y"]=> int(3) } [1]=> object(stdClass)#%d (3) { ["_id"]=> int(2) ["x"]=> int(3) ["y"]=> int(4) } [2]=> object(stdClass)#%d (3) { ["_id"]=> int(3) ["x"]=> int(4) ["y"]=> int(5) } } ===DONE=== PK.h]t=)  *tests/monitoring-removeSubscriber-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\removeSubscriber(): Removing the only subscriber --SKIPIF-- --FILE-- getCommandName(), "\n"; } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $query = new MongoDB\Driver\Query( [] ); $subscriber = new MySubscriber; echo "Before addSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber ); echo "After addSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\removeSubscriber( $subscriber ); echo "After removeSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); ?> --EXPECT-- Before addSubscriber After addSubscriber - started: find After removeSubscriber PK.h]'Yii,tests/transaction-integration_error-003.phptnu[--TEST-- MongoDB\Driver\Session: Setting per-op writeConcern in transaction (executeWriteCommand) --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); /* Do the transaction */ $session = $manager->startSession(); $session->startTransaction( [ 'readConcern' => new \MongoDB\Driver\ReadConcern( "snapshot" ), 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); echo throws(function() use ($manager, $session) { $cmd = new \MongoDB\Driver\Command( [ 'update' => COLLECTION_NAME, 'updates' => [ [ 'q' => [ 'employee' => 3 ], 'u' => [ '$set' => [ 'status' => 'Inactive' ] ] ] ] ] ); $manager->executeWriteCommand( DATABASE_NAME, $cmd, [ 'session' => $session, 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot set write concern after starting transaction ===DONE=== PK.h] 1tests/manager-ctor-006.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): Unparsable environmental URI --ENV-- MONGODB_URI=invalid --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'invalid'. Invalid URI Schema, expecting 'mongodb://' or 'mongodb+srv://'. ===DONE=== PK.h]!tests/decimal128-1-valid-009.phptnu[--TEST-- Decimal128: Special - Invalid representation treated as 0 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000106c00 {"d":{"$numberDecimal":"0"}} ===DONE===PK.h])d  (tests/session-commitTransaction-001.phptnu[--TEST-- MongoDB\Driver\Session::commitTransaction() applies w:majority when retrying --SKIPIF-- --FILE-- manager = create_test_manager(); $this->manager->executeCommand( DATABASE_NAME, new MongoDB\Driver\Command(['create' => COLLECTION_NAME]), ['writeConcern' => new MongoDB\Driver\WriteConcern(MongoDB\Driver\WriteConcern::MAJORITY)] ); } public function run(array $startTransactionOptions) { $session = $this->manager->startSession(); $session->startTransaction($startTransactionOptions); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $this->manager->executeBulkWrite(NS, $bulk, ['session' => $session]); MongoDB\Driver\Monitoring\addSubscriber($this); $session->commitTransaction(); $session->commitTransaction(); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { if ($event->getCommandName() !== 'commitTransaction') { return; } printf("commitTransaction included write concern: %s\n", json_encode($event->getCommand()->writeConcern)); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $test = new Test; echo "Applies w:majority and default wtimeout when retrying commitTransaction\n"; $test->run(['writeConcern' => new MongoDB\Driver\WriteConcern(1)]); echo "\nPreserves other WC options when retrying commitTransaction\n"; $test->run(['writeConcern' => new MongoDB\Driver\WriteConcern(1, 5000)]); ?> ===DONE=== --EXPECT-- Applies w:majority and default wtimeout when retrying commitTransaction commitTransaction included write concern: {"w":1} commitTransaction included write concern: {"w":"majority","wtimeout":10000} Preserves other WC options when retrying commitTransaction commitTransaction included write concern: {"w":1,"wtimeout":5000} commitTransaction included write concern: {"w":"majority","wtimeout":5000} ===DONE=== PK.h]aV[[!tests/decimal128-5-valid-035.phptnu[--TEST-- Decimal128: [decq601] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000a5bc138938d44c64d31fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000000000000000E+6144"}} 18000000136400000000000a5bc138938d44c64d31fe5f00 18000000136400000000000a5bc138938d44c64d31fe5f00 ===DONE===PK.h]@**!tests/decimal128-3-valid-114.phptnu[--TEST-- Decimal128: [basx654] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000483000 {"d":{"$numberDecimal":"0E+4"}} 180000001364000000000000000000000000000000483000 ===DONE===PK.h]C=tests/bug0924-001.phptnu[--TEST-- PHPC-924: Cursor::setTypeMap() may unnecessarily convert first BSON document (type map) --SKIPIF-- --FILE-- data['_id'] = $id; } public function bsonSerialize() { return (object) $this->data; } public function bsonUnserialize(array $data) { printf("%s called for ID: %s\n", __METHOD__, $data['_id']); $this->data = $data; } } $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(new MyDocument('a')); $bulk->insert(new MyDocument('b')); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); $cursor->setTypeMap(['root' => 'MyDocument']); foreach ($cursor as $i => $document) { var_dump($document); } ?> ===DONE=== --EXPECTF-- MyDocument::bsonUnserialize called for ID: a object(MyDocument)#%d (%d) { ["data":"MyDocument":private]=> array(1) { ["_id"]=> string(1) "a" } } MyDocument::bsonUnserialize called for ID: b object(MyDocument)#%d (%d) { ["data":"MyDocument":private]=> array(1) { ["_id"]=> string(1) "b" } } ===DONE=== PK.h]tests/top-decodeError-015.phptnu[--TEST-- Top-level document validity: Null byte in document key --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]v44tests/bug0572.phptnu[--TEST-- PHPC-572: Ensure stream context does not go out of scope before socket init --SKIPIF-- --FILE-- [ 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true, ], ]); return create_test_manager(URI, [], ['context' => $context]); }; $manager = $closure(); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); printf("ping: %d\n", $cursor->toArray()[0]->ok); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_self_signed" context driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead.%s ping: 1 ===DONE=== PK.h]L&tests/decimal128-7-parseError-002.phptnu[--TEST-- Decimal128: [basx516] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]dd!tests/decimal128-3-valid-303.phptnu[--TEST-- Decimal128: [basx058] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006af90b7c50000000000000000000343000 {"d":{"$numberDecimal":"345678.543210"}} 180000001364006af90b7c50000000000000000000343000 ===DONE===PK.h]:` tests/bson-binary_error-004.phptnu[--TEST-- MongoDB\BSON\Binary constructor requires 16-byte data length for UUID types --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 15 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 17 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 15 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 17 given ===DONE=== PK.h]rDootests/bulkwrite-insert-001.phptnu[--TEST-- MongoDB\Driver\BulkWrite::insert() should always encode __pclass for Persistable objects --SKIPIF-- --FILE-- id = $id; $this->child = $child; } public function bsonSerialize() { return [ '_id' => $this->id, 'child' => $this->child, ]; } public function bsonUnserialize(array $data) { $this->id = $data['_id']; $this->child = $data['child']; } } $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(new MyClass('foo', new MyClass('bar', new MyClass('baz')))); $result = $manager->executeBulkWrite(NS, $bulk); printf("Inserted %d document(s)\n", $result->getInsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- Inserted 1 document(s) array(1) { [0]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "foo" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "bar" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "baz" ["child":"MyClass":private]=> NULL } } } } ===DONE=== PK.h]-tests/bson-utcdatetime-serialization-004.phptnu[--TEST-- MongoDB\BSON\UTCDateTime serialization (unserialize 32-bit data on 64-bit) (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- string(64) "O:24:"MongoDB\BSON\UTCDateTime":1:{s:12:"milliseconds";s:1:"0";}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(1) "0" } string(78) "O:24:"MongoDB\BSON\UTCDateTime":1:{s:12:"milliseconds";s:14:"-1416445411987";}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(14) "-1416445411987" } string(77) "O:24:"MongoDB\BSON\UTCDateTime":1:{s:12:"milliseconds";s:13:"1416445411987";}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1416445411987" } ===DONE=== PK.h]zz!tests/decimal128-2-valid-094.phptnu[--TEST-- Decimal128: [decq842] VG testcase --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000fed83f4e7c9fe4e269e38a5bcd1700 {"d":{"$numberDecimal":"7.049000000000010795488000000000000E-3097"}} 180000001364000000fed83f4e7c9fe4e269e38a5bcd1700 ===DONE===PK.h] ==tests/cursor-getmore-005.phptnu[--TEST-- MongoDB\Driver\Cursor query result iteration with getmore failure --SKIPIF-- =", "3.6"); ?> --FILE-- insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $cursor = $manager->executeQuery(NS, $query); failGetMore($manager); throws(function() use ($cursor) { foreach ($cursor as $i => $document) { printf("%d => {_id: %d}\n", $i, $document->_id); } }, "MongoDB\Driver\Exception\ConnectionException"); ?> ===DONE=== --CLEAN-- --EXPECT-- Inserted: 5 0 => {_id: 0} 1 => {_id: 1} OK: Got MongoDB\Driver\Exception\ConnectionException ===DONE=== PK.h][[!tests/decimal128-3-valid-102.phptnu[--TEST-- Decimal128: [basx017] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000040b000 {"d":{"$numberDecimal":"-0"}} 18000000136400000000000000000000000000000040b000 ===DONE===PK.h]Gttests/bug0732-001.phptnu[--TEST-- PHPC-732: Possible mongoc_client_t use-after-free with Cursor wrapped in generator --SKIPIF-- --FILE-- $value) { yield $key => $value; } } $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['batchSize' => 2])); $generator = wrapCursor($cursor); foreach ($generator as $value) { echo "Exiting during first iteration on generator\n"; exit(0); } ?> ===DONE=== --EXPECT-- Exiting during first iteration on generator PK.h]t!tests/string-decodeError-006.phptnu[--TEST-- String: empty string, but extra null --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]t)tests/writeresult-getupsertedids-001.phptnu[--TEST-- MongoDB\Driver\WriteResult::getUpsertedIds() with server-generated values --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk); var_dump($result->getUpsertedIds()); ?> ===DONE=== --EXPECTF-- array(2) { [2]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } [3]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } } ===DONE=== PK.h]52tests/bson-javascript-serialization_error-003.phptnu[--TEST-- MongoDB\BSON\Javascript unserialization does not allow code to contain null bytes (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Code cannot contain null bytes ===DONE=== PK.h]U GG&tests/serverApi-bsonserialize-002.phptnu[--TEST-- MongoDB\Driver\ServerApi::bsonSerialize() returns an object --FILE-- bsonSerialize()); } ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["version"]=> string(1) "1" } object(stdClass)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> bool(true) } object(stdClass)#%d (%d) { ["version"]=> string(1) "1" ["deprecationErrors"]=> bool(true) } object(stdClass)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> bool(false) ["deprecationErrors"]=> bool(false) } ===DONE=== PK.h]tests/top-parseError-015.phptnu[--TEST-- Top-level document validity: Bad $numberDecimal (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]}!tests/decimal128-2-valid-020.phptnu[--TEST-- Decimal128: [decq176] Nmin and below --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400010000000a5bc138938d44c64d31008000 {"d":{"$numberDecimal":"-1.000000000000000000000000000000001E-6143"}} 18000000136400010000000a5bc138938d44c64d31008000 ===DONE===PK.h]/iY!tests/decimal128-3-valid-065.phptnu[--TEST-- Decimal128: [basx677] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000002e3000 {"d":{"$numberDecimal":"0E-9"}} 1800000013640000000000000000000000000000002e3000 1800000013640000000000000000000000000000002e3000 ===DONE===PK.h]h@tests/bug1152-001.phptnu[--TEST-- PHPC-1152: Command cursors should use the same session for getMore and killCursors (implicit) --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$match' => new stdClass]], 'cursor' => ['batchSize' => 2], ]); MongoDB\Driver\Monitoring\addSubscriber($this); /* By creating two cursors with the same name, PHP's reference counting * will destroy the first after the second is created. Note that * mongoc_cursor_destroy also destroys implicit sessions and returns * them to the LIFO pool. This sequencing allows us to test that getMore * and killCursors use the session ID corresponding to the original * aggregate command. */ $cursor = $manager->executeCommand(DATABASE_NAME, $command); $cursor->toArray(); $cursor = $manager->executeCommand(DATABASE_NAME, $command); $cursor->toArray(); $cursor = $manager->executeCommand(DATABASE_NAME, $command); $cursor = $manager->executeCommand(DATABASE_NAME, $command); unset($cursor); MongoDB\Driver\Monitoring\removeSubscriber($this); /* We should expect two unique session IDs over the course of the test, * since at most two implicit sessions would have been in use at any * given time. */ printf("Unique session IDs used: %d\n", count(array_unique($this->lsidByRequestId))); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $requestId = $event->getRequestId(); $sessionId = bin2hex((string) $event->getCommand()->lsid->id); printf("%s session ID: %s\n", $event->getCommandName(), $sessionId); if ($event->getCommandName() === 'aggregate') { if (isset($this->lsidByRequestId[$requestId])) { throw new UnexpectedValueException('Previous command observed for request ID: ' . $requestId); } $this->lsidByRequestId[$requestId] = $sessionId; } if ($event->getCommandName() === 'getMore') { $cursorId = (string) $event->getCommand()->getMore; if ( ! isset($this->lsidByCursorId[$cursorId])) { throw new UnexpectedValueException('No previous command observed for cursor ID: ' . $cursorId); } printf("getMore used same session as aggregate: %s\n", $sessionId === $this->lsidByCursorId[$cursorId] ? 'yes' : 'no'); } if ($event->getCommandName() === 'killCursors') { $cursorId = (string) $event->getCommand()->cursors[0]; if ( ! isset($this->lsidByCursorId[$cursorId])) { throw new UnexpectedValueException('No previous command observed for cursor ID: ' . $cursorId); } printf("killCursors used same session as aggregate: %s\n", $sessionId === $this->lsidByCursorId[$cursorId] ? 'yes' : 'no'); } } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { /* Associate the aggregate's session ID with its cursor ID so it can be * looked up by the subsequent getMore or killCursors */ if ($event->getCommandName() === 'aggregate') { $cursorId = (string) $event->getReply()->cursor->id; $requestId = $event->getRequestId(); $this->lsidByCursorId[$cursorId] = $this->lsidByRequestId[$requestId]; } } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } (new Test)->executeCommand(); ?> ===DONE=== --EXPECTF-- aggregate session ID: %x getMore session ID: %x getMore used same session as aggregate: yes aggregate session ID: %x getMore session ID: %x getMore used same session as aggregate: yes aggregate session ID: %x aggregate session ID: %x killCursors session ID: %x killCursors used same session as aggregate: yes killCursors session ID: %x killCursors used same session as aggregate: yes Unique session IDs used: 2 ===DONE=== PK.h]ɀ(tests/bson-minkey-serialization-002.phptnu[--TEST-- MongoDB\BSON\MinKey serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\MinKey)#%d (%d) { } string(31) "O:19:"MongoDB\BSON\MinKey":0:{}" object(MongoDB\BSON\MinKey)#%d (%d) { } ===DONE=== PK.h]+X!tests/decimal128-3-valid-084.phptnu[--TEST-- Decimal128: [basx643] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000443000 {"d":{"$numberDecimal":"0E+2"}} 180000001364000000000000000000000000000000443000 180000001364000000000000000000000000000000443000 ===DONE===PK.h]ZS  !tests/decimal128-1-valid-020.phptnu[--TEST-- Decimal128: Regular - 2 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000200000000000000000000000000403000 {"d":{"$numberDecimal":"2"}} 180000001364000200000000000000000000000000403000 ===DONE===PK.h]Nkll tests/bson-maxkey-clone-001.phptnu[--TEST-- MongoDB\BSON\MaxKey can be cloned --FILE-- foo = 'bar'; $clone = clone $maxKey; var_dump($clone == $maxKey); var_dump($clone === $maxKey); var_dump($clone->foo); ?> ===DONE=== --EXPECT-- bool(true) bool(false) string(3) "bar" ===DONE=== PK.h]y͝s s tests/bson-decode-002.phptnu[--TEST-- BSON encoding: Encoding object/arrays data into user specificied classes --FILE-- "world")), array((object)array("hello" => "world")), array("my" => array("hello" => "world")), array("my" => (object)array("hello" => "world")), array("my" => array(array("hello", "world"))), array("my" => (object)array(array("hello", "world"))), ); foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", toJSON($s), "\n"; $val = toPHP($s, array("root"=> "MyArrayObject", "document"=> "MyArrayObject", "array" => "MyArrayObject")); var_dump($val); } ?> ===DONE=== --EXPECTF-- Test#%d { "0" : { "hello" : "world" } } object(MyArrayObject)#%d (1) { [%s]=> array(1) { [0]=> object(MyArrayObject)#%d (1) { [%s]=> array(1) { ["hello"]=> string(5) "world" } } } } Test#%d { "0" : { "hello" : "world" } } object(MyArrayObject)#%d (1) { [%s]=> array(1) { [0]=> object(MyArrayObject)#%d (1) { [%s]=> array(1) { ["hello"]=> string(5) "world" } } } } Test#%d { "my" : { "hello" : "world" } } object(MyArrayObject)#%d (1) { [%s]=> array(1) { ["my"]=> object(MyArrayObject)#%d (1) { [%s]=> array(1) { ["hello"]=> string(5) "world" } } } } Test#%d { "my" : { "hello" : "world" } } object(MyArrayObject)#%d (1) { [%s]=> array(1) { ["my"]=> object(MyArrayObject)#%d (1) { [%s]=> array(1) { ["hello"]=> string(5) "world" } } } } Test#%d { "my" : [ [ "hello", "world" ] ] } object(MyArrayObject)#%d (1) { [%s]=> array(1) { ["my"]=> object(MyArrayObject)#%d (1) { [%s]=> array(1) { [0]=> object(MyArrayObject)#%d (1) { [%s]=> array(2) { [0]=> string(5) "hello" [1]=> string(5) "world" } } } } } } Test#%d { "my" : { "0" : [ "hello", "world" ] } } object(MyArrayObject)#%d (1) { [%s]=> array(1) { ["my"]=> object(MyArrayObject)#%d (1) { [%s]=> array(1) { [0]=> object(MyArrayObject)#%d (1) { [%s]=> array(2) { [0]=> string(5) "hello" [1]=> string(5) "world" } } } } } } ===DONE=== PK.h]E//'tests/writeconcern-getwtimeout-002.phptnu[--TEST-- MongoDB\Driver\WriteConcern::getWtimeout() emits warning on truncation of 64-bit value --SKIPIF-- --FILE-- getWriteConcern()->getWtimeout()); }, E_WARNING), "\n"; ?> ===DONE=== --EXPECT-- OK: Got E_WARNING Truncating 64-bit value for wTimeoutMS ===DONE=== PK.h]Fg  !tests/decimal128-3-valid-234.phptnu[--TEST-- Decimal128: [basx309] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000503000 {"d":{"$numberDecimal":"1.0E+9"}} 180000001364000a00000000000000000000000000503000 180000001364000a00000000000000000000000000503000 ===DONE===PK.h] ;$tests/bson-javascript_error-002.phptnu[--TEST-- MongoDB\BSON\Javascript cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyJavascript %s final class %SMongoDB\BSON\Javascript%S in %s on line %d PK.h]Y ; ;%tests/manager-ctor-tls-error-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): Test invalid URI option combinations --FILE-- $valueB ] ); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; } } echo "\n"; } ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=false&tlsAllowInvalidHostnames=false'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=false&tlsAllowInvalidHostnames=true'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=true&tlsAllowInvalidHostnames=false'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=true&tlsAllowInvalidHostnames=true'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=false&tlsAllowInvalidCertificates=false'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=false&tlsAllowInvalidCertificates=true'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=true&tlsAllowInvalidCertificates=false'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=true&tlsAllowInvalidCertificates=true'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=false&tlsDisableOCSPEndpointCheck=false'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=false&tlsDisableOCSPEndpointCheck=true'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=true&tlsDisableOCSPEndpointCheck=false'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=true&tlsDisableOCSPEndpointCheck=true'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=false&tlsDisableCertificateRevocationCheck=false'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=false&tlsDisableCertificateRevocationCheck=true'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=true&tlsDisableCertificateRevocationCheck=false'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsInsecure=true&tlsDisableCertificateRevocationCheck=true'. tlsinsecure may not be specified with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsinsecure may not be combined with tlsallowinvalidcertificates, tlsallowinvalidhostnames, tlsdisableocspendpointcheck, or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsAllowInvalidCertificates=false&tlsDisableOCSPEndpointCheck=false'. tlsallowinvalidcertificates may not be specified with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsallowinvalidcertificates may not be combined with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsAllowInvalidCertificates=false&tlsDisableOCSPEndpointCheck=true'. tlsallowinvalidcertificates may not be specified with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsallowinvalidcertificates may not be combined with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsAllowInvalidCertificates=true&tlsDisableOCSPEndpointCheck=false'. tlsallowinvalidcertificates may not be specified with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsallowinvalidcertificates may not be combined with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsAllowInvalidCertificates=true&tlsDisableOCSPEndpointCheck=true'. tlsallowinvalidcertificates may not be specified with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsallowinvalidcertificates may not be combined with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsAllowInvalidCertificates=false&tlsDisableCertificateRevocationCheck=false'. tlsallowinvalidcertificates may not be specified with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsallowinvalidcertificates may not be combined with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsAllowInvalidCertificates=false&tlsDisableCertificateRevocationCheck=true'. tlsallowinvalidcertificates may not be specified with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsallowinvalidcertificates may not be combined with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsAllowInvalidCertificates=true&tlsDisableCertificateRevocationCheck=false'. tlsallowinvalidcertificates may not be specified with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsallowinvalidcertificates may not be combined with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?tlsAllowInvalidCertificates=true&tlsDisableCertificateRevocationCheck=true'. tlsallowinvalidcertificates may not be specified with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: tlsallowinvalidcertificates may not be combined with tlsdisableocspendpointcheck or tlsdisablecertificaterevocationcheck. ===DONE=== PK.h]_q&tests/decimal128-7-parseError-035.phptnu[--TEST-- Decimal128: [basx573] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] tests/cursor-batchsize-001.phptnu[--TEST-- MongoDB\Driver\Command non-zero batchSize applies to getMore --SKIPIF-- --FILE-- insert(['_id' => $i]); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$match' => new stdClass]], 'cursor' => ['batchSize' => 2] ]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); $cursor->toArray(); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); if ($event->getCommandName() === 'aggregate') { printf("aggregate command specifies batchSize: %d\n", $command->cursor->batchSize); } if ($event->getCommandName() === 'getMore') { printf("getMore command specifies batchSize: %d\n", $command->batchSize); } } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { $reply = $event->getReply(); if ($event->getCommandName() === 'aggregate') { printf("aggregate response contains %d document(s)\n", count($reply->cursor->firstBatch)); } if ($event->getCommandName() === 'getMore') { printf("getMore response contains %d document(s)\n", count($reply->cursor->nextBatch)); } } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } (new Test)->executeCommand(); ?> ===DONE=== --EXPECT-- Inserted: 5 aggregate command specifies batchSize: 2 aggregate response contains 2 document(s) getMore command specifies batchSize: 2 getMore response contains 2 document(s) getMore command specifies batchSize: 2 getMore response contains 1 document(s) ===DONE=== PK.h]X)tests/writeconcern-bsonserialize-003.phptnu[--TEST-- MongoDB\Driver\WriteConcern::bsonSerialize() encodes 64-bit wtimeoutms as integer (64-bit) --SKIPIF-- --FILE-- bsonSerialize()); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> int(2147483648) } ===DONE=== PK.h]z"tests/server-executeQuery-011.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() sends read preference to mongos --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); (new CommandObserver)->observe( function() use ($server) { $server->executeQuery( NS, new MongoDB\Driver\Query(['x' => 1]), [ 'readPreference' => new \MongoDB\Driver\ReadPreference(\MongoDB\Driver\ReadPreference::RP_NEAREST), ] ); }, function(stdClass $command) { echo "Read Preference: ", $command->{'$readPreference'}->mode, "\n"; } ); ?> ===DONE=== --EXPECTF-- Read Preference: nearest ===DONE=== PK.h]  $tests/dbpointer-decodeError-001.phptnu[--TEST-- DBPointer type (deprecated): String with negative length --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]ȍ-tests/manager-executeBulkWrite_error-007.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() should not issue warning before exception --FILE-- 1]); echo throws(function() use ($manager) { $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk); }, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n"; // Valid host refuses connection $manager = create_test_manager('mongodb://localhost:54321', ['serverSelectionTimeoutMS' => 1]); echo throws(function() use ($manager) { $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk); }, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s ===DONE=== PK.h]7 tests/bson-regex-001.phptnu[--TEST-- MongoDB\BSON\Regex #001 --FILE-- getPattern()); printf("Flags: %s\n", $regexp->getFlags()); printf("String representation: %s\n", $regexp); $tests = array( array("regex" => $regexp), ); foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $bson = fromJSON($json); $testagain = toPHP($bson); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- Pattern: regexp Flags: i String representation: /regexp/i Test#0 { "regex" : { "$regex" : "regexp", "$options" : "i" } } string(55) "{ "regex" : { "$regex" : "regexp", "$options" : "i" } }" string(55) "{ "regex" : { "$regex" : "regexp", "$options" : "i" } }" bool(true) ===DONE=== PK.h]YxW=#tests/manager-executeQuery-005.phptnu[--TEST-- MongoDB\Driver\Manager::executeQuery() with filter and projection --SKIPIF-- --FILE-- insert(array('_id' => 1, array('x' => 2, 'y' => 3))); $bulk->insert(array('_id' => 2, array('x' => 3, 'y' => 4))); $bulk->insert(array('_id' => 3, array('x' => 4, 'y' => 5))); $manager->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query(array()); $qr = $manager->executeQuery(NS, $query); $qr->setTypeMap(array("root"=> "MyArrayObject", "document"=> "MyArrayObject", "array" => "MyArrayObject")); foreach($qr as $obj) { var_dump($obj); } ?> ===DONE=== --EXPECTF-- object(MyArrayObject)#%d (1) { [%s]=> array(2) { ["_id"]=> int(1) [0]=> object(MyArrayObject)#%d (1) { [%s]=> array(2) { ["x"]=> int(2) ["y"]=> int(3) } } } } object(MyArrayObject)#%d (1) { [%s]=> array(2) { ["_id"]=> int(2) [0]=> object(MyArrayObject)#%d (1) { [%s]=> array(2) { ["x"]=> int(3) ["y"]=> int(4) } } } } object(MyArrayObject)#%d (1) { [%s]=> array(2) { ["_id"]=> int(3) [0]=> object(MyArrayObject)#%d (1) { [%s]=> array(2) { ["x"]=> int(4) ["y"]=> int(5) } } } } ===DONE=== PK.h]JV!tests/binary-decodeError-004.phptnu[--TEST-- Binary type: subtype 0x02 length too short --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]m[!tests/decimal128-3-valid-032.phptnu[--TEST-- Decimal128: [basx155] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003a3000 {"d":{"$numberDecimal":"0.000"}} 1800000013640000000000000000000000000000003a3000 1800000013640000000000000000000000000000003a3000 ===DONE===PK.h]Qqptests/code-valid-006.phptnu[--TEST-- Javascript Code: Embedded nulls --XFAIL-- Embedded null in code string is not supported in libbson (CDRIVER-1879) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000d61000d0000006162006261620062616261620000 {"a":{"$code":"ab\u0000bab\u0000babab"}} 190000000d61000d0000006162006261620062616261620000 ===DONE===PK.h]pԈw(tests/bson-utcdatetimeinterface-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTimeInterface is implemented by MongoDB\BSON\UTCDateTime --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]//,tests/bson-javascript-jsonserialize-004.phptnu[--TEST-- MongoDB\BSON\Javascript::jsonSerialize() with json_encode() (with scope) --FILE-- new MongoDB\BSON\Javascript('function foo(bar) { return bar; }', ['foo' => 42])]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$code" : "function foo(bar) { return bar; }", "$scope" : { "foo" : 42 } } } {"foo":{"$code":"function foo(bar) { return bar; }","$scope":{"foo":42}}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> object(stdClass)#%d (%d) { ["foo"]=> int(42) } } } ===DONE=== PK.h]ſtests/symbol-valid-006.phptnu[--TEST-- Symbol: Embedded nulls --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000e61000d0000006162006261620062616261620000 {"a":{"$symbol":"ab\u0000bab\u0000babab"}} 190000000e61000d0000006162006261620062616261620000 ===DONE===PK.h]1rtests/manager-ctor-ssl-003.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): Specifying a driver option implicitly enables TLS --SKIPIF-- --FILE-- executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); $manager = create_test_manager(URI, [], ['ca_dir' => 'foo']); throws(function () use ($manager) { // Note that this command will not fail if the server was configured with allowSSL or preferSSL for net.ssl.mode. $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => true])); }, MongoDB\Driver\Exception\ConnectionException::class); ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\ConnectionException ===DONE=== PK.h]stests/bulkwrite-update-002.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() with arrayFilters option --SKIPIF-- --FILE-- insert([ '_id' => 1, 'grades' => [ 95, 92, 90 ] ]); $bulk->insert([ '_id' => 2, 'grades' => [ 98, 100, 102 ] ]); $bulk->insert([ '_id' => 3, 'grades' => [ 95, 110, 100 ] ]); $manager->executeBulkWrite(DATABASE_NAME . '.' . COLLECTION_NAME, $bulk); $updateBulk = new MongoDB\Driver\BulkWrite(); $query = ['grades' => ['$gte' => 100]]; $update = [ '$set' => [ 'grades.$[element]' => 100 ] ]; $options = [ 'arrayFilters' => [ [ 'element' => [ '$gte' => 100 ] ] ], 'multi' => true ]; $updateBulk->update($query, $update, $options); $manager->executeBulkWrite(DATABASE_NAME . '.' . COLLECTION_NAME, $updateBulk); $cursor = $manager->executeQuery( DATABASE_NAME . '.' . COLLECTION_NAME, new \MongoDB\Driver\Query([])); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- array(%d) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(1) ["grades"]=> array(%d) { [0]=> int(95) [1]=> int(92) [2]=> int(90) } } [1]=> object(stdClass)#%d (%d) { ["_id"]=> int(2) ["grades"]=> array(%d) { [0]=> int(98) [1]=> int(100) [2]=> int(100) } } [2]=> object(stdClass)#%d (%d) { ["_id"]=> int(3) ["grades"]=> array(%d) { [0]=> int(95) [1]=> int(100) [2]=> int(100) } } } ===DONE=== PK.h]"tests/bson-binary-compare-002.phptnu[--TEST-- MongoDB\BSON\Binary comparisons with null bytes --FILE-- new MongoDB\BSON\Binary("foo\x00bar", 1)); // Data length is compared first var_dump(new MongoDB\BSON\Binary("c\x00", 1) < new MongoDB\BSON\Binary("a\x00a", 0)); var_dump(new MongoDB\BSON\Binary("b\x00b", 0) > new MongoDB\BSON\Binary("a\x00", 1)); // Type is compared second var_dump(new MongoDB\BSON\Binary("foo\x00bar", 1) < new MongoDB\BSON\Binary("foo\x00bar", 2)); var_dump(new MongoDB\BSON\Binary("foo\x00bar", 1) > new MongoDB\BSON\Binary("foo\x00bar", 0)); // Data is compared last var_dump(new MongoDB\BSON\Binary("foo\x00bar", 1) < new MongoDB\BSON\Binary("foo\x00bat", 1)); var_dump(new MongoDB\BSON\Binary("foo\x00bar", 1) > new MongoDB\BSON\Binary("foo\x00bap", 1)); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]s tests/bson-toJSON_error-001.phptnu[--TEST-- MongoDB\BSON\toJSON(): BSON decoding exceptions --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader OK: Got MongoDB\Driver\Exception\UnexpectedValueException Reading document did not exhaust input buffer ===DONE=== PK.h]g&tests/decimal128-4-parseError-001.phptnu[--TEST-- Decimal128: [basx564] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]tests/bson-timestamp-004.phptnu[--TEST-- MongoDB\BSON\Timestamp constructor requires 64-bit integers to be positive unsigned 32-bit integers --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- Test [4294967295:0] object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "4294967295" ["timestamp"]=> string(1) "0" } Test [0:4294967295] object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "4294967295" } ===DONE=== PK.h][V%tests/manager-ctor-serverApi-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): serverApi driver option --SKIPIF-- --FILE-- getCommand(); var_dump($command->apiVersion); var_dump(isset($command->apiStrict)); var_dump(isset($command->apiDeprecationErrors)); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $subscriber = new MySubscriber(); $manager = create_test_manager(URI, [], ['serverApi' => new MongoDB\Driver\ServerApi('1')]); MongoDB\Driver\Monitoring\addSubscriber($subscriber); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); ?> ===DONE=== --EXPECT-- string(1) "1" bool(false) bool(false) ===DONE=== PK.h]0MW W tests/bson-toPHP-001.phptnu[--TEST-- MongoDB\BSON\toPHP(): __pclass must be both instantiatable and Persistable --FILE-- unserialized = true; } } // Create base64-encoded class names for __pclass field's binary data $bMyAbstractDocument = base64_encode('MyAbstractDocument'); $bMyDocument = base64_encode('MyDocument'); $bUnserializable = base64_encode('MongoDB\BSON\Unserializable'); $bPersistable = base64_encode('MongoDB\BSON\Persistable'); $tests = array( '{ "foo": "yes", "__pclass": { "$binary": "' . $bMyAbstractDocument . '", "$type": "80" } }', '{ "foo": "yes", "__pclass": { "$binary": "' . $bMyDocument . '", "$type": "80" } }', '{ "foo": "yes", "__pclass": { "$binary": "' . $bUnserializable . '", "$type": "80" } }', '{ "foo": "yes", "__pclass": { "$binary": "' . $bPersistable . '", "$type": "44" } }', ); foreach ($tests as $test) { echo $test, "\n"; var_dump(toPHP(fromJSON($test))); echo "\n"; } ?> ===DONE=== --EXPECTF-- { "foo": "yes", "__pclass": { "$binary": "TXlBYnN0cmFjdERvY3VtZW50", "$type": "80" } } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(18) "MyAbstractDocument" ["type"]=> int(128) } } { "foo": "yes", "__pclass": { "$binary": "TXlEb2N1bWVudA==", "$type": "80" } } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(10) "MyDocument" ["type"]=> int(128) } } { "foo": "yes", "__pclass": { "$binary": "TW9uZ29EQlxCU09OXFVuc2VyaWFsaXphYmxl", "$type": "80" } } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(27) "MongoDB\BSON\Unserializable" ["type"]=> int(128) } } { "foo": "yes", "__pclass": { "$binary": "TW9uZ29EQlxCU09OXFBlcnNpc3RhYmxl", "$type": "44" } } object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(24) "MongoDB\BSON\Persistable" ["type"]=> int(68) } } ===DONE=== PK.h]*@@4tests/manager-ctor-disableClientPersistence-010.phptnu[--TEST-- MongoDB\Driver\Manager with disableClientPersistence=true referenced by CommandFailedEvent --SKIPIF-- --FILE-- getCommandName()); $this->events[] = $event; } } $subscriber = new MySubscriber; ini_set('mongodb.debug', 'stderr'); $manager = create_test_manager(URI, [], ['disableClientPersistence' => true]); ini_set('mongodb.debug', ''); MongoDB\Driver\Monitoring\addSubscriber($subscriber); $command = new MongoDB\Driver\Command(['unsupportedCommand' => 1]); throws(function () use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command); }, MongoDB\Driver\Exception\CommandException::class); /* Remove the subscriber to ensure that the extension does not hold an internal * reference to it. This guarantees that the event object (and final Manager * reference) will be freed when the subscriber is later unset. */ MongoDB\Driver\Monitoring\removeSubscriber($subscriber); echo "Unsetting manager\n"; ini_set('mongodb.debug', 'stderr'); unset($manager); ini_set('mongodb.debug', ''); echo "Unsetting subscriber\n"; ini_set('mongodb.debug', 'stderr'); unset($subscriber); ini_set('mongodb.debug', ''); ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client Command failed: unsupportedCommand OK: Got MongoDB\Driver\Exception\CommandException Unsetting manager Unsetting subscriber%A [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A ===DONE=== PK.h] xff!tests/decimal128-2-valid-064.phptnu[--TEST-- Decimal128: [decq634] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000008a5d78456301000000000000fe5f00 {"d":{"$numberDecimal":"1.00000000000000000E+6128"}} 1800000013640000008a5d78456301000000000000fe5f00 ===DONE===PK.h]L GG!tests/decimal128-5-valid-020.phptnu[--TEST-- Decimal128: [decq182] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000028000 {"d":{"$numberDecimal":"-1E-6175"}} 180000001364000100000000000000000000000000028000 ===DONE===PK.h][ w11tests/symbol-valid-002.phptnu[--TEST-- Symbol: Single character --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0e0000000e610002000000620000 {"a":{"$symbol":"b"}} 0e0000000e610002000000620000 ===DONE===PK.h]d(q++.tests/manager-executeReadWriteCommand-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeReadWriteCommand() --SKIPIF-- --FILE-- COLLECTION_NAME, 'pipeline' => [ ['$group' => ['_id' => 1]], ['$out' => COLLECTION_NAME . '.out'], ], 'cursor' => (object) [], ]); (new CommandObserver)->observe( function() use ($manager, $command) { $manager->executeReadWriteCommand( DATABASE_NAME, $command, [ 'readConcern' => new \MongoDB\Driver\ReadConcern(\MongoDB\Driver\ReadConcern::LOCAL), 'writeConcern' => new \MongoDB\Driver\WriteConcern(\MongoDB\Driver\WriteConcern::MAJORITY), ] ); }, function(stdClass $command) { echo "Read Concern: ", $command->readConcern->level, "\n"; echo "Write Concern: ", $command->writeConcern->w, "\n"; } ); ?> ===DONE=== --EXPECTF-- Read Concern: local Write Concern: majority ===DONE=== PK.h]aw/tests/int32-valid-004.phptnu[--TEST-- Int32 type: 0 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 0c0000001069000000000000 {"i":{"$numberInt":"0"}} {"i":0} 0c0000001069000000000000 {"i":0} ===DONE===PK.h]ҕ!tests/writeerror-getInfo-002.phptnu[--TEST-- MongoDB\Driver\WriteError::getInfo() exposes writeError.errInfo --DESCRIPTION-- CRUD spec prose test #2 https://github.com/mongodb/specifications/blob/master/source/crud/tests/README.rst#writeerror-details-exposes-writeerrors-errinfo --SKIPIF-- --FILE-- executeCommand(DATABASE_NAME, new MongoDB\Driver\Command([ 'create' => COLLECTION_NAME, 'validator' => ['x' => ['$type' => 'string']], ])); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); MongoDB\Driver\Monitoring\addSubscriber($this); try { $manager->executeBulkWrite(NS, $bulk); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { $writeError = $e->getWriteResult()->getWriteErrors()[0]; var_dump($writeError->getCode()); // DocumentValidationFailure(121) /* Note: we intentionally do not assert the contents of errInfo * since its structure could change between server versions. */ var_dump($writeError->getInfo() instanceof stdClass); var_dump($this->errInfo instanceof stdClass); var_dump($writeError->getInfo() == $this->errInfo); } MongoDB\Driver\Monitoring\removeSubscriber($this); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { if ($event->getCommandName() === 'insert') { $this->errInfo = $event->getReply()->writeErrors[0]->errInfo ?? null; } } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } (new Test)->execute(); ?> ===DONE=== --EXPECTF-- int(121) bool(true) bool(true) bool(true) ===DONE=== PK.h]}.tests/manager-ctor-read_concern-error-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid read concern --FILE-- 1]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected string for "readConcernLevel" URI option, 32-bit integer given ===DONE=== PK.h]5PP!tests/decimal128-3-valid-004.phptnu[--TEST-- Decimal128: [basx041] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004c0000000000000000000000000040b000 {"d":{"$numberDecimal":"-76"}} 180000001364004c0000000000000000000000000040b000 ===DONE===PK.h]}Atests/cursor-tailable-002.phptnu[--TEST-- MongoDB\Driver\Cursor tailable iteration with awaitData option --SKIPIF-- --FILE-- insert(['_id' => $i]); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted %d document(s): %s\n", $writeResult->getInsertedCount(), implode(', ', range($from, $to))); } $manager = create_test_manager(); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command([ 'create' => COLLECTION_NAME, 'capped' => true, 'size' => 1048576, ])); insert($manager, 1, 3); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['tailable' => true, 'awaitData' => true])); $it = new IteratorIterator($cursor); $numAwaitAttempts = 0; $maxAwaitAttempts = 7; for ($it->rewind(); $numAwaitAttempts < $maxAwaitAttempts; $it->next()) { $document = $it->current(); if ($document !== null) { printf("{_id: %d}\n", $document->_id); continue; } if ($numAwaitAttempts === 2) { insert($manager, 4, 6); } if ($numAwaitAttempts === 5) { insert($manager, 7, 9); } echo "Awaiting results...\n"; $numAwaitAttempts += 1; } ?> ===DONE=== --EXPECT-- Inserted 3 document(s): 1, 2, 3 {_id: 1} {_id: 2} {_id: 3} Awaiting results... Awaiting results... Inserted 3 document(s): 4, 5, 6 Awaiting results... {_id: 4} {_id: 5} {_id: 6} Awaiting results... Awaiting results... Inserted 3 document(s): 7, 8, 9 Awaiting results... {_id: 7} {_id: 8} {_id: 9} Awaiting results... ===DONE=== PK.h]ZU%)tests/manager-ctor-write_concern-003.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): write concern options (journal) --FILE-- true]], [null, ['journal' => false]], ]; foreach ($tests as $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getWriteConcern()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["j"]=> bool(true) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["j"]=> bool(false) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["j"]=> bool(true) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["j"]=> bool(false) } ===DONE=== PK.h]@XX"tests/server-executeQuery-006.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() takes a read preference (find command) --SKIPIF-- --FILE-- selectServer($rp); $command = new MongoDB\Driver\Command(array('profile' => 2)); $cursor = $secondary->executeCommand(DATABASE_NAME, $command); $result = current($cursor->toArray()); printf("Set profile level to 2 successfully: %s\n", (empty($result->ok) ? 'no' : 'yes')); if (empty($result->ok)) { exit("Could not set profile level\n"); } $secondary->executeQuery(NS, new MongoDB\Driver\Query(array("x" => 1)), $rp); $query = new MongoDB\Driver\Query( array( 'op' => 'query', 'ns' => NS, ), array( 'sort' => array('ts' => -1), 'limit' => 1, ) ); $cursor = $secondary->executeQuery(DATABASE_NAME . '.system.profile', $query, $rp); $profileEntry = current($cursor->toArray()); if (! isset( $profileEntry->command )) { var_dump($profileEntry); } var_dump($profileEntry->command->find); var_dump($profileEntry->command->filter); $command = new MongoDB\Driver\Command(array('profile' => 0)); $cursor = $secondary->executeCommand(DATABASE_NAME, $command); $result = current($cursor->toArray()); printf("Set profile level to 0 successfully: %s\n", (empty($result->ok) ? 'no' : 'yes')); ?> ===DONE=== --EXPECTF-- Set profile level to 2 successfully: yes string(%d) "%s" object(stdClass)#%d (1) { ["x"]=> int(1) } Set profile level to 0 successfully: yes ===DONE=== PK.h]UOO!tests/decimal128-5-valid-041.phptnu[--TEST-- Decimal128: [decq613] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000e83c80d09f3c2e3b030000fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000000000E+6138"}} 18000000136400000000e83c80d09f3c2e3b030000fe5f00 18000000136400000000e83c80d09f3c2e3b030000fe5f00 ===DONE===PK.h]}X(tests/writeconcernerror-getinfo-001.phptnu[--TEST-- MongoDB\Driver\WriteConcernError::getInfo() --SKIPIF-- =', '3.1'); ?> --FILE-- insert(['x' => 1]); try { /* We assume that the replica set does not have 12 nodes */ $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(12)); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteConcernError()->getInfo()); } ?> ===DONE=== --EXPECT-- NULL ===DONE=== PK.h]:ghtests/top-decodeError-014.phptnu[--TEST-- Top-level document validity: Document truncated mid-key --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]&\^V&tests/decimal128-7-parseError-043.phptnu[--TEST-- Decimal128: [basx500] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]~|؜EE!tests/decimal128-5-valid-008.phptnu[--TEST-- Decimal128: [decq082] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000020000 {"d":{"$numberDecimal":"1E-6175"}} 180000001364000100000000000000000000000000020000 ===DONE===PK.h]yf`33!tests/decimal128-2-valid-102.phptnu[--TEST-- Decimal128: [decq704] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001400000000000000000000000000403000 {"d":{"$numberDecimal":"20"}} 180000001364001400000000000000000000000000403000 ===DONE===PK.h]gw tests/bulkwrite-update-001.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() should always encode __pclass for Persistable objects --SKIPIF-- --FILE-- id = $id; $this->child = $child; } public function bsonSerialize() { return [ '_id' => $this->id, 'child' => $this->child, ]; } public function bsonUnserialize(array $data) { $this->id = $data['_id']; $this->child = $data['child']; } } $manager = create_test_manager(); $document = new MyClass('foo', new MyClass('bar', new MyClass('baz'))); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->update( ['_id' => 'foo'], $document, ['upsert' => true] ); $result = $manager->executeBulkWrite(NS, $bulk); printf("Upserted %d document(s)\n", $result->getUpsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); var_dump($cursor->toArray()); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->update( $document, ['$set' => ['child' => new MyClass('yip', new MyClass('yap'))]] ); $result = $manager->executeBulkWrite(NS, $bulk); printf("Modified %d document(s)\n", $result->getModifiedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- Upserted 1 document(s) array(1) { [0]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "foo" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "bar" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "baz" ["child":"MyClass":private]=> NULL } } } } Modified 1 document(s) array(1) { [0]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "foo" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "yip" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "yap" ["child":"MyClass":private]=> NULL } } } } ===DONE=== PK.h]w0/-tests/bson-decimal128-get_properties-001.phptnu[--TEST-- MongoDB\BSON\Decimal128 get_properties handler (get_object_vars) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- array(1) { ["dec"]=> string(9) "1234.5678" } ===DONE=== PK.h] ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]`V;;!tests/decimal128-2-valid-030.phptnu[--TEST-- Decimal128: [decq424] negative zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000008000 {"d":{"$numberDecimal":"-0E-6176"}} 180000001364000000000000000000000000000000008000 ===DONE===PK.h]]5tests/bulkwriteexception-haserrorlabel_error-001.phptnu[--TEST-- MongoDB\Driver\Exception\BulkWriteException::hasErrorLabel() with non-array values --FILE-- getProperty('errorLabels'); $resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('bar')); ?> ===DONE=== --EXPECT-- bool(false) ===DONE=== PK.h]!tests/decimal128-3-valid-027.phptnu[--TEST-- Decimal128: [basx687] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000040b000 {"d":{"$numberDecimal":"-0"}} 18000000136400000000000000000000000000000040b000 18000000136400000000000000000000000000000040b000 ===DONE===PK.h]yujj!tests/decimal128-2-valid-155.phptnu[--TEST-- Decimal128: [decq022] Normality --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400c7711cc7b548f377dc80a131c836403000 {"d":{"$numberDecimal":"1111111111111111111111111111111111"}} 18000000136400c7711cc7b548f377dc80a131c836403000 ===DONE===PK.h]Xtests/bson-encode-001.phptnu[--TEST-- BSON encoding: Encoding data into BSON representation, and BSON into Extended JSON --FILE-- "world"), (object)array("hello" => "world"), array(array("hello" => "world")), array((object)array("hello" => "world")), array(array(1, 2, 3, 4, 5, 6, 7, 8, 9)), array((object)array(1, 2, 3, 4, 5, 6, 7, 8, 9)), array(array("0" => 1, "1" => 2, "2" => 3, "3" => 4, "4" => 5, "5" => 6, "6" => 7, "7" => 8, "8" => 9)), array(null), array(123), array(4.125), array(true), array(false), array("string"), array("string", true), array('test', 'foo', 'bar'), array('test' => 'test', 'foo' => 'foo', 'bar' => 'bar'), array('foo' => 'test', 'foo', 'bar'), array("int" => 3, "boolean" => true, "array" => array("foo", "bar"), "object" => new stdclass, "string" => "test", 3 => "test"), array(array("string", true)), array(array('test', 'foo', 'bar')), array(array('test' => 'test', 'foo' => 'foo', 'bar' => 'bar')), array(array('foo' => 'test', 'foo', 'bar')), array(array("int" => 3, "boolean" => true, "array" => array("foo", "bar"), "object" => new stdclass, "string" => "test", 3 => "test")), ); foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", toJSON($s), "\n"; hex_dump($s); } ?> ===DONE=== --EXPECT-- Test#0 { "hello" : "world" } 0 : 16 00 00 00 02 68 65 6c 6c 6f 00 06 00 00 00 77 [.....hello.....w] 10 : 6f 72 6c 64 00 00 [orld..] Test#1 { "hello" : "world" } 0 : 16 00 00 00 02 68 65 6c 6c 6f 00 06 00 00 00 77 [.....hello.....w] 10 : 6f 72 6c 64 00 00 [orld..] Test#2 { "0" : { "hello" : "world" } } 0 : 1e 00 00 00 03 30 00 16 00 00 00 02 68 65 6c 6c [.....0......hell] 10 : 6f 00 06 00 00 00 77 6f 72 6c 64 00 00 00 [o.....world...] Test#3 { "0" : { "hello" : "world" } } 0 : 1e 00 00 00 03 30 00 16 00 00 00 02 68 65 6c 6c [.....0......hell] 10 : 6f 00 06 00 00 00 77 6f 72 6c 64 00 00 00 [o.....world...] Test#4 { "0" : [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] } 0 : 4c 00 00 00 04 30 00 44 00 00 00 10 30 00 01 00 [L....0.D....0...] 10 : 00 00 10 31 00 02 00 00 00 10 32 00 03 00 00 00 [...1......2.....] 20 : 10 33 00 04 00 00 00 10 34 00 05 00 00 00 10 35 [.3......4......5] 30 : 00 06 00 00 00 10 36 00 07 00 00 00 10 37 00 08 [......6......7..] 40 : 00 00 00 10 38 00 09 00 00 00 00 00 [....8.......] Test#5 { "0" : { "0" : 1, "1" : 2, "2" : 3, "3" : 4, "4" : 5, "5" : 6, "6" : 7, "7" : 8, "8" : 9 } } 0 : 4c 00 00 00 03 30 00 44 00 00 00 10 30 00 01 00 [L....0.D....0...] 10 : 00 00 10 31 00 02 00 00 00 10 32 00 03 00 00 00 [...1......2.....] 20 : 10 33 00 04 00 00 00 10 34 00 05 00 00 00 10 35 [.3......4......5] 30 : 00 06 00 00 00 10 36 00 07 00 00 00 10 37 00 08 [......6......7..] 40 : 00 00 00 10 38 00 09 00 00 00 00 00 [....8.......] Test#6 { "0" : [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] } 0 : 4c 00 00 00 04 30 00 44 00 00 00 10 30 00 01 00 [L....0.D....0...] 10 : 00 00 10 31 00 02 00 00 00 10 32 00 03 00 00 00 [...1......2.....] 20 : 10 33 00 04 00 00 00 10 34 00 05 00 00 00 10 35 [.3......4......5] 30 : 00 06 00 00 00 10 36 00 07 00 00 00 10 37 00 08 [......6......7..] 40 : 00 00 00 10 38 00 09 00 00 00 00 00 [....8.......] Test#7 { "0" : null } 0 : 08 00 00 00 0a 30 00 00 [.....0..] Test#8 { "0" : 123 } 0 : 0c 00 00 00 10 30 00 7b 00 00 00 00 [.....0.{....] Test#9 { "0" : 4.125 } 0 : 10 00 00 00 01 30 00 00 00 00 00 00 80 10 40 00 [.....0........@.] Test#10 { "0" : true } 0 : 09 00 00 00 08 30 00 01 00 [.....0...] Test#11 { "0" : false } 0 : 09 00 00 00 08 30 00 00 00 [.....0...] Test#12 { "0" : "string" } 0 : 13 00 00 00 02 30 00 07 00 00 00 73 74 72 69 6e [.....0.....strin] 10 : 67 00 00 [g..] Test#13 { "0" : "string", "1" : true } 0 : 17 00 00 00 02 30 00 07 00 00 00 73 74 72 69 6e [.....0.....strin] 10 : 67 00 08 31 00 01 00 [g..1...] Test#14 { "0" : "test", "1" : "foo", "2" : "bar" } 0 : 27 00 00 00 02 30 00 05 00 00 00 74 65 73 74 00 ['....0.....test.] 10 : 02 31 00 04 00 00 00 66 6f 6f 00 02 32 00 04 00 [.1.....foo..2...] 20 : 00 00 62 61 72 00 00 [..bar..] Test#15 { "test" : "test", "foo" : "foo", "bar" : "bar" } 0 : 2e 00 00 00 02 74 65 73 74 00 05 00 00 00 74 65 [.....test.....te] 10 : 73 74 00 02 66 6f 6f 00 04 00 00 00 66 6f 6f 00 [st..foo.....foo.] 20 : 02 62 61 72 00 04 00 00 00 62 61 72 00 00 [.bar.....bar..] Test#16 { "foo" : "test", "0" : "foo", "1" : "bar" } 0 : 29 00 00 00 02 66 6f 6f 00 05 00 00 00 74 65 73 [)....foo.....tes] 10 : 74 00 02 30 00 04 00 00 00 66 6f 6f 00 02 31 00 [t..0.....foo..1.] 20 : 04 00 00 00 62 61 72 00 00 [....bar..] Test#17 { "int" : 3, "boolean" : true, "array" : [ "foo", "bar" ], "object" : { }, "string" : "test", "3" : "test" } 0 : 64 00 00 00 10 69 6e 74 00 03 00 00 00 08 62 6f [d....int......bo] 10 : 6f 6c 65 61 6e 00 01 04 61 72 72 61 79 00 1b 00 [olean...array...] 20 : 00 00 02 30 00 04 00 00 00 66 6f 6f 00 02 31 00 [...0.....foo..1.] 30 : 04 00 00 00 62 61 72 00 00 03 6f 62 6a 65 63 74 [....bar...object] 40 : 00 05 00 00 00 00 02 73 74 72 69 6e 67 00 05 00 [.......string...] 50 : 00 00 74 65 73 74 00 02 33 00 05 00 00 00 74 65 [..test..3.....te] 60 : 73 74 00 00 [st..] Test#18 { "0" : [ "string", true ] } 0 : 1f 00 00 00 04 30 00 17 00 00 00 02 30 00 07 00 [.....0......0...] 10 : 00 00 73 74 72 69 6e 67 00 08 31 00 01 00 00 [..string..1....] Test#19 { "0" : [ "test", "foo", "bar" ] } 0 : 2f 00 00 00 04 30 00 27 00 00 00 02 30 00 05 00 [/....0.'....0...] 10 : 00 00 74 65 73 74 00 02 31 00 04 00 00 00 66 6f [..test..1.....fo] 20 : 6f 00 02 32 00 04 00 00 00 62 61 72 00 00 00 [o..2.....bar...] Test#20 { "0" : { "test" : "test", "foo" : "foo", "bar" : "bar" } } 0 : 36 00 00 00 03 30 00 2e 00 00 00 02 74 65 73 74 [6....0......test] 10 : 00 05 00 00 00 74 65 73 74 00 02 66 6f 6f 00 04 [.....test..foo..] 20 : 00 00 00 66 6f 6f 00 02 62 61 72 00 04 00 00 00 [...foo..bar.....] 30 : 62 61 72 00 00 00 [bar...] Test#21 { "0" : { "foo" : "test", "0" : "foo", "1" : "bar" } } 0 : 31 00 00 00 03 30 00 29 00 00 00 02 66 6f 6f 00 [1....0.)....foo.] 10 : 05 00 00 00 74 65 73 74 00 02 30 00 04 00 00 00 [....test..0.....] 20 : 66 6f 6f 00 02 31 00 04 00 00 00 62 61 72 00 00 [foo..1.....bar..] 30 : 00 [.] Test#22 { "0" : { "int" : 3, "boolean" : true, "array" : [ "foo", "bar" ], "object" : { }, "string" : "test", "3" : "test" } } 0 : 6c 00 00 00 03 30 00 64 00 00 00 10 69 6e 74 00 [l....0.d....int.] 10 : 03 00 00 00 08 62 6f 6f 6c 65 61 6e 00 01 04 61 [.....boolean...a] 20 : 72 72 61 79 00 1b 00 00 00 02 30 00 04 00 00 00 [rray......0.....] 30 : 66 6f 6f 00 02 31 00 04 00 00 00 62 61 72 00 00 [foo..1.....bar..] 40 : 03 6f 62 6a 65 63 74 00 05 00 00 00 00 02 73 74 [.object.......st] 50 : 72 69 6e 67 00 05 00 00 00 74 65 73 74 00 02 33 [ring.....test..3] 60 : 00 05 00 00 00 74 65 73 74 00 00 00 [.....test...] ===DONE=== PK.h]dd*tests/bson-objectid-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\ObjectId::jsonSerialize() with json_encode() --FILE-- new MongoDB\BSON\ObjectId('5820ca4bef62d52d9924d0d8')]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$oid" : "5820ca4bef62d52d9924d0d8" } } {"foo":{"$oid":"5820ca4bef62d52d9924d0d8"}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "5820ca4bef62d52d9924d0d8" } } ===DONE=== PK.h]"@22$tests/bson-javascript_error-001.phptnu[--TEST-- MongoDB\BSON\Javascript argument count errors --SKIPIF-- =', '7.99'); ?> --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Javascript::__construct() expects at least 1 %r(argument|parameter)%r, 0 given ===DONE=== PK.h]n+b&tests/decimal128-7-parseError-003.phptnu[--TEST-- Decimal128: [basx533] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]p/#tests/bson-timestamp_error-002.phptnu[--TEST-- MongoDB\BSON\Timestamp cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyTimestamp %s final class %SMongoDB\BSON\Timestamp%S in %s on line %d PK.h]{(Mtests/bug0939-001.phptnu[--TEST-- PHPC-939: BSON classes should not assign public properties after var_dump() --FILE-- 42]), ['code', 'scope'] ], [ new MongoDB\BSON\MaxKey, [] ], [ new MongoDB\BSON\MinKey, [] ], [ new MongoDB\BSON\ObjectId, ['oid'] ], [ new MongoDB\BSON\Regex('foo', 'i'), ['pattern', 'flags'] ], [ new MongoDB\BSON\Timestamp(1234, 5678), ['increment', 'timestamp'] ], [ new MongoDB\BSON\UTCDateTime, ['milliseconds'] ], ]; foreach ($tests as $test) { list($object, $properties) = $test; var_dump($object); foreach ($properties as $property) { printf("%s::$%s exists: %s\n", get_class($object), $property, property_exists($object, $property) ? 'yes' : 'no'); } echo "\n"; } ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(3) "foo" ["type"]=> int(0) } MongoDB\BSON\Binary::$data exists: no MongoDB\BSON\Binary::$type exists: no object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(4) "3.14" } MongoDB\BSON\Decimal128::$dec exists: no object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(30) "function foo() { return bar; }" ["scope"]=> object(stdClass)#%d (%d) { ["bar"]=> int(42) } } MongoDB\BSON\Javascript::$code exists: no MongoDB\BSON\Javascript::$scope exists: no object(MongoDB\BSON\MaxKey)#%d (%d) { } object(MongoDB\BSON\MinKey)#%d (%d) { } object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } MongoDB\BSON\ObjectId::$oid exists: no object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(3) "foo" ["flags"]=> string(1) "i" } MongoDB\BSON\Regex::$pattern exists: no MongoDB\BSON\Regex::$flags exists: no object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } MongoDB\BSON\Timestamp::$increment exists: no MongoDB\BSON\Timestamp::$timestamp exists: no object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(%d) "%d" } MongoDB\BSON\UTCDateTime::$milliseconds exists: no ===DONE=== PK.h]EU!tests/decimal128-1-valid-051.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - -Inf --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000000f800 {"d":{"$numberDecimal":"-Infinity"}} 18000000136400000000000000000000000000000000f800 18000000136400000000000000000000000000000000f800 ===DONE===PK.h]آ33!tests/decimal128-3-valid-002.phptnu[--TEST-- Decimal128: [basx065] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400185c0ace0000000000000000000038b000 {"d":{"$numberDecimal":"-345678.5432"}} 18000000136400185c0ace0000000000000000000038b000 18000000136400185c0ace0000000000000000000038b000 ===DONE===PK.h]EkIPP/tests/readpreference-getMaxStalenessMS-002.phptnu[--TEST-- MongoDB\Driver\ReadPreference::getMaxStalenessSeconds() with string mode --FILE-- $test]); var_dump($rp->getMaxStalenessSeconds()); } ?> ===DONE=== --EXPECT-- int(-1) int(90) int(90) int(1000) int(2147483647) ===DONE=== PK.h]"3*tests/manager-executeWriteCommand-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeWriteCommand() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['_id' => 'foo'], 'upsert' => true, 'new' => true, 'update' => ['x' => 1] ]); $manager->executeWriteCommand(DATABASE_NAME, $command, ['session' => $session]); $pinnedServer = $session->getServer(); var_dump($pinnedServer instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); $session->commitTransaction(); var_dump($session->getServer() == $pinnedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(false) bool(false) bool(true) bool(true) bool(false) ===DONE=== PK.h]۷MM!tests/decimal128-2-valid-145.phptnu[--TEST-- Decimal128: [decq792] Miscellaneous (testers' queries, etc.) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364003075000000000000000000000000403000 {"d":{"$numberDecimal":"30000"}} 180000001364003075000000000000000000000000403000 ===DONE===PK.h]ΉM^tests/session-005.phptnu[--TEST-- MongoDB\Driver\Session spec test: snapshot option requires MongoDB 5.0+ --DESCRIPTION-- PHPC-1876: Raise client error for snapshot sessions on <5.0 servers --SKIPIF-- =', '5.0'); ?> --FILE-- startSession(['snapshot' => true]); /* Note: executeBulkWrite() always throws a BulkWriteException. Any previous * exception's message will be included in the BulkWriteException message. */ echo "\nTesting executeBulkWrite()\n"; echo throws(function() use ($manager, $session) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); }, MongoDB\Driver\Exception\BulkWriteException::class), "\n"; echo "\nTesting executeCommand()\n"; echo throws(function() use ($manager, $session) { $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); }, MongoDB\Driver\Exception\RuntimeException::class), "\n"; echo "\nTesting executeQuery()\n"; echo throws(function() use ($manager, $session) { $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); }, MongoDB\Driver\Exception\RuntimeException::class), "\n"; ?> ===DONE=== --EXPECT-- Testing executeBulkWrite() OK: Got MongoDB\Driver\Exception\BulkWriteException Bulk write failed due to previous MongoDB\Driver\Exception\RuntimeException: Snapshot reads require MongoDB 5.0 or later Testing executeCommand() OK: Got MongoDB\Driver\Exception\RuntimeException Snapshot reads require MongoDB 5.0 or later Testing executeQuery() OK: Got MongoDB\Driver\Exception\RuntimeException Snapshot reads require MongoDB 5.0 or later ===DONE=== PK.h]m  tests/binary-valid-004.phptnu[--TEST-- Binary type: subtype 0x01 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0f0000000578000200000001ffff00 {"x":{"$binary":{"base64":"\/\/8=","subType":"01"}}} 0f0000000578000200000001ffff00 ===DONE===PK.h]jZ"tests/cursorid-var_export-001.phptnu[--TEST-- MongoDB\Driver\CursorId: var_export() --FILE-- ===DONE=== --EXPECTF-- MongoDB\Driver\CursorId::__set_state(array( 'id' => %r(7250031947823432848|'7250031947823432848')%r, )) ===DONE=== PK.h]*GG!tests/decimal128-2-valid-008.phptnu[--TEST-- Decimal128: [decq006] derivative canonical plain strings --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ee0200000000000000000000000040b000 {"d":{"$numberDecimal":"-750"}} 18000000136400ee0200000000000000000000000040b000 ===DONE===PK.h]6yy!tests/decimal128-3-valid-135.phptnu[--TEST-- Decimal128: [basx038] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640079df0d8648700000000000000000223000 {"d":{"$numberDecimal":"0.123456789012345"}} 1800000013640079df0d8648700000000000000000223000 ===DONE===PK.h]IJ??!tests/decimal128-5-valid-049.phptnu[--TEST-- Decimal128: [decq629] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000e8890423c78a000000000000fe5f00 {"d":{"$numberDecimal":"1.0000000000000000000E+6130"}} 180000001364000000e8890423c78a000000000000fe5f00 180000001364000000e8890423c78a000000000000fe5f00 ===DONE===PK.h]tests/bson-toPHP_error-005.phptnu[--TEST-- MongoDB\BSON\toPHP(): Field path values with bson_iter_visit_all() failures --FILE-- ['INVALID!' => 'bar'] ])), str_replace('INVALID!', "INVALID\xFE", fromPHP(['foo' => ['bar' => ['INVALID!' => 'bar']]])), str_replace('INVALID!', "INVALID\xFE", fromPHP(['foo' => ['bar' => ['INVALID!']]])), str_replace('INVALID!', "INVALID\xFE", fromPHP(['foo' => [['INVALID!']]])), str_replace('INVALID!', "INVALID\xFE", fromPHP(['foo' => [ ['bar' => ['INVALID!' => 'bar']], 6 ]])), ); foreach ($tests as $bson) { echo throws(function() use ($bson) { toPHP($bson); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; } ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected corrupt BSON data for field path 'foo' at offset 0 OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected corrupt BSON data for field path 'foo.bar' at offset 0 OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected corrupt BSON data for field path 'foo.bar' at offset 0 OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected corrupt BSON data for field path 'foo.0' at offset 0 OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected corrupt BSON data for field path 'foo.0.bar' at offset 0 ===DONE=== PK.h]\))tests/bson-toPHP-004.phptnu[--TEST-- MongoDB\BSON\toPHP(): BSON array keys should be disregarded during visitation --FILE-- [$value]]); // Alter the key of the BSON array's first element $bson[12] = '1'; var_dump(toPHP($bson)); /* Note that numeric indexes within the HashTable are not accessible without * casting the object to an array. This is because the entries are only * stored with numeric indexes and do not also have string equivalents, as * might be created with zend_symtable_update(). This behavior is not unique * to the driver, as `(object) ['foo']` would demonstrate the same issue. */ var_dump(toPHP($bson, ['array' => 'object'])); var_dump(toPHP($bson, ['array' => 'MyArrayObject'])); echo "\n"; } ?> ===DONE=== --EXPECTF-- Testing NULL visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> NULL } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> NULL } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> NULL } } } Testing boolean visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> bool(true) } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> bool(true) } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> bool(true) } } } Testing integer visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> int(1) } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> int(1) } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> int(1) } } } Testing double visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> float(4.125) } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> float(4.125) } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> float(4.125) } } } Testing string visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> string(3) "foo" } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> string(3) "foo" } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> string(3) "foo" } } } Testing array visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> array(0) { } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(stdClass)#%d (0) { } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(0) { } } } } } Testing stdClass visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> object(stdClass)#%d (0) { } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(stdClass)#%d (0) { } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(stdClass)#%d (0) { } } } } Testing MongoDB\BSON\Binary visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(3) "foo" ["type"]=> int(0) } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(3) "foo" ["type"]=> int(0) } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(3) "foo" ["type"]=> int(0) } } } } Testing MongoDB\BSON\Decimal128 visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> object(MongoDB\BSON\Decimal128)#%d (1) { ["dec"]=> string(4) "3.14" } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(MongoDB\BSON\Decimal128)#%d (1) { ["dec"]=> string(4) "3.14" } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(MongoDB\BSON\Decimal128)#%d (1) { ["dec"]=> string(4) "3.14" } } } } Testing MongoDB\BSON\Javascript visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> object(MongoDB\BSON\Javascript)#%d (2) { ["code"]=> string(12) "function(){}" ["scope"]=> NULL } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(MongoDB\BSON\Javascript)#%d (2) { ["code"]=> string(12) "function(){}" ["scope"]=> NULL } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(MongoDB\BSON\Javascript)#%d (2) { ["code"]=> string(12) "function(){}" ["scope"]=> NULL } } } } Testing MongoDB\BSON\MaxKey visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> object(MongoDB\BSON\MaxKey)#%d (0) { } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(MongoDB\BSON\MaxKey)#%d (0) { } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(MongoDB\BSON\MaxKey)#%d (0) { } } } } Testing MongoDB\BSON\MinKey visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> object(MongoDB\BSON\MinKey)#%d (0) { } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(MongoDB\BSON\MinKey)#%d (0) { } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(MongoDB\BSON\MinKey)#%d (0) { } } } } Testing MongoDB\BSON\ObjectId visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> object(MongoDB\BSON\ObjectId)#%d (1) { ["oid"]=> string(24) "586c18d86118fd6c9012dec1" } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(MongoDB\BSON\ObjectId)#%d (1) { ["oid"]=> string(24) "586c18d86118fd6c9012dec1" } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(MongoDB\BSON\ObjectId)#%d (1) { ["oid"]=> string(24) "586c18d86118fd6c9012dec1" } } } } Testing MongoDB\BSON\Regex visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> object(MongoDB\BSON\Regex)#%d (2) { ["pattern"]=> string(3) "foo" ["flags"]=> string(0) "" } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(MongoDB\BSON\Regex)#%d (2) { ["pattern"]=> string(3) "foo" ["flags"]=> string(0) "" } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(MongoDB\BSON\Regex)#%d (2) { ["pattern"]=> string(3) "foo" ["flags"]=> string(0) "" } } } } Testing MongoDB\BSON\Timestamp visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> object(MongoDB\BSON\Timestamp)#%d (2) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(MongoDB\BSON\Timestamp)#%d (2) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(MongoDB\BSON\Timestamp)#%d (2) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } } } } Testing MongoDB\BSON\UTCDateTime visitor function object(stdClass)#%d (1) { ["x"]=> array(1) { [0]=> object(MongoDB\BSON\UTCDateTime)#%d (1) { ["milliseconds"]=> string(13) "1483479256924" } } } object(stdClass)#%d (1) { ["x"]=> object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(MongoDB\BSON\UTCDateTime)#%d (1) { ["milliseconds"]=> string(13) "1483479256924" } } } object(stdClass)#%d (1) { ["x"]=> object(MyArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { [0]=> object(MongoDB\BSON\UTCDateTime)#%d (1) { ["milliseconds"]=> string(13) "1483479256924" } } } } ===DONE=== PK.h]d::!tests/decimal128-1-valid-032.phptnu[--TEST-- Decimal128: Scientific - With Decimal --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006900000000000000000000000000423000 {"d":{"$numberDecimal":"1.05E+3"}} 180000001364006900000000000000000000000000423000 ===DONE===PK.h]? k>>%tests/bulkwrite-update_error-004.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() with BSON encoding error (invalid UTF-8 string) --FILE-- update(['x' => "\xc3\x28"], ['x' => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['x' => "\xc3\x28"]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['$set' => ['x' => "\xc3\x28"]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['y' => 1], ['collation' => ['locale' => "\xc3\x28"]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "x": %s OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "x": %s OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "$set.x": %s OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "locale": %s ===DONE=== PK.h]77'tests/code_w_scope-decodeError-006.phptnu[--TEST-- Javascript Code with Scope: field length too long (longer than outer doc) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]-A%tests/bulkwrite-insert_error-001.phptnu[--TEST-- MongoDB\Driver\BulkWrite::insert() with invalid insert document --FILE-- insert(['' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->insert(["\xc3\x28" => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException invalid document for insert: empty key OK: Got MongoDB\Driver\Exception\InvalidArgumentException invalid document for insert: corrupt BSON ===DONE=== PK.h]ǻ"tests/boolean-decodeError-001.phptnu[--TEST-- Boolean: Invalid boolean value of 2 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]P)~@!tests/decimal128-3-valid-012.phptnu[--TEST-- Decimal128: [basx601] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000002e3000 {"d":{"$numberDecimal":"0E-9"}} 1800000013640000000000000000000000000000002e3000 1800000013640000000000000000000000000000002e3000 ===DONE===PK.h]>Q tests/query-ctor-004.phptnu[--TEST-- MongoDB\Driver\Query construction with options overriding modifiers --FILE-- 1], [ 'comment' => 'foo', 'max' => ['y' => 100], 'maxScan' => 50, 'maxTimeMS' => 1000, 'min' => ['y' => 1], 'returnKey' => false, 'showRecordId' => false, 'sort' => ['y' => -1], 'snapshot' => false, 'modifiers' => [ '$comment' => 'bar', '$max' => ['y' => 200], '$maxScan' => 60, '$maxTimeMS' => 2000, '$min' => ['y' => 101], '$orderby' => ['y' => 1], '$returnKey' => true, '$showDiskLoc' => true, '$snapshot' => true, ], ] )); var_dump(new MongoDB\Driver\Query( ['x' => 1], [ 'hint' => 'y_1', 'modifiers' => ['$hint' => 'x_1'], ] )); var_dump(new MongoDB\Driver\Query( ['x' => 1], [ 'hint' => ['y' => 1], 'modifiers' => ['$hint' => ['x' => 1]], ] )); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Query::__construct(): The "maxScan" option is deprecated and will be removed in a future release in %s on line %d Deprecated: MongoDB\Driver\Query::__construct(): The "snapshot" option is deprecated and will be removed in a future release in %s on line %d object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["comment"]=> string(3) "foo" ["max"]=> object(stdClass)#%d (%d) { ["y"]=> int(100) } ["maxScan"]=> int(50) ["maxTimeMS"]=> int(1000) ["min"]=> object(stdClass)#%d (%d) { ["y"]=> int(1) } ["returnKey"]=> bool(false) ["showRecordId"]=> bool(false) ["sort"]=> object(stdClass)#%d (%d) { ["y"]=> int(-1) } ["snapshot"]=> bool(false) } ["readConcern"]=> NULL } object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["hint"]=> string(3) "y_1" } ["readConcern"]=> NULL } object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["hint"]=> object(stdClass)#%d (%d) { ["y"]=> int(1) } } ["readConcern"]=> NULL } ===DONE=== PK.h]6DT ((tests/top-decodeError-001.phptnu[--TEST-- Top-level document validity: An object size that's too small to even include the object size, but is a well-formed, empty object --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]N;ytests/query-debug-001.phptnu[--TEST-- MongoDB\Driver\Query debug output --FILE-- 123], [ 'limit' => 5, 'modifiers' => [ '$comment' => 'foo', '$maxTimeMS' => 500, ], 'projection' => ['c' => 1], 'readConcern' => new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL), 'skip' => 10, 'sort' => ['b' => -1], ] )); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["a"]=> int(123) } ["options"]=> object(stdClass)#%d (%d) { ["comment"]=> string(3) "foo" ["maxTimeMS"]=> int(500) ["projection"]=> object(stdClass)#%d (%d) { ["c"]=> int(1) } ["skip"]=> int(10) ["sort"]=> object(stdClass)#%d (%d) { ["b"]=> int(-1) } ["limit"]=> int(5) } ["readConcern"]=> array(1) { ["level"]=> string(5) "local" } } ===DONE=== PK.h]]i`tests/bson-regex_error-003.phptnu[--TEST-- MongoDB\BSON\Regex::__construct() does not allow pattern or flags to contain null bytes --DESCRIPTION-- BSON Corpus spec prose test #1 --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Pattern cannot contain null bytes OK: Got MongoDB\Driver\Exception\InvalidArgumentException Flags cannot contain null bytes ===DONE=== PK.h]UV́'tests/bson-int64-serialization-002.phptnu[--TEST-- MongoDB\BSON\Int64 serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(19) "9223372036854775807" } string(71) "O:18:"MongoDB\BSON\Int64":1:{s:7:"integer";s:19:"9223372036854775807";}" object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(19) "9223372036854775807" } object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(20) "-9223372036854775808" } string(72) "O:18:"MongoDB\BSON\Int64":1:{s:7:"integer";s:20:"-9223372036854775808";}" object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(20) "-9223372036854775808" } object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(1) "0" } string(52) "O:18:"MongoDB\BSON\Int64":1:{s:7:"integer";s:1:"0";}" object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(1) "0" } ===DONE=== PK.h]tests/bug0950-001.phptnu[--TEST-- PHPC-950: Segfault killing cursor after subscriber HashTable is destroyed (no subscribers) --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['batchSize' => 2])); /* Exiting during iteration on a live cursor will result in * php_phongo_command_started() being invoked for the killCursor command after * RSHUTDOWN has already destroyed the subscriber HashTable */ foreach ($cursor as $data) { echo "Exiting during first iteration on cursor\n"; exit(0); } ?> ===DONE=== --EXPECT-- Exiting during first iteration on cursor PK.h] /tests/manager-ctor-write_concern-error-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid write concern (w) --FILE-- 1.0]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; /* Note: Values of w < -1 are invalid, but libmongoc's URI string parsing only * logs a warning instead of raising an error (see: CDRIVER-2234), so we cannot * test for this. */ echo throws(function() { create_test_manager(null, ['w' => -2]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer or string for "w" URI option, double given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Unsupported w value: -2 ===DONE=== PK.h]k  !tests/decimal128-3-valid-214.phptnu[--TEST-- Decimal128: [basx345] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000002c3000 {"d":{"$numberDecimal":"1.0E-9"}} 180000001364000a000000000000000000000000002c3000 180000001364000a000000000000000000000000002c3000 ===DONE===PK.h],!tests/decimal128-3-valid-099.phptnu[--TEST-- Decimal128: [basx669] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000002c3000 {"d":{"$numberDecimal":"0E-10"}} 1800000013640000000000000000000000000000002c3000 1800000013640000000000000000000000000000002c3000 ===DONE===PK.h]ֺe!tests/decimal128-3-valid-158.phptnu[--TEST-- Decimal128: [basx151] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000523000 {"d":{"$numberDecimal":"1E+9"}} 180000001364000100000000000000000000000000523000 180000001364000100000000000000000000000000523000 ===DONE===PK.h]HKK.tests/bson-decimal128-set_state_error-001.phptnu[--TEST-- MongoDB\BSON\Decimal128::__set_state() requires "dec" string field --SKIPIF-- --FILE-- 0]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Decimal128 initialization requires "dec" string field ===DONE=== PK.h] %tests/readpreference-getMode-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference::getMode() --FILE-- getMode()); } ?> ===DONE=== --EXPECT-- int(1) int(5) int(2) int(6) int(10) ===DONE=== PK.h]&&#tests/bson-binaryinterface-001.phptnu[--TEST-- MongoDB\BSON\BinaryInterface is implemented by MongoDB\BSON\Binary --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]w33!tests/decimal128-3-valid-162.phptnu[--TEST-- Decimal128: [basx140] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000523000 {"d":{"$numberDecimal":"1E+9"}} 180000001364000100000000000000000000000000523000 ===DONE===PK.h]RR!tests/decimal128-2-valid-074.phptnu[--TEST-- Decimal128: [decq654] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364008096980000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.0000000E+6118"}} 180000001364008096980000000000000000000000fe5f00 ===DONE===PK.h]Τytests/top-parseError-044.phptnu[--TEST-- Top-level document validity: Null byte in $regularExpression options --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]fItests/code-decodeError-001.phptnu[--TEST-- Javascript Code: bad code string length: 0 (but no 0x00 either) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]UL&tests/decimal128-7-parseError-006.phptnu[--TEST-- Decimal128: [basx569] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]sxx)tests/manager-executeReadCommand-003.phptnu[--TEST-- MongoDB\Driver\Manager::executeReadCommand() read concern inheritance --SKIPIF-- --FILE-- 'local']); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$group' => ['_id' => 1]]], 'cursor' => (object) [], ]); (new CommandObserver)->observe( function() use ($manager, $command) { $manager->executeReadCommand(DATABASE_NAME, $command); $manager->executeReadCommand(DATABASE_NAME, $command, [ 'readConcern' => new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE), ]); }, function(stdClass $command) { echo json_encode($command->readConcern), "\n"; } ); ?> ===DONE=== --EXPECT-- {"level":"local"} {"level":"available"} ===DONE=== PK.h]/ stests/dbref-valid-007.phptnu[--TEST-- Document type (DBRef sub-documents): Sub-document resembles DBRef but $id is missing --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 26000000036462726566001a0000000224726566000b000000636f6c6c656374696f6e000000 {"dbref":{"$ref":"collection"}} 26000000036462726566001a0000000224726566000b000000636f6c6c656374696f6e000000 ===DONE===PK.h] Ԣ11!tests/decimal128-2-valid-035.phptnu[--TEST-- Decimal128: [decq700] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 ===DONE===PK.h]-Pv&tests/decimal128-6-parseError-020.phptnu[--TEST-- Decimal128: leading white space negative number --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]aa,tests/bson-timestamp-get_properties-002.phptnu[--TEST-- MongoDB\BSON\Timestamp get_properties handler (foreach) --FILE-- $value) { var_dump($key); var_dump($value); } ?> ===DONE=== --EXPECT-- string(9) "increment" string(4) "1234" string(9) "timestamp" string(4) "5678" ===DONE=== PK.h]6 --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, 4294967296 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, 4294967296 given ===DONE=== PK.h][R??)tests/bson-objectid-getTimestamp-001.phptnu[--TEST-- MongoDB\BSON\ObjectId::getTimestamp --FILE-- getTimestamp(); echo $ts, "\n"; echo date_create( "@{$ts}" )->format( "Y-m-d H:i:s" ), "\n"; ?> --EXPECT-- 1447757782 2015-11-17 10:56:22 PK.h]iT:tests/manager-ctor-disableClientPersistence_error-001.phptnu[--TEST-- MongoDB\Driver\Manager and keyVaultClient must have same disableClientPersistence option --SKIPIF-- --FILE-- [ 'keyVaultClient' => create_test_manager(null), 'keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary(str_repeat('0', 96), 0)]], ], 'disableClientPersistence' => true, ]); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; echo throws(function() { create_test_manager(null, [], [ 'autoEncryption' => [ 'keyVaultClient' => create_test_manager(null, [], ['disableClientPersistence' => true]), 'keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary(str_repeat('0', 96), 0)]], ] ]); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException The "disableClientPersistence" option for a Manager and its "keyVaultClient" must be the same OK: Got MongoDB\Driver\Exception\InvalidArgumentException The "disableClientPersistence" option for a Manager and its "keyVaultClient" must be the same ===DONE=== PK.h]3+tests/readpreference-bsonserialize-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference::bsonSerialize() --FILE-- 'ny']]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, [['dc' => 'ny'], ['dc' => 'sf', 'use' => 'reporting'], []]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => 1000]), ]; foreach ($tests as $test) { echo toJSON(fromPHP($test)), "\n"; } ?> ===DONE=== --EXPECT-- { "mode" : "primary" } { "mode" : "primaryPreferred" } { "mode" : "secondary" } { "mode" : "secondaryPreferred" } { "mode" : "nearest" } { "mode" : "primary" } { "mode" : "secondary", "tags" : [ { "dc" : "ny" } ] } { "mode" : "secondary", "tags" : [ { "dc" : "ny" }, { "dc" : "sf", "use" : "reporting" }, { } ] } { "mode" : "secondary", "maxStalenessSeconds" : 1000 } ===DONE=== PK.h]@&tests/decimal128-7-parseError-064.phptnu[--TEST-- Decimal128: [basx518] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] !tests/decimal128-3-valid-198.phptnu[--TEST-- Decimal128: [basx375] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000004a3000 {"d":{"$numberDecimal":"7E+5"}} 1800000013640007000000000000000000000000004a3000 1800000013640007000000000000000000000000004a3000 ===DONE===PK.h]&tests/decimal128-4-parseError-005.phptnu[--TEST-- Decimal128: [basx568] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]+Q&tests/decimal128-7-parseError-010.phptnu[--TEST-- Decimal128: [basx504] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]B+(tests/bson-minkey-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\MinKey::jsonSerialize() with json_encode() --FILE-- new MongoDB\BSON\MinKey]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$minKey" : 1 } } {"foo":{"$minKey":1}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\MinKey)#%d (%d) { } } ===DONE=== PK.h]K|DD'tests/bson-javascriptinterface-001.phptnu[--TEST-- MongoDB\BSON\JavascriptInterface is implemented by MongoDB\BSON\Javascript --FILE-- 1]); var_dump($javascript instanceof MongoDB\BSON\JavascriptInterface); ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]$P!tests/manager-getservers-001.phptnu[--TEST-- MongoDB\Driver\Manager::getServers() --SKIPIF-- --FILE-- "document"); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert($doc); $wresult = $manager->executeBulkWrite(NS, $bulk); var_dump($manager->getServers()); $servers = $manager->getServers(); foreach($servers as $server) { printf("%s:%d - primary: %d, secondary: %d, arbiter: %d\n", $server->getHost(), $server->getPort(), $server->isPrimary(), $server->isSecondary(), $server->isArbiter()); } ?> ===DONE=== --EXPECTF-- array(3) { [0]=> object(MongoDB\Driver\Server)#%d (%d) { ["host"]=> string(%d) "%s" ["port"]=> int(%d) ["type"]=> int(4) ["is_primary"]=> bool(true) ["is_secondary"]=> bool(false) ["is_arbiter"]=> bool(false) ["is_hidden"]=> bool(false) ["is_passive"]=> bool(false)%A ["last_hello_response"]=> array(%d) { %a } ["round_trip_time"]=> int(%d) } [1]=> object(MongoDB\Driver\Server)#%d (%d) { ["host"]=> string(%d) "%s" ["port"]=> int(%d) ["type"]=> int(5) ["is_primary"]=> bool(false) ["is_secondary"]=> bool(true) ["is_arbiter"]=> bool(false) ["is_hidden"]=> bool(false) ["is_passive"]=> bool(false)%A ["last_hello_response"]=> array(%d) { %a } ["round_trip_time"]=> int(%d) } [2]=> object(MongoDB\Driver\Server)#%d (%d) { ["host"]=> string(%d) "%s" ["port"]=> int(%d) ["type"]=> int(6) ["is_primary"]=> bool(false) ["is_secondary"]=> bool(false) ["is_arbiter"]=> bool(true) ["is_hidden"]=> bool(false) ["is_passive"]=> bool(false) ["last_hello_response"]=> array(%d) { %a } ["round_trip_time"]=> int(%d) } } %s:%d - primary: 1, secondary: 0, arbiter: 0 %s:%d - primary: 0, secondary: 1, arbiter: 0 %s:%d - primary: 0, secondary: 0, arbiter: 1 ===DONE=== PK.h] W'tests/standalone-ssl-no_verify-001.phptnu[--TEST-- Connect to MongoDB with SSL and no host/cert verification --SKIPIF-- --FILE-- true, "weak_cert_validation" => true, ]; $manager = create_test_manager(URI, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); printf("ping: %d\n", $cursor->toArray()[0]->ok); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_invalid_hostname" driver option is deprecated. Please use the "tlsAllowInvalidHostnames" URI option instead.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "weak_cert_validation" driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead.%s ping: 1 ===DONE=== PK.h] 7'tests/cursorinterface-002.phptnu[--TEST-- MongoDB\Driver\CursorInterface extends Traversable --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]M--tests/regex-valid-004.phptnu[--TEST-- Regular Expression type: regex with options (keys reversed) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0f0000000b610061626300696d0000 {"a":{"$regularExpression":{"pattern":"abc","options":"im"}}} 0f0000000b610061626300696d0000 0f0000000b610061626300696d0000 ===DONE===PK.h]W fftests/dbpointer-valid-001.phptnu[--TEST-- DBPointer type (deprecated): DBpointer --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1a0000000c610002000000620056e1fc72e0c917e9c471416100 {"a":{"$dbPointer":{"$ref":"b","$id":{"$oid":"56e1fc72e0c917e9c4714161"}}}} 1a0000000c610002000000620056e1fc72e0c917e9c471416100 ===DONE===PK.h]+=*tests/ini-mock_service_id-phpinfo-001.phptnu[--TEST-- phpinfo() reports mongodb.mock_service_id (default) --FILE-- ===DONE=== --EXPECTF-- %a mongodb.mock_service_id => Off => Off %a ===DONE=== PK.h] ^  !tests/decimal128-3-valid-197.phptnu[--TEST-- Decimal128: [basx393] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000383000 {"d":{"$numberDecimal":"0.0007"}} 180000001364000700000000000000000000000000383000 180000001364000700000000000000000000000000383000 ===DONE===PK.h]1=.tests/bson-javascript-set_state_error-003.phptnu[--TEST-- MongoDB\BSON\Javascript::__set_state() does not allow code to contain null bytes --FILE-- "function foo() { return '\0'; }"]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Code cannot contain null bytes ===DONE=== PK.h]!tests/decimal128-3-valid-265.phptnu[--TEST-- Decimal128: [basx048] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364002c00000000000000000000000000403000 {"d":{"$numberDecimal":"44"}} 180000001364002c00000000000000000000000000403000 180000001364002c00000000000000000000000000403000 ===DONE===PK.h]j P!tests/decimal128-3-valid-180.phptnu[--TEST-- Decimal128: [basx067] examples --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000500000000000000000000000000343000 {"d":{"$numberDecimal":"0.000005"}} 180000001364000500000000000000000000000000343000 180000001364000500000000000000000000000000343000 ===DONE===PK.h](Y&tests/manager-set-uri-options-002.phptnu[--TEST-- MongoDB\Driver\Manager: Connecting to MongoDB using "ssl" from $options --SKIPIF-- --FILE-- array( "verify_peer" => false, "verify_peer_name" => false, "allow_self_signed" => true, ), ); $context = stream_context_create($opts); $options = array( "ssl" => false, "serverselectiontimeoutms" => 100, ); /* The server requires SSL */ $manager = create_test_manager(URI, $options, array("context" => $context)); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(array("my" => "value")); throws(function() use ($manager, $bulk) { $inserted = $manager->executeBulkWrite(NS, $bulk)->getInsertedCount(); printf("Inserted incorrectly: %d\n", $inserted); }, MongoDB\Driver\Exception\ConnectionException::class); $options = array( "ssl" => true, ); $manager = create_test_manager(URI, $options, array("context" => $context)); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(array("my" => "value")); $inserted = $manager->executeBulkWrite(NS, $bulk)->getInsertedCount(); printf("Inserted: %d\n", $inserted); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_self_signed" context driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead.%s OK: Got MongoDB\Driver\Exception\ConnectionException Deprecated: MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_self_signed" context driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead.%s Inserted: 1 ===DONE=== PK.h]wt//,tests/manager-ctor-duplicate-option-003.phptnu[--TEST-- MongoDB\Driver\Manager::__construct() with duplicate write concern option --FILE-- 500, 'wTimeoutMs' => 200]); echo $manager->getWriteConcern()->getWtimeout(), "\n"; ?> ===DONE=== --EXPECT-- 200 ===DONE=== PK.h]s0!tests/decimal128-3-valid-155.phptnu[--TEST-- Decimal128: [basx153] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000523000 {"d":{"$numberDecimal":"1E+9"}} 180000001364000100000000000000000000000000523000 180000001364000100000000000000000000000000523000 ===DONE===PK.h]M  !tests/decimal128-3-valid-299.phptnu[--TEST-- Decimal128: [basx232] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000303000 {"d":{"$numberDecimal":"0.00001265"}} 18000000136400f104000000000000000000000000303000 18000000136400f104000000000000000000000000303000 ===DONE===PK.h]Wc  +tests/writeresult-getinsertedcount-002.phptnu[--TEST-- MongoDB\Driver\WriteResult::getInsertedCount() with unacknowledged write --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(0)); var_dump($result->getInsertedCount()); ?> ===DONE=== --EXPECT-- NULL ===DONE=== PK.h] Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000fedf00 {"d":{"$numberDecimal":"-0E+6111"}} 180000001364000000000000000000000000000000fedf00 180000001364000000000000000000000000000000fedf00 ===DONE===PK.h]-N+tests/session-advanceOperationTime-002.phptnu[--TEST-- MongoDB\Driver\Session::advanceOperationTime() with Timestamp --SKIPIF-- --FILE-- startSession(); echo "Initial operation time of session:\n"; var_dump($session->getOperationTime()); $session->advanceOperationTime(new MongoDB\BSON\Timestamp(5678, 1234)); echo "\nOperation time after advancing session:\n"; var_dump($session->getOperationTime()); ?> ===DONE=== --EXPECTF-- Initial operation time of session: NULL Operation time after advancing session: object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(4) "5678" ["timestamp"]=> string(4) "1234" } ===DONE=== PK.h]_tests/write-error-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeInsert() --SKIPIF-- --FILE-- "Hannes", "country" => "USA", "gender" => "male"); $bulk = new \MongoDB\Driver\BulkWrite(['ordered' => true]); $hannes_id = $bulk->insert($hannes); $w = 2; $wtimeout = 1000; $writeConcern = new \MongoDB\Driver\WriteConcern($w, $wtimeout); echo throws(function() use($bulk, $writeConcern, $manager) { $result = $manager->executeBulkWrite(NS, $bulk, $writeConcern); }, "MongoDB\Driver\Exception\BulkWriteException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\BulkWriteException cannot use 'w' > 1 when a host is not replicated ===DONE=== PK.h]*cc3tests/clientEncryption-createDataKey_error-001.phptnu[--TEST-- MongoDB\Driver\ClientEncryption::createDataKey() with invalid keyAltNames --SKIPIF-- --FILE-- 'foo'], ['keyAltNames' => [0 => []]], ['keyAltNames' => ['foo' => []]], ]; $manager = create_test_manager(); $clientEncryption = $manager->createClientEncryption(['keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary($key, 0)]]]); foreach ($tests as $opts) { echo throws(function () use ($clientEncryption, $opts) { $clientEncryption->createDataKey('local', $opts); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; } ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected keyAltNames to be array, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected keyAltName with index "0" to be string, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected keyAltName with index "foo" to be string, array given ===DONE=== PK.h]v\AAtests/bson-regex-005.phptnu[--TEST-- MongoDB\BSON\Regex initialization will alphabetize flags --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(6) "ilmsux" } ===DONE=== PK.h]l)Œ!tests/decimal128-1-valid-055.phptnu[--TEST-- Decimal128: Clamped --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.0E+6112"}} 180000001364000a00000000000000000000000000fe5f00 180000001364000a00000000000000000000000000fe5f00 ===DONE===PK.h])z  tests/double-valid-002.phptnu[--TEST-- Double type: -1.0 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000016400000000000000f0bf00 {"d":{"$numberDouble":"-1"}} {"d":-1} 10000000016400000000000000f0bf00 {"d":-1} ===DONE===PK.h]LD1tests/query-ctor_error-001.phptnu[--TEST-- MongoDB\Driver\Query construction (invalid readConcern type) --FILE-- $test]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; } ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, %r(double|float)%r given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, bool%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, %r(null|NULL)%r given ===DONE=== PK.h]!]zz-tests/session-startTransaction_error-001.phptnu[--TEST-- MongoDB\Driver\Session::startTransaction() twice --SKIPIF-- --FILE-- startSession(); $session->startTransaction(); echo throws(function() use ($session) { $session->startTransaction(); }, 'MongoDB\Driver\Exception\RuntimeException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\RuntimeException Transaction already in progress ===DONE=== PK.h]HI,,tests/cursor-getmore-004.phptnu[--TEST-- MongoDB\Driver\Cursor command result iteration with batchSize requiring getmore with non-full batches --SKIPIF-- --FILE-- insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $command = new MongoDB\Driver\Command(array( 'aggregate' => COLLECTION_NAME, 'pipeline' => array( array('$match' => new stdClass), ), 'cursor' => array('batchSize' => 2), )); $cursor = $manager->executeCommand(DATABASE_NAME, $command); foreach ($cursor as $i => $document) { printf("%d => {_id: %d}\n", $i, $document->_id); } ?> ===DONE=== --EXPECT-- Inserted: 5 0 => {_id: 0} 1 => {_id: 1} 2 => {_id: 2} 3 => {_id: 3} 4 => {_id: 4} ===DONE=== PK.h]l+!tests/decimal128-3-valid-048.phptnu[--TEST-- Decimal128: [basx134] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000383000 {"d":{"$numberDecimal":"0.0000"}} 180000001364000000000000000000000000000000383000 180000001364000000000000000000000000000000383000 ===DONE===PK.h]7ww&tests/readpreference-getHedge-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference::getHedge() --FILE-- true], (object) ['enabled' => true], ['foo' => 'bar'], ]; foreach ($tests as $test) { $rp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['hedge' => $test]); var_dump($rp->getHedge()); } ?> ===DONE=== --EXPECTF-- NULL object(stdClass)#%d (%d) { ["enabled"]=> bool(true) } object(stdClass)#%d (%d) { ["enabled"]=> bool(true) } object(stdClass)#%d (%d) { ["foo"]=> string(3) "bar" } ===DONE=== PK.h]l >ww!tests/decimal128-3-valid-306.phptnu[--TEST-- Decimal128: [basx031] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640040af0d8648700000000000000000343000 {"d":{"$numberDecimal":"123456789.000000"}} 1800000013640040af0d8648700000000000000000343000 ===DONE===PK.h]%'55!tests/decimal128-3-valid-159.phptnu[--TEST-- Decimal128: [basx142] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000f43000 {"d":{"$numberDecimal":"1E+90"}} 180000001364000100000000000000000000000000f43000 ===DONE===PK.h]]]tests/bson-timestamp-001.phptnu[--TEST-- MongoDB\BSON\Timestamp #001 --FILE-- $timestamp), ); $s = new MongoDB\BSON\Timestamp(1234, 5678); echo $s, "\n"; foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $bson = fromJSON($json); $testagain = toPHP($bson); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- [1234:5678] Test#0 { "timestamp" : { "$timestamp" : { "t" : 5678, "i" : 1234 } } } string(63) "{ "timestamp" : { "$timestamp" : { "t" : 5678, "i" : 1234 } } }" string(63) "{ "timestamp" : { "$timestamp" : { "t" : 5678, "i" : 1234 } } }" bool(true) ===DONE=== PK.h]&m]  tests/datetime-valid-004.phptnu[--TEST-- DateTime: Y10K --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1000000009610000dc1fd277e6000000 {"a":{"$date":{"$numberLong":"253402300800000"}}} 1000000009610000dc1fd277e6000000 ===DONE===PK.h]u*Dc c tests/bug1274-003.phptnu[--TEST-- PHPC-1274: Implicit sessions are not reused from parent process --SKIPIF-- --FILE-- logNamespace = $logNamespace; $this->manager = $manager; $this->pid = getmypid(); } public function executeAndLogSessions(callable $callable) { $this->lsids = []; MongoDB\Driver\Monitoring\addSubscriber($this); call_user_func($callable); MongoDB\Driver\Monitoring\removeSubscriber($this); if (empty($this->lsids)) { return; } $bulk = new MongoDB\Driver\BulkWrite(); foreach ($this->lsids as $lsid) { $bulk->update(['lsid' => $lsid], ['$inc' => ['count' => 1]], ['upsert' => true]); } $this->manager->executeBulkWrite($this->logNamespace, $bulk); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); if (isset($command->lsid)) { $this->lsids[] = $command->lsid; } $commandName = $event->getCommandName(); $process = $this->pid === getmypid() ? 'Parent' : 'Child'; printf("%s executes %s\n", $process, $commandName); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(); $logNamespace = NS . '_sessions'; $sessionLogger = new SessionLogger($manager, $logNamespace); /* This test uses executeBulkWrite() as it's the only execute method that does * not create a cursor. The original patch for PHPC-1274 covered those methods * that return a cursor but omitted executeBulkWrite(). */ $sessionLogger->executeAndLogSessions(function() use ($manager) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk); }); $childPid = pcntl_fork(); if ($childPid === 0) { $sessionLogger->executeAndLogSessions(function() use ($manager) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 2]); $manager->executeBulkWrite(NS, $bulk); }); echo "Child exits\n"; exit; } if ($childPid > 0) { $waitPid = pcntl_waitpid($childPid, $status); if ($waitPid === $childPid) { echo "Parent waited for child to exit\n"; } $query = new MongoDB\Driver\Query([]); $cursor = $manager->executeQuery($logNamespace, $query); printf("Sessions used: %d\n", iterator_count($cursor)); } ?> ===DONE=== --EXPECT-- Parent executes insert Child executes insert Child exits Parent waited for child to exit Sessions used: 2 ===DONE=== PK.h].II!tests/decimal128-2-valid-129.phptnu[--TEST-- Decimal128: [decq746] DPD: one of each of the huffman groups --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001f03000000000000000000000000403000 {"d":{"$numberDecimal":"799"}} 180000001364001f03000000000000000000000000403000 ===DONE===PK.h]!tests/decimal128-3-valid-090.phptnu[--TEST-- Decimal128: [basx646] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000004a3000 {"d":{"$numberDecimal":"0E+5"}} 1800000013640000000000000000000000000000004a3000 1800000013640000000000000000000000000000004a3000 ===DONE===PK.h]pwVV!tests/decimal128-4-valid-010.phptnu[--TEST-- Decimal128: [basx050] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000500000000000000000000000000383000 {"d":{"$numberDecimal":"0.0005"}} 180000001364000500000000000000000000000000383000 ===DONE===PK.h]!tests/decimal128-1-valid-044.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - +infinity --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007800 {"d":{"$numberDecimal":"Infinity"}} 180000001364000000000000000000000000000000007800 180000001364000000000000000000000000000000007800 ===DONE===PK.h]6tests/array-valid-004.phptnu[--TEST-- Array: Single Element Array with index set incorrectly to ab --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($degenerateBson))), "\n"; // Degenerate BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($degenerateBson)), "\n"; ?> ===DONE=== --EXPECT-- 140000000461000c0000001030000a0000000000 {"a":[{"$numberInt":"10"}]} 140000000461000c0000001030000a0000000000 140000000461000c0000001030000a0000000000 {"a":[{"$numberInt":"10"}]} ===DONE===PK.h][_!tests/writeerror-getInfo-001.phptnu[--TEST-- MongoDB\Driver\WriteError::getInfo() --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 1]); try { $manager->executeBulkWrite(NS, $bulk); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { // "errInfo" is rarely populated on a WriteError (e.g. shard version error) var_dump($e->getWriteResult()->getWriteErrors()[0]->getInfo()); } ?> ===DONE=== --EXPECT-- NULL ===DONE=== PK.h]Է@!tests/decimal128-3-valid-096.phptnu[--TEST-- Decimal128: [basx160] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000523000 {"d":{"$numberDecimal":"0E+9"}} 180000001364000000000000000000000000000000523000 180000001364000000000000000000000000000000523000 ===DONE===PK.h]<**!tests/decimal128-3-valid-053.phptnu[--TEST-- Decimal128: [basx295] some more negative zeros [systematic tests below] --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000036b000 {"d":{"$numberDecimal":"-0.00000"}} 18000000136400000000000000000000000000000036b000 18000000136400000000000000000000000000000036b000 ===DONE===PK.h]L7 tests/bug1050-002.phptnu[--TEST-- PHPC-1050: Command cursor should not invoke getMore at execution (rewind omitted) --SKIPIF-- ', '7.99'); ?> --FILE-- getCommandName() !== 'aggregate' && $event->getCommandName() !== 'getMore') { return; } printf("Executing command: %s\n", $event->getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { if ($event->getCommandName() !== 'aggregate' && $event->getCommandName() !== 'getMore') { return; } printf("Executing command took %0.6f seconds\n", $event->getDurationMicros() / 1000000); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(); $cmd = new MongoDB\Driver\Command( [ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$changeStream' => (object) []], ], 'cursor' => (object) [], ], [ 'maxAwaitTimeMS' => 500, ] ); MongoDB\Driver\Monitoring\addSubscriber(new CommandLogger); $cursor = $manager->executeReadCommand(DATABASE_NAME, $cmd); $it = new IteratorIterator($cursor); printf("Current position is valid: %s\n\n", $it->valid() ? 'yes' : 'no'); echo "Advancing cursor\n"; $it->next(); printf("Current position is valid: %s\n\n", $it->valid() ? 'yes' : 'no'); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk); echo "Advancing cursor\n"; $it->next(); printf("Current position is valid: %s\n\n", $it->valid() ? 'yes' : 'no'); $document = $it->current(); if (isset($document)) { printf("Operation type: %s\n", $document->operationType); var_dump($document->fullDocument); } ?> ===DONE=== --EXPECTF-- Executing command: aggregate Executing command took 0.%d seconds Current position is valid: no Advancing cursor Executing command: getMore Executing command took 0.%r(4|5)%r%d seconds Current position is valid: no Advancing cursor Executing command: getMore Executing command took 0.%d seconds Current position is valid: yes Operation type: insert object(stdClass)#%d (%d) { ["_id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } ["x"]=> int(1) } ===DONE=== PK.h]`&zztests/cursor-001.phptnu[--TEST-- Sorting single field, ascending, using the Cursor Iterator --SKIPIF-- --FILE-- array('_id' => 0, 'username' => 1), 'sort' => array('username' => 1), 'limit' => 104, )); $cursor = $manager->executeQuery(NS, $query); foreach ($cursor as $document) { echo $document->username . "\n"; } ?> ===DONE=== --EXPECT-- aaliyah.kertzmann aaron89 abbott.alden abbott.flo abby76 abernathy.adrienne abernathy.audrey abner.kreiger aboehm abshire.icie abshire.jazlyn adams.delta adolph20 adonis.schamberger agleason ahartmann ahettinger akreiger al.cormier al97 albin95 alda.murray alden.blanda alessandra76 alex73 alexa01 alfred.ritchie alia07 alia72 alize.hegmann allie48 alta.sawayn alvena.pacocha alvis22 alycia48 amalia84 amely01 amos.corkery amos78 anahi95 anais.feest anais58 andreanne.steuber angela.dickinson angelina.bartoletti angelina31 aniyah.franecki annalise40 antoinette.gaylord antoinette.weissnat aoberbrunner apacocha apollich ara92 arch44 arely.ryan armstrong.clara armstrong.gordon arnold.kiehn arvel.hilll asatterfield aschuppe ashlynn71 ashlynn85 ashton.o'kon austen03 austen47 austin67 awintheiser awyman ayana.brakus bailey.mertz bailey.sarina balistreri.donald barrett.prohaska bartell.susie bashirian.lina bayer.ova baylee.maggio bbernier bblick beahan.oleta beatty.layne beatty.myrtis beau49 beaulah.mann bechtelar.nadia becker.theron beer.mossie beer.roselyn benedict.johnson berge.enoch bergnaum.roberto bernardo.mccullough bernardo52 bernhard.margaretta bernie.morissette bethel20 betty09 bins.aliyah bins.laisha bjori blanda.danielle blanda.irving ===DONE=== PK.h]:::!tests/decimal128-1-valid-027.phptnu[--TEST-- Decimal128: Scientific - Fractional --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640064000000000000000000000000002cb000 {"d":{"$numberDecimal":"-1.00E-8"}} 1800000013640064000000000000000000000000002cb000 ===DONE===PK.h]E %tests/bulkwrite-update_error-001.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() with invalid replacement document --FILE-- update(['x' => 1], ['' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ["\xc3\x28" => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException invalid argument for replace: empty key OK: Got MongoDB\Driver\Exception\InvalidArgumentException invalid argument for replace: corrupt BSON ===DONE===PK.h]S``tests/timestamp-valid-003.phptnu[--TEST-- Timestamp type: Timestamp with high-order bit set on both seconds and increment --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 10000000116100ffffffffffffffff00 {"a":{"$timestamp":{"t":4294967295,"i":4294967295}}} 10000000116100ffffffffffffffff00 ===DONE===PK.h]g|tests/bson-toJSON-001.phptnu[--TEST-- MongoDB\BSON\toJSON(): Encoding JSON --FILE-- null ], [ 'boolean' => true ], [ 'string' => 'foo' ], [ 'integer' => 123 ], [ 'double' => 1.0, ], /* Note: toJSON() does not properly handle NAN and INF values. * toCanonicalExtendedJSON() or toRelaxedExtendedJSON() should be used * instead. */ [ 'nan' => NAN ], [ 'pos_inf' => INF ], [ 'neg_inf' => -INF ], [ 'array' => [ 'foo', 'bar' ]], [ 'document' => [ 'foo' => 'bar' ]], ]; foreach ($tests as $value) { $bson = fromPHP($value); echo toJSON($bson), "\n"; } ?> ===DONE=== --EXPECTF-- { } { "null" : null } { "boolean" : true } { "string" : "foo" } { "integer" : 123 } { "double" : 1.0 } { "nan" : %r-?nan(\(ind\))?%r } { "pos_inf" : inf } { "neg_inf" : -inf } { "array" : [ "foo", "bar" ] } { "document" : { "foo" : "bar" } } ===DONE=== PK.h]+W !tests/causal-consistency-005.phptnu[--TEST-- Causal consistency: second read's afterClusterTime uses last reply's operationTime --SKIPIF-- --FILE-- lastSeenOperationTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); $manager->executeQuery(NS, $query, ['session' => $session]); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function executeReadAfterWrite() { $this->lastSeenOperationTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); $hasAfterClusterTime = isset($command->readConcern->afterClusterTime); printf("%s command includes afterClusterTime: %s\n", $event->getCommandName(), ($hasAfterClusterTime ? 'yes' : 'no')); if ($hasAfterClusterTime && $this->lastSeenOperationTime !== null) { printf("%s command uses last seen operationTime: %s\n", $event->getCommandName(), ($command->readConcern->afterClusterTime == $this->lastSeenOperationTime) ? 'yes' : 'no'); } } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { $reply = $event->getReply(); $hasOperationTime = isset($reply->operationTime); printf("%s command reply includes operationTime: %s\n", $event->getCommandName(), $hasOperationTime ? 'yes' : 'no'); if ($hasOperationTime) { $this->lastSeenOperationTime = $reply->operationTime; } } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } echo "Testing read after read\n"; (new Test)->executeReadAfterRead(); echo "\nTesting read after write\n"; (new Test)->executeReadAfterWrite(); ?> ===DONE=== --EXPECT-- Testing read after read find command includes afterClusterTime: no find command reply includes operationTime: yes find command includes afterClusterTime: yes find command uses last seen operationTime: yes find command reply includes operationTime: yes Testing read after write insert command includes afterClusterTime: no insert command reply includes operationTime: yes find command includes afterClusterTime: yes find command uses last seen operationTime: yes find command reply includes operationTime: yes ===DONE=== PK.h]tests/bug0146-002.phptnu[--TEST-- PHPC-146: ReadPreference primaryPreferred and secondary swapped (find command) --SKIPIF-- --FILE-- insert(array('my' => 'document')); $manager->executeBulkWrite(NS, $bulk); $rps = array( MongoDB\Driver\ReadPreference::RP_PRIMARY, MongoDB\Driver\ReadPreference::RP_PRIMARY_PREFERRED, MongoDB\Driver\ReadPreference::RP_SECONDARY, MongoDB\Driver\ReadPreference::RP_SECONDARY_PREFERRED, MongoDB\Driver\ReadPreference::RP_NEAREST, ); foreach($rps as $r) { $rp = new MongoDB\Driver\ReadPreference($r); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array("my" => "query")), $rp); var_dump($cursor); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(26) "readPreference_bug0146_002" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["my"]=> string(5) "query" } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } ["session"]=> NULL ["isDead"]=> bool(true) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(26) "readPreference_bug0146_002" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["my"]=> string(5) "query" } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } ["session"]=> NULL ["isDead"]=> bool(true) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(26) "readPreference_bug0146_002" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["my"]=> string(5) "query" } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } ["session"]=> NULL ["isDead"]=> bool(true) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(26) "readPreference_bug0146_002" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["my"]=> string(5) "query" } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } ["session"]=> NULL ["isDead"]=> bool(true) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(26) "readPreference_bug0146_002" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["my"]=> string(5) "query" } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "nearest" } ["session"]=> NULL ["isDead"]=> bool(true) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } ===DONE=== PK.h]1o22!tests/causal-consistency-008.phptnu[--TEST-- Causal consistency: default read concern includes afterClusterTime but not level --SKIPIF-- --FILE-- observe( function() { $manager = create_test_manager(); $session = $manager->startSession(); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); $manager->executeQuery(NS, $query, ['session' => $session]); }, function(stdClass $command) { $hasAfterClusterTime = isset($command->readConcern->afterClusterTime); printf("Read concern includes afterClusterTime: %s\n", ($hasAfterClusterTime ? 'yes' : 'no')); $hasLevel = isset($command->readConcern->level); printf("Read concern includes level: %s\n", ($hasLevel ? 'yes' : 'no')); } ); ?> ===DONE=== --EXPECT-- Read concern includes afterClusterTime: no Read concern includes level: no Read concern includes afterClusterTime: yes Read concern includes level: no ===DONE=== PK.h] 拉,tests/server-executeBulkWrite_error-002.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() with invalid options --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); echo throws(function() use ($server) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $server->executeBulkWrite(NS, $bulk, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $server->executeBulkWrite(NS, $bulk, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $server->executeBulkWrite(NS, $bulk, ['writeConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $server->executeBulkWrite(NS, $bulk, ['writeConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given ===DONE=== PK.h]m!tests/decimal128-3-valid-259.phptnu[--TEST-- Decimal128: [basx192] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000002c3000 {"d":{"$numberDecimal":"1.265E-7"}} 18000000136400f1040000000000000000000000002c3000 18000000136400f1040000000000000000000000002c3000 ===DONE===PK.h]y>>!tests/decimal128-2-valid-007.phptnu[--TEST-- Decimal128: [decq154] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400d20400000000000000000000000040b000 {"d":{"$numberDecimal":"-1234"}} 18000000136400d20400000000000000000000000040b000 ===DONE===PK.h]_!tests/decimal128-2-valid-051.phptnu[--TEST-- Decimal128: [decq608] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000040eaed7446d09c2c9f0c00fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000000000000E+6141"}} 1800000013640000000040eaed7446d09c2c9f0c00fe5f00 ===DONE===PK.h]$ !tests/decimal128-3-valid-196.phptnu[--TEST-- Decimal128: [basx377] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000483000 {"d":{"$numberDecimal":"7E+4"}} 180000001364000700000000000000000000000000483000 180000001364000700000000000000000000000000483000 ===DONE===PK.h]M+!tests/decimal128-1-valid-011.phptnu[--TEST-- Decimal128: Special - Invalid representation treated as 0E3 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffffffffffffffffffffffffff116c00 {"d":{"$numberDecimal":"0E+3"}} ===DONE===PK.h]tests/command-ctor-001.phptnu[--TEST-- MongoDB\Driver\Command construction should always encode __pclass for Persistable objects --SKIPIF-- --FILE-- id = $id; $this->child = $child; } public function bsonSerialize() { return [ '_id' => $this->id, 'child' => $this->child, ]; } public function bsonUnserialize(array $data) { $this->id = $data['_id']; $this->child = $data['child']; } } $manager = create_test_manager(); $document = new MyClass('foo', new MyClass('bar', new MyClass('baz'))); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['_id' => 'foo'], 'update' => $document, 'upsert' => true, 'new' => true, ])); var_dump($cursor->toArray()[0]->value); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$match' => $document], ], 'cursor' => new stdClass(), ])); var_dump($cursor->toArray()[0]); ?> ===DONE=== --EXPECTF-- object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "foo" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "bar" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "baz" ["child":"MyClass":private]=> NULL } } } object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "foo" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "bar" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "baz" ["child":"MyClass":private]=> NULL } } } ===DONE=== PK.h]tests/binary-valid-006.phptnu[--TEST-- Binary type: subtype 0x03 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1d000000057800100000000373ffd26444b34c6990e8e7d1dfc035d400 {"x":{"$binary":{"base64":"c\/\/SZESzTGmQ6OfR38A11A==","subType":"03"}}} 1d000000057800100000000373ffd26444b34c6990e8e7d1dfc035d400 ===DONE===PK.h]oG%%*tests/bson-objectid-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\ObjectId::jsonSerialize() return value --FILE-- jsonSerialize()); ?> ===DONE=== --EXPECT-- array(1) { ["$oid"]=> string(24) "5820ca4bef62d52d9924d0d8" } ===DONE=== PK.h]G~tests/top-parseError-042.phptnu[--TEST-- Top-level document validity: Null byte in sub-document key --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]*wtests/bug1839-005.phptnu[--TEST-- PHPC-1839: Referenced, out-of-scope, non-interned string in typeMap (PHP >= 8.1) --SKIPIF-- --FILE-- &$rootValue, 'document' => &$documentValue]; return $typemap; } $typemap = createTypemap(); $bson = MongoDB\BSON\fromPhp((object) []); echo "Before:\n"; debug_zval_dump($typemap); MongoDB\BSON\toPHP($bson, $typemap); echo "After:\n"; debug_zval_dump($typemap); ?> ===DONE=== --EXPECT-- Before: array(2) refcount(2){ ["root"]=> reference refcount(1) { string(5) "array" refcount(1) } ["document"]=> reference refcount(1) { string(5) "array" refcount(1) } } After: array(2) refcount(2){ ["root"]=> reference refcount(1) { string(5) "array" refcount(1) } ["document"]=> reference refcount(1) { string(5) "array" refcount(1) } } ===DONE=== PK.h]A%tests/bulkwrite-delete_error-001.phptnu[--TEST-- MongoDB\Driver\BulkWrite::delete() with invalid options --FILE-- delete(['x' => 1], ['collation' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->delete(['x' => 1], ['hint' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "collation" option to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "hint" option to be string, array, or object, int%S given ===DONE=== PK.h]kf!tests/decimal128-3-valid-160.phptnu[--TEST-- Decimal128: [basx147] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000f43000 {"d":{"$numberDecimal":"1E+90"}} 180000001364000100000000000000000000000000f43000 180000001364000100000000000000000000000000f43000 ===DONE===PK.h]|!tests/decimal128-1-valid-043.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - nAn --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007c00 {"d":{"$numberDecimal":"NaN"}} 180000001364000000000000000000000000000000007c00 180000001364000000000000000000000000000000007c00 ===DONE===PK.h]Xtests/top-parseError-013.phptnu[--TEST-- Top-level document validity: Bad $numberDouble (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]IB B 3tests/server-executeReadWriteCommand_error-001.phptnu[--TEST-- MongoDB\Driver\Server::executeReadWriteCommand() with invalid options --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY)); $command = new MongoDB\Driver\Command(['ping' => 1]); echo throws(function() use ($server, $command) { $server->executeReadWriteCommand(DATABASE_NAME, $command, ['readConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeReadWriteCommand(DATABASE_NAME, $command, ['readConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeReadWriteCommand(DATABASE_NAME, $command, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeReadWriteCommand(DATABASE_NAME, $command, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeReadWriteCommand(DATABASE_NAME, $command, ['writeConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeReadWriteCommand(DATABASE_NAME, $command, ['writeConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given ===DONE=== PK.h]j<tests/int64-valid-002.phptnu[--TEST-- Int64 type: MaxValue --SKIPIF-- --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000126100ffffffffffffff7f00 {"a":{"$numberLong":"9223372036854775807"}} {"a":9223372036854775807} 10000000126100ffffffffffffff7f00 {"a":9223372036854775807} ===DONE===PK.h]٠)tests/server-executeWriteCommand-003.phptnu[--TEST-- MongoDB\Driver\Server::executeWriteCommand() write concern inheritance --SKIPIF-- --FILE-- 2, 'wtimeoutms' => 1000]); $server = $manager->selectServer(new MongoDB\Driver\ReadPreference('primary')); $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['x' => 1], 'upsert' => true, 'new' => true, 'update' => ['$inc' => ['x' => 1]], ]); (new CommandObserver)->observe( function() use ($server, $command) { $server->executeWriteCommand(DATABASE_NAME, $command); $server->executeWriteCommand(DATABASE_NAME, $command, ['writeConcern' => new MongoDB\Driver\WriteConcern(1)]); }, function(stdClass $command) { echo json_encode($command->writeConcern), "\n"; } ); ?> ===DONE=== --EXPECT-- {"w":2,"wtimeout":1000} {"w":1} ===DONE=== PK.h]#dd)tests/bson-binary-get_properties-002.phptnu[--TEST-- MongoDB\BSON\Binary get_properties handler (foreach) --FILE-- $value) { var_dump($key); var_dump($value); } ?> ===DONE=== --EXPECT-- string(4) "data" string(6) "foobar" string(4) "type" int(0) ===DONE=== PK.h]< tests/retryable-writes-001.phptnu[--TEST-- Retryable writes: supported single-statement operations include transaction IDs --SKIPIF-- --FILE-- getCommand(); $hasTransactionId = isset($command->lsid) && isset($command->txnNumber); printf("%s command includes transaction ID: %s\n", $event->getCommandName(), $hasTransactionId ? 'yes' : 'no'); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $observer = new TransactionIdObserver; MongoDB\Driver\Monitoring\addSubscriber($observer); $manager = create_test_manager(); echo "Testing deleteOne\n"; $bulk = new MongoDB\Driver\BulkWrite; $bulk->delete(['x' => 1], ['limit' => 1]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting insertOne\n"; $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting replaceOne\n"; $bulk = new MongoDB\Driver\BulkWrite; $bulk->update(['x' => 1], ['x' => 2]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting updateOne\n"; $bulk = new MongoDB\Driver\BulkWrite; $bulk->update(['x' => 1], ['$inc' => ['x' => 1]]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting findAndModify\n"; $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['x' => 1], 'update' => ['$inc' => ['x' => 1]], ]); $manager->executeReadWriteCommand(DATABASE_NAME, $command); MongoDB\Driver\Monitoring\removeSubscriber($observer); ?> ===DONE=== --EXPECT-- Testing deleteOne delete command includes transaction ID: yes Testing insertOne insert command includes transaction ID: yes Testing replaceOne update command includes transaction ID: yes Testing updateOne update command includes transaction ID: yes Testing findAndModify findAndModify command includes transaction ID: yes ===DONE=== PK.h]Z-tests/session-startTransaction_error-007.phptnu[--TEST-- MongoDB\Driver\Session::startTransaction() throws an error on sharded clusters < 4.2 --SKIPIF-- =', '4.2'); ?> --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=== PK.h]'Y  tests/bug0545.phptnu[--TEST-- PHPC-545: Update does not serialize embedded Persistable's __pclass field --SKIPIF-- --FILE-- $value) { $this->{$name} = $value; } } } class Page implements MongoDB\BSON\Persistable { public function bsonSerialize() { $data = get_object_vars($this); return $data; } public function bsonUnserialize(array $data) { foreach ($data as $name => $value) { $this->{$name} = $value; } } } // Aux $manager = create_test_manager(); $wc = new MongoDB\Driver\WriteConcern(MongoDB\Driver\WriteConcern::MAJORITY); // Create $book = new Book(); $book->title = 'Unnameable'; $book->pages = []; $page1 = new Page(); $page1->content = 'Lorem ipsum'; $book->pages[] = $page1; $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert($book); $result = $manager->executeBulkWrite(NS, $bulk, $wc); printf("Inserted %d document(s)\n", $result->getInsertedCount()); // Read $query = new MongoDB\Driver\Query(['title' => $book->title]); $cursor = $manager->executeQuery(NS, $query); $bookAfterInsert = $cursor->toArray()[0]; // Update $bookAfterInsert->description = 'An interesting document'; $page2 = new Page(); $page2->content = 'Dolor sit amet'; $bookAfterInsert->pages[] = $page2; $bulk = new MongoDB\Driver\BulkWrite; $bulk->update(['title' => $bookAfterInsert->title], $bookAfterInsert); $result = $manager->executeBulkWrite(NS, $bulk, $wc); printf("Modified %d document(s)\n", $result->getModifiedCount()); // Read (again) $query = new MongoDB\Driver\Query(['title' => $bookAfterInsert->title]); $cursor = $manager->executeQuery(NS, $query); $bookAfterUpdate = $cursor->toArray()[0]; var_dump($bookAfterUpdate); ?> ===DONE=== --EXPECTF-- Inserted 1 document(s) Modified 1 document(s) object(Book)#%d (%d) { ["_id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%s" } ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(4) "Book" ["type"]=> int(%d) } ["title"]=> string(10) "Unnameable" ["pages"]=> array(2) { [0]=> object(Page)#%d (%d) { ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(4) "Page" ["type"]=> int(%d) } ["content"]=> string(11) "Lorem ipsum" } [1]=> object(Page)#%d (%d) { ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(4) "Page" ["type"]=> int(%d) } ["content"]=> string(14) "Dolor sit amet" } } ["description"]=> string(23) "An interesting document" } ===DONE=== PK.h]Bp!tests/symbol-decodeError-007.phptnu[--TEST-- Symbol: invalid UTF-8 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]a>((tests/timestamp-valid-001.phptnu[--TEST-- Timestamp type: Timestamp: (123456789, 42) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 100000001161002a00000015cd5b0700 {"a":{"$timestamp":{"t":123456789,"i":42}}} 100000001161002a00000015cd5b0700 ===DONE===PK.h]2s**'tests/code_w_scope-decodeError-009.phptnu[--TEST-- Javascript Code with Scope: bad code string: negative length --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]Zg>\\.tests/manager-executeReadWriteCommand-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeReadWriteCommand() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$group' => ['_id' => 1]], /* Note: $out cannot be used in a transaction. This is technically not a * write command, but it works for the purposes of this test. */ ], 'cursor' => (object) [] ]); $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['session' => $session]); $pinnedServer = $session->getServer(); var_dump($pinnedServer instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); $session->commitTransaction(); var_dump($session->getServer() == $pinnedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(false) bool(false) bool(true) bool(true) bool(false) ===DONE=== PK.h]mҨHHtests/dbref-valid-006.phptnu[--TEST-- Document type (DBRef sub-documents): DBRef with additional dollar-prefixed and dotted fields --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 48000000036462726566003c0000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e10612e62000100000010246300010000000000 {"dbref":{"$ref":"collection","$id":{"$oid":"58921b3e6e32ab156a22b59e"},"a.b":{"$numberInt":"1"},"$c":{"$numberInt":"1"}}} 48000000036462726566003c0000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e10612e62000100000010246300010000000000 ===DONE===PK.h]Ltests/top-parseError-032.phptnu[--TEST-- Top-level document validity: Bad $date (number, not string or hash) --XFAIL-- Legacy extended JSON $date syntax uses numbers (CDRIVER-2223) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]"l2&tests/decimal128-6-parseError-027.phptnu[--TEST-- Decimal128: Invalid --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]Pl--!tests/decimal128-3-valid-181.phptnu[--TEST-- Decimal128: [basx069] examples --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000500000000000000000000000000323000 {"d":{"$numberDecimal":"5E-7"}} 180000001364000500000000000000000000000000323000 ===DONE===PK.h].>"ss'tests/bson-regex-jsonserialize-004.phptnu[--TEST-- MongoDB\BSON\Regex::jsonSerialize() with json_encode() (with flags) --FILE-- new MongoDB\BSON\Regex('pattern', 'i')]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$regex" : "pattern", "$options" : "i" } } {"foo":{"$regex":"pattern","$options":"i"}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(7) "pattern" ["flags"]=> string(1) "i" } } ===DONE=== PK.h]9gII!tests/decimal128-2-valid-128.phptnu[--TEST-- Decimal128: [decq742] DPD: one of each of the huffman groups --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001303000000000000000000000000403000 {"d":{"$numberDecimal":"787"}} 180000001364001303000000000000000000000000403000 ===DONE===PK.h]Oc!! tests/cursorid-tostring-001.phptnu[--TEST-- MongoDB\Driver\CursorId::__toString() --FILE-- ===DONE=== --EXPECT-- string(19) "7250031947823432848" ===DONE=== PK.h]& tests/int64-decodeError-001.phptnu[--TEST-- Int64 type: int64 field truncated --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]rd88'tests/code_w_scope-decodeError-008.phptnu[--TEST-- Javascript Code with Scope: bad code string: length too long (clips scope) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]ϔtests/datetime-valid-003.phptnu[--TEST-- DateTime: negative --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000096100c33ce7b9bdffffff00 {"a":{"$date":{"$numberLong":"-284643869501"}}} {"a":{"$date":{"$numberLong":"-284643869501"}}} 10000000096100c33ce7b9bdffffff00 {"a":{"$date":{"$numberLong":"-284643869501"}}} ===DONE===PK.h]&R_..-tests/commandexception-haserrorlabel-001.phptnu[--TEST-- MongoDB\Driver\Exception\CommandException::hasErrorLabel() --FILE-- getProperty('errorLabels'); $resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('foo')); var_dump($exception->hasErrorLabel('bar')); ?> ===DONE=== --EXPECT-- bool(true) bool(false) ===DONE=== PK.h]tests/bson-objectid-002.phptnu[--TEST-- MongoDB\BSON\ObjectId #002 generates ObjectId for null or missing constructor argument --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } ===DONE=== PK.h]yNtests/bson-int64-001.phptnu[--TEST-- MongoDB\BSON\Int64 roundtripped through BSON on 32-bit platforms --SKIPIF-- --FILE-- unserialize('C:18:"MongoDB\BSON\Int64":47:{a:1:{s:7:"integer";s:19:"9223372036854775807";}}')], (object) ['int64' => unserialize('C:18:"MongoDB\BSON\Int64":48:{a:1:{s:7:"integer";s:20:"-9223372036854775808";}}')], (object) ['int64' => unserialize('C:18:"MongoDB\BSON\Int64":38:{a:1:{s:7:"integer";s:10:"2147483648";}}')], (object) ['int64' => unserialize('C:18:"MongoDB\BSON\Int64":39:{a:1:{s:7:"integer";s:11:"-2147483649";}}')], ]; foreach($tests as $test) { $bson = fromPHP($test); $testRoundtripped = toPHP($bson); $bsonRoundtripped = fromPHP($testRoundtripped); var_dump($test->int64 instanceof MongoDB\BSON\Int64); var_dump($testRoundtripped->int64 instanceof MongoDB\BSON\Int64); var_dump(toJSON($bson), toJSON($bsonRoundtripped)); var_dump($test == $testRoundtripped); echo "\n"; } ?> ===DONE=== --EXPECT-- bool(true) bool(true) string(33) "{ "int64" : 9223372036854775807 }" string(33) "{ "int64" : 9223372036854775807 }" bool(true) bool(true) bool(true) string(34) "{ "int64" : -9223372036854775808 }" string(34) "{ "int64" : -9223372036854775808 }" bool(true) bool(true) bool(true) string(24) "{ "int64" : 2147483648 }" string(24) "{ "int64" : 2147483648 }" bool(true) bool(true) bool(true) string(25) "{ "int64" : -2147483649 }" string(25) "{ "int64" : -2147483649 }" bool(true) ===DONE=== PK.h]t!tests/decimal128-3-valid-016.phptnu[--TEST-- Decimal128: [basx603] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000323000 {"d":{"$numberDecimal":"0E-7"}} 180000001364000000000000000000000000000000323000 180000001364000000000000000000000000000000323000 ===DONE===PK.h]ZZ!tests/decimal128-4-valid-008.phptnu[--TEST-- Decimal128: [basx052] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000500000000000000000000000000343000 {"d":{"$numberDecimal":"0.000005"}} 180000001364000500000000000000000000000000343000 ===DONE===PK.h]\@bb&tests/server-executeBulkWrite-002.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() with write concern (standalone) --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); $writeConcerns = array(0, 1); foreach ($writeConcerns as $writeConcern) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array('wc' => $writeConcern)); $result = $primary->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern($writeConcern)); var_dump($result->isAcknowledged()); var_dump($result->getInsertedCount()); } ?> ===DONE=== --EXPECT-- bool(false) NULL bool(true) int(1) ===DONE=== PK.h]j#!tests/decimal128-2-valid-021.phptnu[--TEST-- Decimal128: [decq174] Nmin and below --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000a5bc138938d44c64d31008000 {"d":{"$numberDecimal":"-1.000000000000000000000000000000000E-6143"}} 18000000136400000000000a5bc138938d44c64d31008000 ===DONE===PK.h]&%tests/session-getClusterTime-001.phptnu[--TEST-- MongoDB\Driver\Session::getClusterTime() --SKIPIF-- --FILE-- startSession(); echo "Initial cluster time:\n"; var_dump($session->getClusterTime()); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); echo "\nCluster time after command:\n"; var_dump($session->getClusterTime()); ?> ===DONE=== --EXPECTF-- Initial cluster time: NULL Cluster time after command: object(stdClass)#%d (%d) { ["clusterTime"]=> object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(%d) "%d" ["timestamp"]=> string(%d) "%d" } ["signature"]=> %a } ===DONE=== PK.h]!tests/decimal128-3-valid-089.phptnu[--TEST-- Decimal128: [basx665] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000343000 {"d":{"$numberDecimal":"0.000000"}} 180000001364000000000000000000000000000000343000 180000001364000000000000000000000000000000343000 ===DONE===PK.h]wtests/regex-valid-008.phptnu[--TEST-- Regular Expression type: Regular expression as value of $regex query operator --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000000b247265676578007061747465726e0069780000 {"$regex":{"$regularExpression":{"pattern":"pattern","options":"ix"}}} 180000000b247265676578007061747465726e0069780000 ===DONE===PK.h]N? VVtests/code-valid-005.phptnu[--TEST-- Javascript Code: three-byte UTF-8 (☆) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000d61000d000000e29886e29886e29886e298860000 {"a":{"$code":"\u2606\u2606\u2606\u2606"}} 190000000d61000d000000e29886e29886e29886e298860000 ===DONE===PK.h].׈vv$tests/bson-decimal128_error-001.phptnu[--TEST-- MongoDB\BSON\Decimal128 requires valid decimal string --SKIPIF-- =', '7.99'); ?> --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException %SMongoDB\BSON\Decimal128::__construct()%sstring, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing Decimal128 string: foo ===DONE=== PK.h]  'tests/monitoring-addSubscriber-002.phptnu[--TEST-- MongoDB\Driver\Monitoring\addSubscriber(): Adding two subscribers --SKIPIF-- --FILE-- instanceName = $instanceName; } public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event ) { echo "- ({$this->instanceName}) - started: ", $event->getCommandName(), "\n"; } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $query = new MongoDB\Driver\Query( [] ); $subscriber1 = new MySubscriber( "ONE" ); $subscriber2 = new MySubscriber( "TWO" ); echo "Before addSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber1 ); echo "After addSubscriber (ONE)\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber2 ); echo "After addSubscriber (TWO)\n"; $cursor = $m->executeQuery( "demo.test", $query ); ?> --EXPECT-- Before addSubscriber After addSubscriber (ONE) - (ONE) - started: find After addSubscriber (TWO) - (ONE) - started: find - (TWO) - started: find PK.h]ZuKK!tests/decimal128-5-valid-018.phptnu[--TEST-- Decimal128: [decq180] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000008000 {"d":{"$numberDecimal":"-1.0E-6175"}} 180000001364000a00000000000000000000000000008000 ===DONE===PK.h]s&tests/decimal128-7-parseError-057.phptnu[--TEST-- Decimal128: [basx560] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]!tests/bson-toRelaxedJSON-001.phptnu[--TEST-- MongoDB\BSON\toRelaxedExtendedJSON(): Encoding JSON --FILE-- null ], [ 'boolean' => true ], [ 'string' => 'foo' ], [ 'integer' => 123 ], [ 'double' => 1.0, ], [ 'nan' => NAN ], [ 'pos_inf' => INF ], [ 'neg_inf' => -INF ], [ 'array' => [ 'foo', 'bar' ]], [ 'document' => [ 'foo' => 'bar' ]], ]; foreach ($tests as $value) { $bson = fromPHP($value); echo toRelaxedExtendedJSON($bson), "\n"; } ?> ===DONE=== --EXPECT-- { } { "null" : null } { "boolean" : true } { "string" : "foo" } { "integer" : 123 } { "double" : 1.0 } { "nan" : { "$numberDouble" : "NaN" } } { "pos_inf" : { "$numberDouble" : "Infinity" } } { "neg_inf" : { "$numberDouble" : "-Infinity" } } { "array" : [ "foo", "bar" ] } { "document" : { "foo" : "bar" } } ===DONE=== PK.h]  !tests/decimal128-3-valid-224.phptnu[--TEST-- Decimal128: [basx319] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000463000 {"d":{"$numberDecimal":"1.0E+4"}} 180000001364000a00000000000000000000000000463000 180000001364000a00000000000000000000000000463000 ===DONE===PK.h]<e)tests/manager-executeReadCommand-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeReadCommand() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$group' => ['_id' => 1]]], 'cursor' => (object) [] ]); $manager->executeReadCommand(DATABASE_NAME, $command, ['session' => $session]); $pinnedServer = $session->getServer(); var_dump($pinnedServer instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); $session->commitTransaction(); var_dump($session->getServer() == $pinnedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(false) bool(false) bool(true) bool(true) bool(false) ===DONE=== PK.h]u4((tests/bug1151-003.phptnu[--TEST-- PHPC-1151: Segfault if session unset before cursor is killed (find) --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $session = $manager->startSession(); $cursor = $manager->executeQuery(NS, $query, ['session' => $session]); unset($session); unset($cursor); ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]k#QQtests/manager-ctor-003.phptnu[--TEST-- MongoDB\Driver\Manager::__construct() URI defaults to "mongodb://127.0.0.1/" --FILE-- ===DONE=== --EXPECTF-- [%s] PHONGO: DEBUG > Connection string: 'mongodb://127.0.0.1/' %A ===DONE=== PK.h]".??!tests/decimal128-3-valid-203.phptnu[--TEST-- Decimal128: [basx399] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000323000 {"d":{"$numberDecimal":"7E-7"}} 180000001364000700000000000000000000000000323000 ===DONE===PK.h]bvv%tests/manager-executeCommand-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() takes a read preference in options array --SKIPIF-- --FILE-- 1]); $cursor = $manager->executeCommand(DATABASE_NAME, $command, ['readPreference' => $primary]); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; echo "Testing secondary:\n"; $command = new MongoDB\Driver\Command(['ping' => 1]); $cursor = $manager->executeCommand(DATABASE_NAME, $command, ['readPreference' => $secondary]); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; ?> ===DONE=== --EXPECTF-- Testing primary: is_primary: true is_secondary: false Testing secondary: is_primary: false is_secondary: true ===DONE=== PK.h]J!yy!tests/decimal128-1-valid-023.phptnu[--TEST-- Decimal128: Scientific - Tiniest --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffffff638e8d37c087adbe09ed010000 {"d":{"$numberDecimal":"9.999999999999999999999999999999999E-6143"}} 18000000136400ffffffff638e8d37c087adbe09ed010000 ===DONE===PK.h]y۵'tests/bson-timestamp-set_state-002.phptnu[--TEST-- MongoDB\BSON\Timestamp::__set_state() (64-bit) --SKIPIF-- --FILE-- $increment, 'timestamp' => $timestamp, ])); echo "\n\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\BSON\Timestamp::__set_state(array( %w'increment' => '4294967295', %w'timestamp' => '0', )) MongoDB\BSON\Timestamp::__set_state(array( %w'increment' => '0', %w'timestamp' => '4294967295', )) ===DONE=== PK.h]JII!tests/decimal128-2-valid-140.phptnu[--TEST-- Decimal128: [decq744] DPD: one of each of the huffman groups --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400e503000000000000000000000000403000 {"d":{"$numberDecimal":"997"}} 18000000136400e503000000000000000000000000403000 ===DONE===PK.h]R_TT!tests/decimal128-3-valid-262.phptnu[--TEST-- Decimal128: [basx042] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400fc040000000000000000000000003c3000 {"d":{"$numberDecimal":"12.76"}} 18000000136400fc040000000000000000000000003c3000 ===DONE===PK.h]kn!tests/decimal128-3-valid-147.phptnu[--TEST-- Decimal128: [basx261] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000403000 {"d":{"$numberDecimal":"1265"}} 18000000136400f104000000000000000000000000403000 18000000136400f104000000000000000000000000403000 ===DONE===PK.h]9 &tests/decimal128-4-parseError-010.phptnu[--TEST-- Decimal128: [dqbsr534] negatives (Rounded & Inexact) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]")tests/writeresult-isacknowledged-003.phptnu[--TEST-- MongoDB\Driver\WriteResult::isAcknowledged() with custom WriteConcern --SKIPIF-- --FILE-- insert(array('x' => 2)); $result = $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(0)); printf("WriteResult::isAcknowledged(): %s\n", $result->isAcknowledged() ? 'true' : 'false'); var_dump($result); ?> ===DONE=== --EXPECTF-- WriteResult::isAcknowledged(): false object(MongoDB\Driver\WriteResult)#%d (%d) { ["nInserted"]=> NULL ["nMatched"]=> NULL ["nModified"]=> NULL ["nRemoved"]=> NULL ["nUpserted"]=> NULL ["upsertedIds"]=> array(0) { } ["writeErrors"]=> array(0) { } ["writeConcernError"]=> NULL ["writeConcern"]=> object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } } ===DONE=== PK.h]̼r+tests/bson-dbpointer-serialization-001.phptnu[--TEST-- MongoDB\BSON\DBPointer serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- dbref; var_dump($test); var_dump($s = serialize($test)); var_dump(unserialize($s)); echo "\n"; ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\DBPointer)#1 (2) { ["ref"]=> string(11) "phongo.test" ["id"]=> string(24) "5a2e78accd485d55b4050000" } string(111) "C:22:"MongoDB\BSON\DBPointer":76:{a:2:{s:3:"ref";s:11:"phongo.test";s:2:"id";s:24:"5a2e78accd485d55b4050000";}}" object(MongoDB\BSON\DBPointer)#2 (2) { ["ref"]=> string(11) "phongo.test" ["id"]=> string(24) "5a2e78accd485d55b4050000" } ===DONE=== PK.h]IIHH!tests/decimal128-1-valid-007.phptnu[--TEST-- Decimal128: Special - Canonical Positive Infinity --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007800 {"d":{"$numberDecimal":"Infinity"}} 180000001364000000000000000000000000000000007800 ===DONE===PK.h]܃F tests/binary-parseError-003.phptnu[--TEST-- Binary type: $uuid invalid value--too long --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]f!tests/decimal128-3-valid-294.phptnu[--TEST-- Decimal128: [basx239] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000443000 {"d":{"$numberDecimal":"1.265E+5"}} 18000000136400f104000000000000000000000000443000 18000000136400f104000000000000000000000000443000 ===DONE===PK.h]^j.tests/readconcern-serialization_error-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern unserialization errors (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadConcern initialization requires "level" string field ===DONE===PK.h]>qtests/binary-valid-002.phptnu[--TEST-- Binary type: subtype 0x00 (Zero-length, keys reversed) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0d000000057800000000000000 {"x":{"$binary":{"base64":"","subType":"00"}}} 0d000000057800000000000000 0d000000057800000000000000 ===DONE===PK.h] !tests/decimal128-3-valid-283.phptnu[--TEST-- Decimal128: [basx221] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000463000 {"d":{"$numberDecimal":"1.265E+6"}} 18000000136400f104000000000000000000000000463000 18000000136400f104000000000000000000000000463000 ===DONE===PK.h]t#tests/readconcern-getlevel-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern::getLevel() --FILE-- getLevel()); } ?> ===DONE=== --EXPECT-- NULL string(5) "local" string(8) "majority" string(17) "not-yet-supported" ===DONE=== PK.h]Ltests/top-parseError-014.phptnu[--TEST-- Top-level document validity: Bad $numberDecimal (number, not string) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]Ttests/binary-valid-007.phptnu[--TEST-- Binary type: subtype 0x04 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1d000000057800100000000473ffd26444b34c6990e8e7d1dfc035d400 {"x":{"$binary":{"base64":"c\/\/SZESzTGmQ6OfR38A11A==","subType":"04"}}} 1d000000057800100000000473ffd26444b34c6990e8e7d1dfc035d400 ===DONE===PK.h]Ct!tests/decimal128-1-valid-005.phptnu[--TEST-- Decimal128: Special - Negative SNaN --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000000fe00 {"d":{"$numberDecimal":"NaN"}} ===DONE===PK.h]/"G2*tests/ini-mock_service_id-phpinfo-002.phptnu[--TEST-- phpinfo() reports mongodb.mock_service_id (master and local) --INI-- mongodb.mock_service_id=1 --FILE-- ===DONE=== --EXPECTF-- %a mongodb.mock_service_id => Off => Off %a ===DONE=== PK.h]C!tests/string-decodeError-007.phptnu[--TEST-- String: invalid UTF-8 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]tests/maxkey-valid-001.phptnu[--TEST-- Maxkey type: Maxkey --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 080000007f610000 {"a":{"$maxKey":1}} 080000007f610000 ===DONE===PK.h];&tests/decimal128-7-parseError-021.phptnu[--TEST-- Decimal128: [basx577] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]Zdtests/bug1419-001.phptnu[--TEST-- PHPC-1419: error labels from getMore are not exposed --SKIPIF-- --FILE-- selectServer(new \MongoDB\Driver\ReadPreference('primary')); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $cursor = $server->executeQuery(NS, new \MongoDB\Driver\Query([], ['batchSize' => 1])); $iterator = new IteratorIterator($cursor); configureTargetedFailPoint( $server, 'failCommand', [ 'times' => 1] , [ 'errorCode' => 280, 'failCommands' => ['getMore'] ] ); try { $iterator->next(); } catch (\MongoDB\Driver\Exception\ServerException $e) { var_dump($e->hasErrorLabel('NonResumableChangeStreamError')); } ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h] &tests/writeconcern-ctor_error-002.phptnu[--TEST-- MongoDB\Driver\WriteConcern construction (invalid w type) --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected w to be integer or string, %r(double|float)%r given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected w to be integer or string, bool%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected w to be integer or string, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected w to be integer or string, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected w to be integer or string, %r(null|NULL)%r given ===DONE=== PK.h]Q**!tests/decimal128-2-valid-031.phptnu[--TEST-- Decimal128: [decq407] zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003c3000 {"d":{"$numberDecimal":"0.00"}} 1800000013640000000000000000000000000000003c3000 ===DONE===PK.h]!-j.tests/bson-binary-serialization_error-006.phptnu[--TEST-- MongoDB\BSON\Binary unserialization requires 16-byte data length for UUID types (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 15 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 17 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 15 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 17 given ===DONE=== PK.h]n8!tests/decimal128-5-valid-030.phptnu[--TEST-- Decimal128: [decq420] negative zeros (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000008000 {"d":{"$numberDecimal":"-0E-6176"}} 180000001364000000000000000000000000000000008000 180000001364000000000000000000000000000000008000 ===DONE===PK.h]֘fhh0tests/bson-objectid-serialization_error-003.phptnu[--TEST-- MongoDB\BSON\ObjectId unserialization requires "oid" string field (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\ObjectId initialization requires "oid" string field ===DONE=== PK.h]) (tests/readconcern-serialization-002.phptnu[--TEST-- MongoDB\Driver\ReadConcern serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadConcern)#%d (%d) { } O:26:"MongoDB\Driver\ReadConcern":0:{} object(MongoDB\Driver\ReadConcern)#%d (%d) { } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(12) "linearizable" } O:26:"MongoDB\Driver\ReadConcern":1:{s:5:"level";s:12:"linearizable";} object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(12) "linearizable" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(5) "local" } O:26:"MongoDB\Driver\ReadConcern":1:{s:5:"level";s:5:"local";} object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(5) "local" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "majority" } O:26:"MongoDB\Driver\ReadConcern":1:{s:5:"level";s:8:"majority";} object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "majority" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(9) "available" } O:26:"MongoDB\Driver\ReadConcern":1:{s:5:"level";s:9:"available";} object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(9) "available" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "snapshot" } O:26:"MongoDB\Driver\ReadConcern":1:{s:5:"level";s:8:"snapshot";} object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "snapshot" } ===DONE=== PK.h]99tests/bug0274.phptnu[--TEST-- Test for PHPC-274: zval_to_bson() should process BSON\Serializable instances --FILE-- "class", "data"); } } class NumericArray implements MongoDB\BSON\Serializable { public function bsonSerialize() { return array(1, 2, 3); } } echo "Testing top-level AssociativeArray:\n"; $bson = fromPHP(new AssociativeArray); echo toJSON($bson), "\n"; echo "Encoded BSON:\n"; hex_dump($bson); echo "\nTesting top-level NumericArray:\n"; $bson = fromPHP(new NumericArray); echo toJSON($bson), "\n"; echo "Encoded BSON:\n"; hex_dump($bson); ?> ===DONE=== --EXPECT-- Testing top-level AssociativeArray: { "random" : "class", "0" : "data" } Encoded BSON: 0 : 23 00 00 00 02 72 61 6e 64 6f 6d 00 06 00 00 00 [#....random.....] 10 : 63 6c 61 73 73 00 02 30 00 05 00 00 00 64 61 74 [class..0.....dat] 20 : 61 00 00 [a..] Testing top-level NumericArray: { "0" : 1, "1" : 2, "2" : 3 } Encoded BSON: 0 : 1a 00 00 00 10 30 00 01 00 00 00 10 31 00 02 00 [.....0......1...] 10 : 00 00 10 32 00 03 00 00 00 00 [...2......] ===DONE=== PK.h]qtests/manager-ctor-ssl-002.phptnu[--TEST-- PHPC-1239: Passing SSL driverOptions overrides SSL options from URI --SKIPIF-- --FILE-- executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]  !tests/decimal128-3-valid-141.phptnu[--TEST-- Decimal128: [basx263] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000603000 {"d":{"$numberDecimal":"1.265E+19"}} 18000000136400f104000000000000000000000000603000 18000000136400f104000000000000000000000000603000 ===DONE===PK.h]bl((1tests/session-advanceOperationTime_error-001.phptnu[--TEST-- MongoDB\Driver\Session::advanceOperationTime() with TimestampInterface exceptions --SKIPIF-- --FILE-- failIncrement = $failIncrement; $this->failTimestamp = $failTimestamp; } public function getIncrement() { if ($this->failIncrement) { throw new Exception('getIncrement() failed'); } return 5678; } public function getTimestamp() { if ($this->failTimestamp) { throw new Exception('getTimestamp() failed'); } return 1234; } public function __toString() { return sprintf('[%d:%d]', $this->getIncrement(), $this->getTimestamp()); } } $manager = create_test_manager(); $session = $manager->startSession(); echo "Initial operation time of session:\n"; var_dump($session->getOperationTime()); $timestamps = [ new MyTimestamp(true, false), new MyTimestamp(false, true), new MyTimestamp(true, true), ]; foreach ($timestamps as $timestamp) { echo "\n", throws(function() use ($session, $timestamp) { $session->advanceOperationTime($timestamp); }, 'Exception'), "\n"; echo "\nOperation time after advancing session fails:\n"; var_dump($session->getOperationTime()); } ?> ===DONE=== --EXPECT-- Initial operation time of session: NULL OK: Got Exception getIncrement() failed Operation time after advancing session fails: NULL OK: Got Exception getTimestamp() failed Operation time after advancing session fails: NULL OK: Got Exception getTimestamp() failed Operation time after advancing session fails: NULL ===DONE=== PK.h]#V&tests/decimal128-4-parseError-015.phptnu[--TEST-- Decimal128: [dqbsr433] check rounding modes heeded (Rounded & Inexact) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]!tests/decimal128-1-valid-048.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - inF --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007800 {"d":{"$numberDecimal":"Infinity"}} 180000001364000000000000000000000000000000007800 180000001364000000000000000000000000000000007800 ===DONE===PK.h]Q!)!tests/decimal128-3-valid-192.phptnu[--TEST-- Decimal128: [basx381] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000443000 {"d":{"$numberDecimal":"7E+2"}} 180000001364000700000000000000000000000000443000 180000001364000700000000000000000000000000443000 ===DONE===PK.h].tests/bson-binary-serialization_error-001.phptnu[--TEST-- MongoDB\BSON\Binary unserialization requires "data" string and "type" integer fields (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields ===DONE=== PK.h]Q$)tests/manager-ctor-write_concern-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): write concern options (wtimeoutms) --FILE-- 1000]], [null, ['w' => 2, 'wtimeoutms' => 1000]], [null, ['w' => 'majority', 'wtimeoutms' => 1000]], [null, ['w' => 'customTagSet', 'wtimeoutms' => 1000]], ]; foreach ($tests as $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getWriteConcern()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["wtimeout"]=> %rint\(4294967296\)|string\(10\) "4294967296"%r } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(12) "customTagSet" ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(12) "customTagSet" ["wtimeout"]=> int(1000) } ===DONE=== PK.h]S`;)'tests/manager-executeBulkWrite-006.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() insert one document (with embedded) --SKIPIF-- --FILE-- addAddress($sunnyvale); $hannes->addAddress($kopavogur); $mikola = new Person("Jeremy", 21); $michigan = new Address(48169, "USA"); $hannes->addFriend($mikola); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert($hannes); $result = $manager->executeBulkWrite(NS, $bulk); echo "\n===> WriteResult\n"; printWriteResult($result); echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); foreach($cursor as $object) { var_dump($object); } ?> ===DONE=== --EXPECTF-- ===> WriteResult server: %s:%d insertedCount: 1 matchedCount: 0 modifiedCount: 0 upsertedCount: 0 deletedCount: 0 ===> Collection object(Person)#%d (5) { ["name":protected]=> string(6) "Hannes" ["age":protected]=> int(42) ["addresses":protected]=> array(2) { [0]=> object(Address)#%d (2) { ["zip":protected]=> int(94086) ["country":protected]=> string(3) "USA" } [1]=> object(Address)#%d (2) { ["zip":protected]=> int(200) ["country":protected]=> string(7) "Iceland" } } ["friends":protected]=> array(1) { [0]=> object(Person)#%d (5) { ["name":protected]=> string(6) "Jeremy" ["age":protected]=> int(21) ["addresses":protected]=> array(0) { } ["friends":protected]=> array(0) { } ["secret":protected]=> string(4) "none" } } ["secret":protected]=> string(4) "none" } ===DONE=== PK.h]EsS*tests/bson-objectid-serialization-001.phptnu[--TEST-- MongoDB\BSON\ObjectId serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "576c25db6118fd406e6e6471" } string(82) "C:21:"MongoDB\BSON\ObjectId":48:{a:1:{s:3:"oid";s:24:"576c25db6118fd406e6e6471";}}" object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "576c25db6118fd406e6e6471" } ===DONE=== PK.h]Z<&tests/decimal128-7-parseError-074.phptnu[--TEST-- Decimal128: [basx540] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]vfntests/cursor-getmore-008.phptnu[--TEST-- MongoDB\Driver\Cursor command result iteration with getmore failure --SKIPIF-- --FILE-- insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$match' => new stdClass], ], 'cursor' => ['batchSize' => 2], ]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); failGetMore($manager); throws(function() use ($cursor) { foreach ($cursor as $i => $document) { printf("%d => {_id: %d}\n", $i, $document->_id); } }, "MongoDB\Driver\Exception\ServerException"); ?> ===DONE=== --CLEAN-- --EXPECT-- Inserted: 5 0 => {_id: 0} 1 => {_id: 1} OK: Got MongoDB\Driver\Exception\ServerException ===DONE=== PK.h]HҢ%tests/manager-executeCommand-006.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() does not inherit read preference --SKIPIF-- --FILE-- 'secondary']); $command = new MongoDB\Driver\Command(['ping' => 1]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; ?> ===DONE=== --EXPECTF-- is_primary: true is_secondary: false ===DONE=== PK.h]d#tests/document-decodeError-004.phptnu[--TEST-- Document type (sub-documents): Null byte in sub-document key --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]gmmtests/code-valid-004.phptnu[--TEST-- Javascript Code: two-byte UTF-8 (é) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000d61000d000000c3a9c3a9c3a9c3a9c3a9c3a90000 {"a":{"$code":"\u00e9\u00e9\u00e9\u00e9\u00e9\u00e9"}} 190000000d61000d000000c3a9c3a9c3a9c3a9c3a9c3a90000 ===DONE===PK.h]Ⱦtj!tests/decimal128-3-valid-263.phptnu[--TEST-- Decimal128: [basx046] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001100000000000000000000000000403000 {"d":{"$numberDecimal":"17"}} 180000001364001100000000000000000000000000403000 180000001364001100000000000000000000000000403000 ===DONE===PK.h]( =II!tests/decimal128-2-valid-135.phptnu[--TEST-- Decimal128: [decq745] DPD: one of each of the huffman groups --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400d303000000000000000000000000403000 {"d":{"$numberDecimal":"979"}} 18000000136400d303000000000000000000000000403000 ===DONE===PK.h]fztests/bug1839-002.phptnu[--TEST-- PHPC-1839: Referenced, local, non-interned string in typeMap (PHP < 8.1) --SKIPIF-- =', '8.1'); ?> --FILE-- &$rootValue, 'document' => &$documentValue]; $bson = MongoDB\BSON\fromPhp((object) []); echo "Before:\n"; debug_zval_dump($typemap); MongoDB\BSON\toPHP($bson, $typemap); echo "After:\n"; debug_zval_dump($typemap); ?> ===DONE=== --EXPECT-- Before: array(2) refcount(2){ ["root"]=> &string(5) "array" refcount(1) ["document"]=> &string(5) "array" refcount(1) } After: array(2) refcount(2){ ["root"]=> &string(5) "array" refcount(1) ["document"]=> &string(5) "array" refcount(1) } ===DONE=== PK.h]2"tests/bson-objectid_error-003.phptnu[--TEST-- MongoDB\BSON\ObjectId::__construct() requires valid hex string --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: 0123456789abcdefghijklmn OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: INVALID ===DONE=== PK.h]ʃNCC!tests/decimal128-5-valid-047.phptnu[--TEST-- Decimal128: [decq625] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000a0dec5adc935360000000000fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000E+6132"}} 180000001364000000a0dec5adc935360000000000fe5f00 180000001364000000a0dec5adc935360000000000fe5f00 ===DONE===PK.h] ;ZZ tests/readconcern-debug-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern debug output --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadConcern)#%d (%d) { } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(12) "linearizable" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(5) "local" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "majority" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(9) "available" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "snapshot" } ===DONE=== PK.h]`Z'HH$tests/bson-decimal128-clone-001.phptnu[--TEST-- MongoDB\BSON\Decimal128 can be cloned --SKIPIF-- --FILE-- foo = 'bar'; $clone = clone $decimal; var_dump($clone == $decimal); var_dump($clone === $decimal); unset($decimal); var_dump($clone); var_dump($clone->foo); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) object(MongoDB\BSON\Decimal128)#%d (1) { ["dec"]=> string(9) "1234.5678" } string(3) "bar" ===DONE=== PK.h]_[[tests/cursor-iterator-003.phptnu[--TEST-- MongoDB\Driver\Cursor handles invalid positions gracefully --SKIPIF-- --FILE-- insert(array('_id' => 0)); $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); $cursor->rewind(); var_dump($cursor->valid()); var_dump($cursor->key()); var_dump($cursor->current()); $cursor->next(); var_dump($cursor->valid()); var_dump($cursor->key()); var_dump($cursor->current()); ?> ===DONE=== --EXPECTF-- bool(true) int(0) object(stdClass)#%d (1) { ["_id"]=> int(0) } bool(false) NULL NULL ===DONE=== PK.h]h**!tests/decimal128-3-valid-041.phptnu[--TEST-- Decimal128: [basx608] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003c3000 {"d":{"$numberDecimal":"0.00"}} 1800000013640000000000000000000000000000003c3000 ===DONE===PK.h]s#tests/bson-maxkeyinterface-001.phptnu[--TEST-- MongoDB\BSON\MaxKeyInterface is implemented by MongoDB\BSON\MaxKey --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h] i&tests/decimal128-7-parseError-062.phptnu[--TEST-- Decimal128: [basx531] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] Ó'tests/bson-javascript-tostring-001.phptnu[--TEST-- MongoDB\BSON\Javascript::__toString() --FILE-- 1]); var_dump((string) $js); ?> ===DONE=== --EXPECT-- string(28) "function foo() { return 1; }" string(30) "function foo() { return bar; }" ===DONE=== PK.h]▯&tests/decimal128-7-parseError-007.phptnu[--TEST-- Decimal128: [basx571] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]!t  !tests/decimal128-3-valid-252.phptnu[--TEST-- Decimal128: [basx203] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000643000 {"d":{"$numberDecimal":"1.265E+21"}} 18000000136400f104000000000000000000000000643000 18000000136400f104000000000000000000000000643000 ===DONE===PK.h]C&tests/decimal128-6-parseError-018.phptnu[--TEST-- Decimal128: Empty string --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]e{3tests/commandexception-haserrorlabel_error-001.phptnu[--TEST-- MongoDB\Driver\Exception\CommandException::hasErrorLabel() with non-array values --FILE-- getProperty('errorLabels'); $resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('bar')); ?> ===DONE=== --EXPECT-- bool(false) ===DONE=== PK.h]tests/top-parseError-031.phptnu[--TEST-- Top-level document validity: Bad $timestamp (missing i) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]ٍFH 4tests/manager-executeReadWriteCommand_error-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeReadWriteCommand() with invalid options --SKIPIF-- --FILE-- 1]); echo throws(function() use ($manager, $command) { $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['readConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['readConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['writeConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['writeConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given ===DONE=== PK.h]Ł!tests/decimal128-5-valid-031.phptnu[--TEST-- Decimal128: [decq421] negative zeros (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000008000 {"d":{"$numberDecimal":"-0E-6176"}} 180000001364000000000000000000000000000000008000 180000001364000000000000000000000000000000008000 ===DONE===PK.h]T3;;!tests/decimal128-2-valid-041.phptnu[--TEST-- Decimal128: [decq432] negative zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000fedf00 {"d":{"$numberDecimal":"-0E+6111"}} 180000001364000000000000000000000000000000fedf00 ===DONE===PK.h]^t  !tests/decimal128-3-valid-285.phptnu[--TEST-- Decimal128: [basx222] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000004e3000 {"d":{"$numberDecimal":"1.265E+10"}} 18000000136400f1040000000000000000000000004e3000 18000000136400f1040000000000000000000000004e3000 ===DONE===PK.h]htests/oid-decodeError-001.phptnu[--TEST-- ObjectId: OID truncated --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]/D'tests/cursor-iterator_handlers-001.phptnu[--TEST-- MongoDB\Driver\Cursor iterator handlers --SKIPIF-- --FILE-- name = (string) $name; } public function dump() { $key = parent::key(); $current = parent::current(); $position = is_int($key) ? (string) $key : 'null'; $document = is_object($current) ? sprintf("{_id: %d}", $current->_id) : 'null'; printf("%s: %s => %s\n", $this->name, $position, $document); } } $manager = create_test_manager(); $bulkWrite = new MongoDB\Driver\BulkWrite; for ($i = 0; $i < 5; $i++) { $bulkWrite->insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); $a = new MyIteratorIterator($cursor, 'A'); echo "\nBefore rewinding, position and current element are not populated:\n"; $a->dump(); echo "\nAfter rewinding, current element is populated:\n"; $a->rewind(); $a->dump(); echo "\nAfter advancing, next element is populated:\n"; $a->next(); $a->dump(); echo "\nAdvancing through remaining elements:\n"; $a->next(); $a->dump(); $a->next(); $a->dump(); $a->next(); $a->dump(); echo "\nAdvancing beyond the last element:\n"; $a->next(); $a->dump(); ?> ===DONE=== --EXPECT-- Inserted: 5 Before rewinding, position and current element are not populated: A: null => null After rewinding, current element is populated: A: 0 => {_id: 0} After advancing, next element is populated: A: 1 => {_id: 1} Advancing through remaining elements: A: 2 => {_id: 2} A: 3 => {_id: 3} A: 4 => {_id: 4} Advancing beyond the last element: A: null => null ===DONE=== PK.h]&&!tests/decimal128-1-valid-015.phptnu[--TEST-- Decimal128: Regular - 0.1 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640001000000000000000000000000003e3000 {"d":{"$numberDecimal":"0.1"}} 1800000013640001000000000000000000000000003e3000 ===DONE===PK.h](%R~~)tests/writeresult-isacknowledged-002.phptnu[--TEST-- MongoDB\Driver\WriteResult::isAcknowledged() with inherited WriteConcern --SKIPIF-- --FILE-- insert(array('x' => 1)); $result = $manager->executeBulkWrite(NS, $bulk); printf("WriteResult::isAcknowledged(): %s\n", $result->isAcknowledged() ? 'true' : 'false'); var_dump($result); ?> ===DONE=== --EXPECTF-- WriteResult::isAcknowledged(): false object(MongoDB\Driver\WriteResult)#%d (%d) { ["nInserted"]=> int(0) ["nMatched"]=> int(0) ["nModified"]=> int(0) ["nRemoved"]=> int(0) ["nUpserted"]=> int(0) ["upsertedIds"]=> array(0) { } ["writeErrors"]=> array(0) { } ["writeConcernError"]=> NULL ["writeConcern"]=> object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } } ===DONE=== PK.h]=隥'tests/bson-int64-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\Int64::jsonSerialize() return value --FILE-- jsonSerialize()); } ?> ===DONE=== --EXPECT-- array(1) { ["$numberLong"]=> string(19) "9223372036854775807" } array(1) { ["$numberLong"]=> string(20) "-9223372036854775808" } array(1) { ["$numberLong"]=> string(1) "0" } ===DONE=== PK.h]utests/command_error-001.phptnu[--TEST-- MongoDB\Driver\Command cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyCommand %s final class %SMongoDB\Driver\Command%S in %s on line %d PK.h]@ tests/bson-toJSON_error-003.phptnu[--TEST-- MongoDB\BSON\toJSON(): BSON decoding exceptions for bson_as_json() failure --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not convert BSON document to a JSON string OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not convert BSON document to a JSON string OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not convert BSON document to a JSON string ===DONE=== PK.h]vtests/server-constants.phptnu[--TEST-- MongoDB\Driver\Server constants --FILE-- ===DONE=== --EXPECT-- int(0) int(1) int(2) int(3) int(4) int(5) int(6) int(7) int(8) int(9) ===DONE=== PK.h]+%tests/bson-utcdatetime_error-002.phptnu[--TEST-- MongoDB\BSON\UTCDateTime cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyUTCDateTime %s final class %SMongoDB\BSON\UTCDateTime%S in %s on line %d PK.h]{""&tests/decimal128-4-parseError-016.phptnu[--TEST-- Decimal128: [dqbsr435] check rounding modes heeded (Rounded & Inexact) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]s>>!tests/decimal128-2-valid-144.phptnu[--TEST-- Decimal128: [decq052] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364003930000000000000000000000000403000 {"d":{"$numberDecimal":"12345"}} 180000001364003930000000000000000000000000403000 ===DONE===PK.h]{||tests/session-debug-006.phptnu[--TEST-- MongoDB\Driver\Session debug output (with transaction options) --SKIPIF-- --FILE-- startSession(); $options = [ 'maxCommitTimeMS' => 1, 'readConcern' => new \MongoDB\Driver\ReadConcern('majority'), 'readPreference' => new \MongoDB\Driver\ReadPreference('primaryPreferred'), 'writeConcern' => new \MongoDB\Driver\WriteConcern('majority'), ]; $session->startTransaction($options); var_dump($session); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Session)#%d (%d) { ["logicalSessionId"]=> array(1) { ["id"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" ["type"]=> int(4) } } ["clusterTime"]=> NULL ["causalConsistency"]=> bool(true) ["snapshot"]=> bool(false) ["operationTime"]=> NULL ["server"]=> NULL ["inTransaction"]=> bool(true) ["transactionState"]=> string(8) "starting" ["transactionOptions"]=> array(4) { ["maxCommitTimeMS"]=> int(1) ["readConcern"]=> object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "majority" } ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } ["writeConcern"]=> object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } } } ===DONE=== PK.h]|0̬)tests/bson-utcdatetime-set_state-002.phptnu[--TEST-- MongoDB\BSON\UTCDateTime::__set_state() (64-bit) --SKIPIF-- --FILE-- $milliseconds, ])); echo "\n\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\BSON\UTCDateTime::__set_state(array( %w'milliseconds' => '0', )) MongoDB\BSON\UTCDateTime::__set_state(array( %w'milliseconds' => '-1416445411987', )) MongoDB\BSON\UTCDateTime::__set_state(array( %w'milliseconds' => '1416445411987', )) ===DONE=== PK.h]B!tests/decimal128-5-valid-028.phptnu[--TEST-- Decimal128: [decq416] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000fe5f00 {"d":{"$numberDecimal":"0E+6111"}} 180000001364000000000000000000000000000000fe5f00 180000001364000000000000000000000000000000fe5f00 ===DONE===PK.h]8T=tests/manager-ctor-005.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): Ensure environmental URI is parsable --FILE-- ===DONE=== --EXPECT-- ===DONE=== PK.h] #tests/bson-undefined-clone-001.phptnu[--TEST-- MongoDB\BSON\Undefined can be cloned --FILE-- undefined; $undefined->foo = 'bar'; $clone = clone $undefined; var_dump($clone == $undefined); var_dump($clone === $undefined); var_dump($clone->foo); ?> ===DONE=== --EXPECT-- bool(true) bool(false) string(3) "bar" ===DONE=== PK.h]ۉ$wwtests/bug0923-001.phptnu[--TEST-- PHPC-923: Use zend_string_release() to free class names (type map) --FILE-- 'MissingClass'])); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; var_dump($classes); ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MissingClass does not exist array(1) { [0]=> string(12) "MissingClass" } ===DONE=== PK.h]!x5(tests/readpreference-ctor_error-005.phptnu[--TEST-- MongoDB\Driver\ReadPreference construction (invalid string mode) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Invalid mode: 'hocuspocus' ===DONE=== PK.h]$.t"t"*tests/multi-type-deprecated-valid-001.phptnu[--TEST-- Multiple types within the same document: All BSON types --XFAIL-- PHP encodes integers as 32-bit if range allows --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 38020000075f69640057e193d7a9cc81b4027498b50e53796d626f6c000700000073796d626f6c0002537472696e670007000000737472696e670010496e743332002a00000012496e743634002a0000000000000001446f75626c6500000000000000f0bf0542696e617279001000000003a34c38f7c3abedc8a37814a992ab8db60542696e61727955736572446566696e656400050000008001020304050d436f6465000e00000066756e6374696f6e2829207b7d000f436f64655769746853636f7065001b0000000e00000066756e6374696f6e2829207b7d00050000000003537562646f63756d656e74001200000002666f6f0004000000626172000004417272617900280000001030000100000010310002000000103200030000001033000400000010340005000000001154696d657374616d7000010000002a0000000b5265676578007061747465726e0000094461746574696d6545706f6368000000000000000000094461746574696d65506f73697469766500ffffff7f00000000094461746574696d654e656761746976650000000080ffffffff085472756500010846616c736500000c4442506f696e746572000b000000636f6c6c656374696f6e0057e193d7a9cc81b4027498b1034442526566003d0000000224726566000b000000636f6c6c656374696f6e00072469640057fd71e96e32ab4225b723fb02246462000900000064617461626173650000ff4d696e6b6579007f4d61786b6579000a4e756c6c0006556e646566696e65640000 {"_id":{"$oid":"57e193d7a9cc81b4027498b5"},"Symbol":{"$symbol":"symbol"},"String":"string","Int32":{"$numberInt":"42"},"Int64":{"$numberLong":"42"},"Double":{"$numberDouble":"-1"},"Binary":{"$binary":{"base64":"o0w498Or7cijeBSpkquNtg==","subType":"03"}},"BinaryUserDefined":{"$binary":{"base64":"AQIDBAU=","subType":"80"}},"Code":{"$code":"function() {}"},"CodeWithScope":{"$code":"function() {}","$scope":{}},"Subdocument":{"foo":"bar"},"Array":[{"$numberInt":"1"},{"$numberInt":"2"},{"$numberInt":"3"},{"$numberInt":"4"},{"$numberInt":"5"}],"Timestamp":{"$timestamp":{"t":42,"i":1}},"Regex":{"$regularExpression":{"pattern":"pattern","options":""}},"DatetimeEpoch":{"$date":{"$numberLong":"0"}},"DatetimePositive":{"$date":{"$numberLong":"2147483647"}},"DatetimeNegative":{"$date":{"$numberLong":"-2147483648"}},"True":true,"False":false,"DBPointer":{"$dbPointer":{"$ref":"collection","$id":{"$oid":"57e193d7a9cc81b4027498b1"}}},"DBRef":{"$ref":"collection","$id":{"$oid":"57fd71e96e32ab4225b723fb"},"$db":"database"},"Minkey":{"$minKey":1},"Maxkey":{"$maxKey":1},"Null":null,"Undefined":{"$undefined":true}} 38020000075f69640057e193d7a9cc81b4027498b50e53796d626f6c000700000073796d626f6c0002537472696e670007000000737472696e670010496e743332002a00000012496e743634002a0000000000000001446f75626c6500000000000000f0bf0542696e617279001000000003a34c38f7c3abedc8a37814a992ab8db60542696e61727955736572446566696e656400050000008001020304050d436f6465000e00000066756e6374696f6e2829207b7d000f436f64655769746853636f7065001b0000000e00000066756e6374696f6e2829207b7d00050000000003537562646f63756d656e74001200000002666f6f0004000000626172000004417272617900280000001030000100000010310002000000103200030000001033000400000010340005000000001154696d657374616d7000010000002a0000000b5265676578007061747465726e0000094461746574696d6545706f6368000000000000000000094461746574696d65506f73697469766500ffffff7f00000000094461746574696d654e656761746976650000000080ffffffff085472756500010846616c736500000c4442506f696e746572000b000000636f6c6c656374696f6e0057e193d7a9cc81b4027498b1034442526566003d0000000224726566000b000000636f6c6c656374696f6e00072469640057fd71e96e32ab4225b723fb02246462000900000064617461626173650000ff4d696e6b6579007f4d61786b6579000a4e756c6c0006556e646566696e65640000 ===DONE===PK.h]4%!<<+tests/bson-timestamp-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\Timestamp::jsonSerialize() return value --FILE-- jsonSerialize()); ?> ===DONE=== --EXPECT-- array(1) { ["$timestamp"]=> array(2) { ["t"]=> int(5678) ["i"]=> int(1234) } } ===DONE=== PK.h]CY  !tests/decimal128-1-valid-017.phptnu[--TEST-- Decimal128: Regular - 0 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 ===DONE===PK.h]8??tests/query-ctor_error-004.phptnu[--TEST-- MongoDB\Driver\Query construction (cannot use empty keys in documents) --FILE-- '1'], []], [['x' => ['' => '1']], []], [[], ['collation' => ['' => 1]]], [[], ['hint' => ['' => 1]]], [[], ['max' => ['' => 1]]], [[], ['min' => ['' => 1]]], [[], ['projection' => ['' => 1]]], [[], ['sort' => ['' => 1]]], [[], ['modifiers' => ['$hint' => ['' => 1]]]], [[], ['modifiers' => ['$max' => ['' => 1]]]], [[], ['modifiers' => ['$min' => ['' => 1]]]], [[], ['modifiers' => ['$orderby' => ['' => 1]]]], ]; foreach ($tests as $test) { list($filter, $options) = $test; echo throws(function() use ($filter, $options) { new MongoDB\Driver\Query($filter, $options); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; } ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in filter document OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in filter document OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in "collation" option OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in "hint" option OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in "max" option OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in "min" option OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in "projection" option OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in "sort" option OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in "$hint" modifier OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in "$max" modifier OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in "$min" modifier OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use empty keys in "$orderby" modifier ===DONE=== PK.h]KK!tests/decimal128-5-valid-043.phptnu[--TEST-- Decimal128: [decq617] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000004a48011416954508000000fe5f00 {"d":{"$numberDecimal":"1.0000000000000000000000000E+6136"}} 180000001364000000004a48011416954508000000fe5f00 180000001364000000004a48011416954508000000fe5f00 ===DONE===PK.h]ӸN!tests/string-decodeError-003.phptnu[--TEST-- String: bad string length: eats terminator --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h] 077+tests/bson-timestamp-serialization-002.phptnu[--TEST-- MongoDB\BSON\Timestamp serialization (Serializable interface) (64-bit) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "4294967295" ["timestamp"]=> string(1) "0" } string(99) "C:22:"MongoDB\BSON\Timestamp":64:{a:2:{s:9:"increment";s:10:"4294967295";s:9:"timestamp";s:1:"0";}}" object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "4294967295" ["timestamp"]=> string(1) "0" } object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "4294967295" } string(99) "C:22:"MongoDB\BSON\Timestamp":64:{a:2:{s:9:"increment";s:1:"0";s:9:"timestamp";s:10:"4294967295";}}" object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "4294967295" } ===DONE=== PK.h]n,||!tests/decimal128-2-valid-053.phptnu[--TEST-- Decimal128: [decq612] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000106102253e5ece4f200000fe5f00 {"d":{"$numberDecimal":"1.0000000000000000000000000000E+6139"}} 18000000136400000000106102253e5ece4f200000fe5f00 ===DONE===PK.h]F##!tests/decimal128-3-valid-112.phptnu[--TEST-- Decimal128: [basx299] some more negative zeros [systematic tests below] --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003ab000 {"d":{"$numberDecimal":"-0.000"}} 1800000013640000000000000000000000000000003ab000 1800000013640000000000000000000000000000003ab000 ===DONE===PK.h] )tests/writeconcern-bsonserialize-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern::bsonSerialize() --FILE-- 1 new MongoDB\Driver\WriteConcern(-2, 1000), ]; foreach ($tests as $test) { echo toJSON(fromPHP($test)), "\n"; } ?> ===DONE=== --EXPECT-- { "w" : "majority" } { } { "w" : -1 } { "w" : 0 } { "w" : 1 } { "w" : "majority" } { "w" : "tag" } { "w" : 1 } { "w" : 1, "j" : false } { "w" : 1, "wtimeout" : 1000 } { "w" : 1, "j" : true, "wtimeout" : 1000 } { "j" : true } { "wtimeout" : 1000 } ===DONE=== PK.h]tests/bulkwrite-debug-002.phptnu[--TEST-- MongoDB\Driver\BulkWrite debug output after execution --SKIPIF-- --FILE-- $manager->startSession()], ]; foreach ($tests as $options) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['foo' => 'bar']); $manager->executeBulkWrite(NS, $bulk, $options); var_dump($bulk); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> %s ["collection"]=> %s ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(true) ["server_id"]=> int(%d) ["session"]=> NULL ["write_concern"]=> NULL } object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> %s ["collection"]=> %s ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(true) ["server_id"]=> int(%d) ["session"]=> object(MongoDB\Driver\Session)#%d (%d) { %a } ["write_concern"]=> NULL } ===DONE=== PK.h]HxFLtests/session-debug-005.phptnu[--TEST-- MongoDB\Driver\Session debug output (during a pinned transaction) --SKIPIF-- --FILE-- selectServer(new \MongoDB\Driver\ReadPreference('primary')); $session = $manager->startSession(); $session->startTransaction(); $query = new MongoDB\Driver\Query([]); $server->executeQuery(NS, $query, ['session' => $session]); var_dump($session); $session->abortTransaction(); $session->endSession(); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Session)#%d (%d) { ["logicalSessionId"]=> array(1) { ["id"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" ["type"]=> int(4) } } ["clusterTime"]=> array(2) { ["clusterTime"]=> object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(%d) "%d" ["timestamp"]=> string(%d) "%d" } ["signature"]=> %a } ["causalConsistency"]=> bool(true) ["snapshot"]=> bool(false) ["operationTime"]=> object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(%d) "%d" ["timestamp"]=> string(%d) "%d" } ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } ["inTransaction"]=> bool(true) ["transactionState"]=> string(11) "in_progress" ["transactionOptions"]=> array(1) { ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } } } ===DONE=== PK.h]x6ootests/double-valid-006.phptnu[--TEST-- Double type: -1.2345678921232E+18 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 100000000164002a1bf5f41022b1c300 {"d":{"$numberDouble":"-1.2345678921232e+18"}} {"d":-1.2345678921232e+18} 100000000164002a1bf5f41022b1c300 {"d":-1.2345678921232e+18} ===DONE===PK.h]Ѡ\\!tests/decimal128-3-valid-130.phptnu[--TEST-- Decimal128: [basx053] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364003200000000000000000000000000323000 {"d":{"$numberDecimal":"0.0000050"}} 180000001364003200000000000000000000000000323000 ===DONE===PK.h]Aj !tests/causal-consistency-003.phptnu[--TEST-- Causal consistency: first read or write in session updates operationTime --SKIPIF-- --FILE-- lastSeenOperationTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); printf("Session reports last seen operationTime: %s\n", ($session->getOperationTime() == $this->lastSeenOperationTime) ? 'yes' : 'no'); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function executeCommand() { $this->lastSeenOperationTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); printf("Session reports last seen operationTime: %s\n", ($session->getOperationTime() == $this->lastSeenOperationTime) ? 'yes' : 'no'); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function executeQuery() { $this->lastSeenOperationTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); printf("Session reports last seen operationTime: %s\n", ($session->getOperationTime() == $this->lastSeenOperationTime) ? 'yes' : 'no'); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { $reply = $event->getReply(); $hasOperationTime = isset($reply->{'operationTime'}); printf("%s command reply includes operationTime: %s\n", $event->getCommandName(), $hasOperationTime ? 'yes' : 'no'); if ($hasOperationTime) { $this->lastSeenOperationTime = $reply->operationTime; } } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } echo "Testing executeBulkWrite()\n"; (new Test)->executeBulkWrite(); echo "\nTesting executeCommand()\n"; (new Test)->executeCommand(); echo "\nTesting executeQuery()\n"; (new Test)->executeQuery(); ?> ===DONE=== --EXPECT-- Testing executeBulkWrite() insert command reply includes operationTime: yes Session reports last seen operationTime: yes Testing executeCommand() ping command reply includes operationTime: yes Session reports last seen operationTime: yes Testing executeQuery() find command reply includes operationTime: yes Session reports last seen operationTime: yes ===DONE=== PK.h]Z4tests/manager-ctor-disableClientPersistence-002.phptnu[--TEST-- MongoDB\Driver\Manager with disableClientPersistence=true referenced by Cursor --SKIPIF-- --FILE-- true]); ini_set('mongodb.debug', ''); echo "Inserting data\n"; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1, 'x' => 2, 'y' => 3]); $bulk->insert(['_id' => 2, 'x' => 3, 'y' => 4]); $bulk->insert(['_id' => 3, 'x' => 4, 'y' => 5]); $manager->executeBulkWrite(NS, $bulk); echo "Creating cursor\n"; $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $cursor = $manager->executeQuery(NS, $query); echo "Unsetting manager\n"; ini_set('mongodb.debug', 'stderr'); unset($manager); ini_set('mongodb.debug', ''); echo "Iterating cursor\n"; var_dump(iterator_to_array($cursor)); echo "Unsetting cursor\n"; ini_set('mongodb.debug', 'stderr'); unset($cursor); ini_set('mongodb.debug', ''); ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client Inserting data Creating cursor Unsetting manager Iterating cursor array(3) { [0]=> object(stdClass)#%d (3) { ["_id"]=> int(1) ["x"]=> int(2) ["y"]=> int(3) } [1]=> object(stdClass)#%d (3) { ["_id"]=> int(2) ["x"]=> int(3) ["y"]=> int(4) } [2]=> object(stdClass)#%d (3) { ["_id"]=> int(3) ["x"]=> int(4) ["y"]=> int(5) } } Unsetting cursor%A [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A ===DONE=== PK.h](R(;;$tests/server-executeCommand-002.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() takes a read preference --SKIPIF-- --FILE-- selectServer($rp); $command = new MongoDB\Driver\Command(array('profile' => 2)); $cursor = $secondary->executeCommand(DATABASE_NAME, $command); $result = current($cursor->toArray()); printf("Set profile level to 2 successfully: %s\n", (empty($result->ok) ? 'no' : 'yes')); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ [ '$match' => [ 'x' => 1 ] ] ], 'cursor' => (object) [], ]); $secondary->executeCommand(DATABASE_NAME, $command, $rp); $query = new MongoDB\Driver\Query( array( 'op' => 'command', 'ns' => DATABASE_NAME . '.' . COLLECTION_NAME, ), array( 'sort' => array('ts' => -1), 'limit' => 1, ) ); $cursor = $secondary->executeQuery(DATABASE_NAME . '.system.profile', $query, $rp); $profileEntry = current($cursor->toArray()); var_dump($profileEntry->command); $command = new MongoDB\Driver\Command(array('profile' => 0)); $cursor = $secondary->executeCommand(DATABASE_NAME, $command); $result = current($cursor->toArray()); printf("Set profile level to 0 successfully: %s\n", (empty($result->ok) ? 'no' : 'yes')); ?> ===DONE=== --EXPECTF-- Set profile level to 2 successfully: yes object(stdClass)#%d (%d) { ["aggregate"]=> string(32) "server_server_executeCommand_002" ["pipeline"]=> array(1) { [0]=> object(stdClass)#%d (%d) { ["$match"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } } } ["cursor"]=> object(stdClass)#%d (%d) { }%A } Set profile level to 0 successfully: yes ===DONE=== PK.h]šbb!tests/decimal128-2-valid-150.phptnu[--TEST-- Decimal128: [decq827] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100008000000000000000000000403000 {"d":{"$numberDecimal":"2147483649"}} 180000001364000100008000000000000000000000403000 ===DONE===PK.h]}Z!tests/decimal128-3-valid-161.phptnu[--TEST-- Decimal128: [basx152] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000f43000 {"d":{"$numberDecimal":"1E+90"}} 180000001364000100000000000000000000000000f43000 180000001364000100000000000000000000000000f43000 ===DONE===PK.h]Yp%%!tests/decimal128-5-valid-062.phptnu[--TEST-- Decimal128: [decq655] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640040420f0000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.000000E+6117"}} 1800000013640040420f0000000000000000000000fe5f00 1800000013640040420f0000000000000000000000fe5f00 ===DONE===PK.h]:Z!tests/writeconcern-debug-002.phptnu[--TEST-- MongoDB\Driver\WriteConcern debug output --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(3) "tag" ["j"]=> bool(false) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" ["j"]=> bool(true) ["wtimeout"]=> int(500) } ===DONE=== PK.h]_O 33!tests/decimal128-2-valid-105.phptnu[--TEST-- Decimal128: [decq707] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364002700000000000000000000000000403000 {"d":{"$numberDecimal":"39"}} 180000001364002700000000000000000000000000403000 ===DONE===PK.h]VL??!tests/decimal128-3-valid-205.phptnu[--TEST-- Decimal128: [basx401] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000303000 {"d":{"$numberDecimal":"7E-8"}} 180000001364000700000000000000000000000000303000 ===DONE===PK.h]?99!tests/decimal128-2-valid-091.phptnu[--TEST-- Decimal128: [decq447] exponent lengths --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000000e3800 {"d":{"$numberDecimal":"7E+999"}} 1800000013640007000000000000000000000000000e3800 ===DONE===PK.h]r|/?$tests/writeerror-getMessage-001.phptnu[--TEST-- MongoDB\Driver\WriteError::getMessage() --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 1]); try { $manager->executeBulkWrite(NS, $bulk); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteErrors()[0]->getMessage()); } ?> ===DONE=== --EXPECTF-- string(%d) "%SE11000 duplicate key error %s: phongo.writeError_writeerror_getMessage_001%s dup key: { %S: 1 }" ===DONE=== PK.h]A !tests/bson-fromPHP_error-004.phptnu[--TEST-- MongoDB\BSON\fromPHP(): PHP documents with circular references --FILE-- 1, 'y' => []]; $document['y'][] = &$document['y']; fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting packed array with circular reference at 3rd position\n"; echo throws(function() { $document = ['x' => 1, 'y' => [1, 2, 3]]; $document['y'][] = &$document['y']; fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting associative array with circular reference\n"; echo throws(function() { $document = ['x' => 1, 'y' => []]; $document['y']['z'] = &$document['y']; fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting associative array and nested array with circular reference\n"; echo throws(function() { $document = ['x' => 1, 'y' => []]; $document['y'][0]['z'] = &$document['y']; fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting object with circular reference\n"; echo throws(function() { $document = (object) ['x' => 1, 'y' => (object) []]; $document->y->z = &$document->y; fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting nested object with circular reference\n"; echo throws(function() { $document = (object) ['x' => 1, 'y' => (object) ['z' => (object) []]]; $document->y->z->a = &$document->y; fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECT-- Testing packed array with circular reference OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected recursion for field path "y.0" Testing packed array with circular reference at 3rd position OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected recursion for field path "y.3" Testing associative array with circular reference OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected recursion for field path "y.z" Testing associative array and nested array with circular reference OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected recursion for field path "y.0.z" Testing object with circular reference OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected recursion for field path "y.z" Testing nested object with circular reference OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected recursion for field path "y.z.a" ===DONE=== PK.h]&&Q>qq2tests/bson-javascript-serialization_error-004.phptnu[--TEST-- MongoDB\BSON\Javascript unserialization requires "code" string field (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Javascript initialization requires "code" string field ===DONE=== PK.h]33!tests/decimal128-2-valid-117.phptnu[--TEST-- Decimal128: [decq719] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004b00000000000000000000000000403000 {"d":{"$numberDecimal":"75"}} 180000001364004b00000000000000000000000000403000 ===DONE===PK.h]n{{-tests/manager-executeBulkWrite_error-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() with duplicate key errors (unordered) --SKIPIF-- --FILE-- false]); $bulk->insert(array('_id' => 1)); $bulk->insert(array('_id' => 1)); $bulk->insert(array('_id' => 2)); $bulk->insert(array('_id' => 2)); try { $result = $manager->executeBulkWrite(NS, $bulk); echo "FAILED\n"; } catch (MongoDB\Driver\Exception\BulkWriteException $e) { printf("BulkWriteException: %s\n", $e->getMessage()); echo "\n===> WriteResult\n"; printWriteResult($e->getWriteResult()); } echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- BulkWriteException: Multiple write errors: "%SE11000 duplicate key error %s: phongo.manager_manager_executeBulkWrite_error_002%sdup key: { %S: 1 }", "%SE11000 duplicate key error %s: phongo.manager_manager_executeBulkWrite_error_002%sdup key: { %S: 2 }" ===> WriteResult server: %s:%d insertedCount: 2 matchedCount: 0 modifiedCount: 0 upsertedCount: 0 deletedCount: 0 object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "%s" ["code"]=> int(11000) ["index"]=> int(1) ["info"]=> NULL } writeError[1].message: %s writeError[1].code: 11000 object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "%s" ["code"]=> int(11000) ["index"]=> int(3) ["info"]=> NULL } writeError[3].message: %s writeError[3].code: 11000 ===> Collection array(2) { [0]=> object(stdClass)#%d (1) { ["_id"]=> int(1) } [1]=> object(stdClass)#%d (1) { ["_id"]=> int(2) } } ===DONE=== PK.h]\P33tests/query-ctor_error-006.phptnu[--TEST-- MongoDB\Driver\Query construction (invalid maxAwaitTimeMS range) --SKIPIF-- --FILE-- 4294967296]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "maxAwaitTimeMS" option to be <= 4294967295, 4294967296 given ===DONE=== PK.h]yu5tests/query-errors.phptnu[--TEST-- MongoDB\Driver\Query: Invalid types --FILE-- "Smith, Carter and Buckridge"), array( "projection" => array("_id" => 0, "username" => 1), "sort" => array("phoneNumber" => 1), "modifiers" => "string", )); }, "MongoDB\Driver\Exception\InvalidArgumentException"); throws(function() { $query = new MongoDB\Driver\Query(array("company" => "Smith, Carter and Buckridge"), array( "projection" => array("_id" => 0, "username" => 1), "sort" => array("phoneNumber" => 1), "projection" => "string", )); }, "MongoDB\Driver\Exception\InvalidArgumentException"); throws(function() { $query = new MongoDB\Driver\Query(array("company" => "Smith, Carter and Buckridge"), array( "projection" => array("_id" => 0, "username" => 1), "sort" => "string" )); }, "MongoDB\Driver\Exception\InvalidArgumentException"); ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException OK: Got MongoDB\Driver\Exception\InvalidArgumentException OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE=== PK.h]"xbxx!tests/decimal128-2-valid-055.phptnu[--TEST-- Decimal128: [decq616] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000e4d20cc8dcd2b752000000fe5f00 {"d":{"$numberDecimal":"1.00000000000000000000000000E+6137"}} 18000000136400000000e4d20cc8dcd2b752000000fe5f00 ===DONE===PK.h]!XX!tests/decimal128-2-valid-071.phptnu[--TEST-- Decimal128: [decq648] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000e40b5402000000000000000000fe5f00 {"d":{"$numberDecimal":"1.0000000000E+6121"}} 1800000013640000e40b5402000000000000000000fe5f00 ===DONE===PK.h]q. . tests/retryable-writes-003.phptnu[--TEST-- Retryable writes: unsupported operations do not include transaction IDs --SKIPIF-- --FILE-- getCommand(); $hasTransactionId = isset($command->lsid) && isset($command->txnNumber); printf("%s command includes transaction ID: %s\n", $event->getCommandName(), $hasTransactionId ? 'yes' : 'no'); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $observer = new TransactionIdObserver; MongoDB\Driver\Monitoring\addSubscriber($observer); $manager = create_test_manager(); echo "Testing deleteMany\n"; $bulk = new MongoDB\Driver\BulkWrite; $bulk->delete(['x' => 1], ['limit' => 0]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting updateMany\n"; $bulk = new MongoDB\Driver\BulkWrite; $bulk->update(['x' => 1], ['$inc' => ['x' => 1]], ['multi' => true]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting multi-statement bulk write with one unsupported operation (ordered=true)\n"; $bulk = new MongoDB\Driver\BulkWrite(['ordered' => true]); $bulk->delete(['x' => 1], ['limit' => 1]); $bulk->insert(['x' => 1]); $bulk->update(['x' => 1], ['$inc' => ['x' => 1]]); $bulk->update(['x' => 1], ['x' => 2]); $bulk->update(['x' => 1], ['$inc' => ['x' => 1]], ['multi' => true]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting multi-statement bulk write with one unsupported operation (ordered=false)\n"; $bulk = new MongoDB\Driver\BulkWrite(['ordered' => false]); $bulk->delete(['x' => 1], ['limit' => 1]); $bulk->insert(['x' => 1]); $bulk->update(['x' => 1], ['$inc' => ['x' => 1]]); $bulk->update(['x' => 1], ['x' => 2]); $bulk->update(['x' => 1], ['$inc' => ['x' => 1]], ['multi' => true]); $manager->executeBulkWrite(NS, $bulk); echo "\nTesting aggregate\n"; $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$match' => ['x' => 1]], ['$out' => COLLECTION_NAME . '.out'], ], 'cursor' => new stdClass, ]); $manager->executeReadWriteCommand(DATABASE_NAME, $command); MongoDB\Driver\Monitoring\removeSubscriber($observer); ?> ===DONE=== --EXPECT-- Testing deleteMany delete command includes transaction ID: no Testing updateMany update command includes transaction ID: no Testing multi-statement bulk write with one unsupported operation (ordered=true) delete command includes transaction ID: yes insert command includes transaction ID: yes update command includes transaction ID: no Testing multi-statement bulk write with one unsupported operation (ordered=false) delete command includes transaction ID: yes insert command includes transaction ID: yes update command includes transaction ID: no Testing aggregate aggregate command includes transaction ID: no ===DONE=== PK.h]n+tests/writeresult-getupsertedcount-001.phptnu[--TEST-- MongoDB\Driver\WriteResult::getUpsertedCount() with acknowledged write --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk); var_dump($result->getUpsertedCount()); ?> ===DONE=== --EXPECT-- int(2) ===DONE=== PK.h]}*tests/bson-binary-set_state_error-002.phptnu[--TEST-- MongoDB\BSON\Binary::__set_state() requires unsigned 8-bit integer for type --FILE-- 'foobar', 'type' => -1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Binary::__set_state(['data' => 'foobar', 'type' => 256]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected type to be an unsigned 8-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected type to be an unsigned 8-bit integer, 256 given ===DONE=== PK.h]w  !tests/decimal128-3-valid-284.phptnu[--TEST-- Decimal128: [basx212] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000002e3000 {"d":{"$numberDecimal":"0.000001265"}} 18000000136400f1040000000000000000000000002e3000 18000000136400f1040000000000000000000000002e3000 ===DONE===PK.h]" !tests/decimal128-3-valid-154.phptnu[--TEST-- Decimal128: [basx148] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000523000 {"d":{"$numberDecimal":"1E+9"}} 180000001364000100000000000000000000000000523000 180000001364000100000000000000000000000000523000 ===DONE===PK.h]Q(tests/writeconcernerror-getinfo-003.phptnu[--TEST-- MongoDB\Driver\WriteConcernError::getInfo() exposes writeConcernError.errInfo --DESCRIPTION-- CRUD spec prose test #1 https://github.com/mongodb/specifications/blob/master/source/crud/tests/README.rst#writeconcernerror-details-exposes-writeconcernerror-errinfo --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference('primary')); configureTargetedFailPoint( $server, 'failCommand', [ 'times' => 1], [ 'failCommands' => ['insert'], 'writeConcernError' => [ 'code' => 100, 'codeName' => 'UnsatisfiableWriteConcern', 'errmsg' => 'Not enough data-bearing nodes', 'errInfo' => [ 'writeConcern' => [ 'w' => 2, 'wtimeout' => 0, 'provenance' => 'clientSupplied', ], ], ], ] ); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['_id' => 1]); try { $server->executeBulkWrite(NS, $bulk); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteConcernError()->getInfo()); } ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["writeConcern"]=> object(stdClass)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> int(0) ["provenance"]=> string(14) "clientSupplied" } } ===DONE===PK.h]JDDtests/cursor-tailable-001.phptnu[--TEST-- MongoDB\Driver\Cursor tailable iteration --SKIPIF-- --FILE-- insert(['_id' => $i]); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted %d document(s): %s\n", $writeResult->getInsertedCount(), implode(', ', range($from, $to))); } $manager = create_test_manager(); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command([ 'create' => COLLECTION_NAME, 'capped' => true, 'size' => 1048576, ])); insert($manager, 1, 3); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['tailable' => true])); $it = new IteratorIterator($cursor); $numAwaitAttempts = 0; $maxAwaitAttempts = 7; for ($it->rewind(); $numAwaitAttempts < $maxAwaitAttempts; $it->next()) { $document = $it->current(); if ($document !== null) { printf("{_id: %d}\n", $document->_id); continue; } if ($numAwaitAttempts === 2) { insert($manager, 4, 6); } if ($numAwaitAttempts === 5) { insert($manager, 7, 9); } echo "Awaiting results...\n"; $numAwaitAttempts += 1; } ?> ===DONE=== --EXPECT-- Inserted 3 document(s): 1, 2, 3 {_id: 1} {_id: 2} {_id: 3} Awaiting results... Awaiting results... Inserted 3 document(s): 4, 5, 6 Awaiting results... {_id: 4} {_id: 5} {_id: 6} Awaiting results... Awaiting results... Inserted 3 document(s): 7, 8, 9 Awaiting results... {_id: 7} {_id: 8} {_id: 9} Awaiting results... ===DONE=== PK.h]e]%tests/bson-utcdatetime_error-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime requires object argument to implement DateTimeInterface --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected instance of DateTimeInterface, stdClass given ===DONE=== PK.h]rQ!tests/decimal128-3-valid-037.phptnu[--TEST-- Decimal128: [basx132] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000343000 {"d":{"$numberDecimal":"0.000000"}} 180000001364000000000000000000000000000000343000 180000001364000000000000000000000000000000343000 ===DONE===PK.h]"\:.tests/bson-symbol-serialization_error-004.phptnu[--TEST-- MongoDB\BSON\Symbol unserialization does not allow code to contain null bytes (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Symbol cannot contain null bytes ===DONE=== PK.h]:00tests/bson-decimal128-003.phptnu[--TEST-- MongoDB\BSON\Decimal128 Infinity values --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- Infinity Infinity Infinity Infinity Infinity Infinity Infinity Infinity ===DONE=== PK.h]v;-tests/manager-executeBulkWrite_error-011.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() BulkWriteException inherits labels from previous exception --SKIPIF-- --FILE-- selectServer(new \MongoDB\Driver\ReadPreference('primary')); // Create collection since it can't be (automatically) done within the transaction $majority = new MongoDB\Driver\WriteConcern(MongoDB\Driver\WriteConcern::MAJORITY); $server->executeWriteCommand( DATABASE_NAME, new MongoDB\Driver\Command(['create' => COLLECTION_NAME]), ['writeConcern' => $majority] ); configureTargetedFailPoint($server, 'failCommand', [ 'times' => 1 ], [ 'failCommands' => ['insert'], 'closeConnection' => true, ]); $session = $manager->startSession(); $session->startTransaction(); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); try { $server->executeBulkWrite(NS, $bulk, ['session' => $session]); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { printf("%s(%d): %s\n", get_class($e), $e->getCode(), $e->getMessage()); var_dump($e->hasErrorLabel('TransientTransactionError')); $prev = $e->getPrevious(); printf("%s(%d): %s\n", get_class($prev), $prev->getCode(), $prev->getMessage()); var_dump($prev->hasErrorLabel('TransientTransactionError')); } ?> ===DONE=== --EXPECTF-- MongoDB\Driver\Exception\BulkWriteException(0): Bulk write failed due to previous MongoDB\Driver\Exception\ConnectionTimeoutException: Failed to send "insert" command with database "%s": Failed to read 4 bytes: socket error or timeout bool(true) MongoDB\Driver\Exception\ConnectionTimeoutException(%d): Failed to send "insert" command with database "%s": Failed to read 4 bytes: socket error or timeout bool(true) ===DONE=== PK.h]B0!tests/decimal128-3-valid-059.phptnu[--TEST-- Decimal128: [basx137] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000323000 {"d":{"$numberDecimal":"0E-7"}} 180000001364000000000000000000000000000000323000 180000001364000000000000000000000000000000323000 ===DONE===PK.h]zz+tests/bson-timestamp-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\Timestamp::jsonSerialize() with json_encode() --FILE-- new MongoDB\BSON\Timestamp('1234', '5678')]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$timestamp" : { "t" : 5678, "i" : 1234 } } } {"foo":{"$timestamp":{"t":5678,"i":1234}}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } } ===DONE=== PK.h]%z!tests/decimal128-3-valid-031.phptnu[--TEST-- Decimal128: [basx682] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]u_tests/top-decodeError-010.phptnu[--TEST-- Top-level document validity: Stated length exceeds byte count, with valid envelope --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]  tests/bson-toPHP_error-004.phptnu[--TEST-- MongoDB\BSON\toPHP(): BSON decoding exceptions for bson_iter_visit_all() failure --FILE-- 'bar'])), // Invalid UTF-8 character in embedded document's field name str_replace('INVALID!', "INVALID\xFE", fromPHP(['foo' => ['INVALID!' => 'bar']])), // Invalid UTF-8 character in string within array field str_replace('INVALID!', "INVALID\xFE", fromPHP(['foo' => ['INVALID!']])), /* Note: we don't use a three-character string in the underflow case, as * the 4-byte string length and payload (i.e. three characters + null byte) * coincidentally satisfy the expected size for an 8-byte double. We also * don't use a four-character string, since its null byte would be * interpreted as the document terminator. The actual document terminator * would then remain in the buffer and trigger a "did not exhaust" error. */ pack('VCa*xVa*xx', 17, 1, 'foo', 3, 'ab'), // Invalid field type (underflow) pack('VCa*xVa*xx', 20, 1, 'foo', 6, 'abcde'), // Invalid field type (overflow) ); foreach ($tests as $bson) { echo throws(function() use ($bson) { toPHP($bson); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; } ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected corrupt BSON data for field path '' at offset 4 OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected corrupt BSON data for field path 'foo' at offset 0 OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected corrupt BSON data for field path 'foo' at offset 0 OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected corrupt BSON data for field path '' at offset 9 OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected unknown BSON type 0x65 for field path "". Are you using the latest driver? ===DONE=== PK.h]+ْ!tests/decimal128-3-valid-295.phptnu[--TEST-- Decimal128: [basx234] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003a3000 {"d":{"$numberDecimal":"1.265"}} 18000000136400f1040000000000000000000000003a3000 18000000136400f1040000000000000000000000003a3000 ===DONE===PK.h]O%1tests/bson-timestamp-serialization_error-002.phptnu[--TEST-- MongoDB\BSON\Timestamp unserialization requires positive unsigned 32-bit integers (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, -2147483648 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, -2147483648 given ===DONE=== PK.h]&tests/bson-timestampinterface-001.phptnu[--TEST-- MongoDB\BSON\TimestampInterface is implemented by MongoDB\BSON\Timestamp --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]v !tests/decimal128-3-valid-266.phptnu[--TEST-- Decimal128: [basx158] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364002c00000000000000000000000000523000 {"d":{"$numberDecimal":"4.4E+10"}} 180000001364002c00000000000000000000000000523000 180000001364002c00000000000000000000000000523000 ===DONE===PK.h]LQQ!tests/decimal128-5-valid-040.phptnu[--TEST-- Decimal128: [decq611] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000106102253e5ece4f200000fe5f00 {"d":{"$numberDecimal":"1.0000000000000000000000000000E+6139"}} 18000000136400000000106102253e5ece4f200000fe5f00 18000000136400000000106102253e5ece4f200000fe5f00 ===DONE===PK.h], *tests/session-getTransactionState-001.phptnu[--TEST-- MongoDB\Driver\Session::getTransactionState() --SKIPIF-- --FILE-- COLLECTION_NAME, ]); $manager->executeCommand(DATABASE_NAME, $cmd); /* Start a session */ $session = $manager->startSession(); echo "Test case: Empty transaction, and aborted empty transaction\n"; var_dump($session->getTransactionState()); $session->startTransaction(); var_dump($session->getTransactionState()); $session->abortTransaction(); var_dump($session->getTransactionState()); echo "\n"; echo "Test case: Empty transaction, and committed empty transaction\n"; $session->startTransaction(); var_dump($session->getTransactionState()); $session->commitTransaction(); var_dump($session->getTransactionState()); echo "\n"; echo "Test case: Aborted transaction with one operation\n"; $session->startTransaction(); var_dump($session->getTransactionState()); $bw = new \MongoDB\Driver\BulkWrite(); $bw->insert( [ '_id' => 0, 'msg' => 'Initial Value' ] ); $manager->executeBulkWrite(NS, $bw, ['session' => $session]); var_dump($session->getTransactionState()); $session->abortTransaction(); var_dump($session->getTransactionState()); echo "\n"; echo "Test case: Committed transaction with one operation\n"; $session->startTransaction(); var_dump($session->getTransactionState()); $bw = new \MongoDB\Driver\BulkWrite(); $bw->insert( [ '_id' => 0, 'msg' => 'Initial Value' ] ); $manager->executeBulkWrite(NS, $bw, ['session' => $session]); var_dump($session->getTransactionState()); $session->commitTransaction(); var_dump($session->getTransactionState()); ?> ===DONE=== --EXPECTF-- Test case: Empty transaction, and aborted empty transaction string(4) "none" string(8) "starting" string(7) "aborted" Test case: Empty transaction, and committed empty transaction string(8) "starting" string(9) "committed" Test case: Aborted transaction with one operation string(8) "starting" string(11) "in_progress" string(7) "aborted" Test case: Committed transaction with one operation string(8) "starting" string(11) "in_progress" string(9) "committed" ===DONE=== PK.h]a--tests/document-valid-004.phptnu[--TEST-- Document type (sub-documents): Dollar-prefixed key in sub-document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 170000000378000f000000022461000200000062000000 {"x":{"$a":"b"}} 170000000378000f000000022461000200000062000000 ===DONE===PK.h]ԛ&tests/decimal128-6-parseError-026.phptnu[--TEST-- Decimal128: Invalid --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]~o!tests/decimal128-3-valid-156.phptnu[--TEST-- Decimal128: [basx141] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000523000 {"d":{"$numberDecimal":"1E+9"}} 180000001364000100000000000000000000000000523000 180000001364000100000000000000000000000000523000 ===DONE===PK.h]p22!tests/decimal128-3-valid-018.phptnu[--TEST-- Decimal128: [basx604] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000343000 {"d":{"$numberDecimal":"0.000000"}} 180000001364000000000000000000000000000000343000 ===DONE===PK.h]^bb#tests/manager-executeQuery-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeQuery() one document (OP_QUERY) --SKIPIF-- =', '3.1'); ?> --FILE-- insert(array('_id' => 1, 'x' => 2, 'y' => 3)); $bulk->insert(array('_id' => 2, 'x' => 3, 'y' => 4)); $bulk->insert(array('_id' => 3, 'x' => 4, 'y' => 5)); $manager->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query(array('x' => 3), array('projection' => array('y' => 1))); $qr = $manager->executeQuery(NS, $query); var_dump($qr instanceof MongoDB\Driver\Cursor); var_dump($qr); $server = $qr->getServer(); var_dump($server instanceof MongoDB\Driver\Server); var_dump($server->getHost()); var_dump($server->getPort()); var_dump(iterator_to_array($qr)); ?> ===DONE=== --EXPECTF-- bool(true) object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(32) "manager_manager_executeQuery_001" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(3) } ["options"]=> object(stdClass)#%d (%d) { ["projection"]=> object(stdClass)#%d (%d) { ["y"]=> int(1) } } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> NULL ["session"]=> NULL ["isDead"]=> bool(false) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } bool(true) string(%d) "%s" int(%d) array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["y"]=> int(4) } } ===DONE=== PK.h]22tests/query-sort-003.phptnu[--TEST-- Sorting single field, ascending, using the Cursor Iterator --SKIPIF-- --FILE-- array('_id' => 0, 'username' => 1), 'sort' => array('username' => 1), )); var_dump($query); $cursor = $manager->executeQuery(NS, $query); var_dump(get_class($cursor)); foreach ($cursor as $document) { echo $document->username . "\n"; } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { } ["options"]=> object(stdClass)#%d (%d) { ["projection"]=> object(stdClass)#%d (%d) { ["_id"]=> int(0) ["username"]=> int(1) } ["sort"]=> object(stdClass)#%d (%d) { ["username"]=> int(1) } } ["readConcern"]=> NULL } string(21) "MongoDB\Driver\Cursor" aaliyah.kertzmann aaron89 abbott.alden abbott.flo abby76 abernathy.adrienne abernathy.audrey abner.kreiger aboehm abshire.icie abshire.jazlyn adams.delta adolph20 adonis.schamberger agleason ahartmann ahettinger akreiger al.cormier al97 albin95 alda.murray alden.blanda alessandra76 alex73 alexa01 alfred.ritchie alia07 alia72 alize.hegmann allie48 alta.sawayn alvena.pacocha alvis22 alycia48 amalia84 amely01 amos.corkery amos78 anahi95 anais.feest anais58 andreanne.steuber angela.dickinson angelina.bartoletti angelina31 aniyah.franecki annalise40 antoinette.gaylord antoinette.weissnat aoberbrunner apacocha apollich ara92 arch44 arely.ryan armstrong.clara armstrong.gordon arnold.kiehn arvel.hilll asatterfield aschuppe ashlynn71 ashlynn85 ashton.o'kon austen03 austen47 austin67 awintheiser awyman ayana.brakus bailey.mertz bailey.sarina balistreri.donald barrett.prohaska bartell.susie bashirian.lina bayer.ova baylee.maggio bbernier bblick beahan.oleta beatty.layne beatty.myrtis beau49 beaulah.mann bechtelar.nadia becker.theron beer.mossie beer.roselyn benedict.johnson berge.enoch bergnaum.roberto bernardo.mccullough bernardo52 bernhard.margaretta bernie.morissette bethel20 betty09 bins.aliyah bins.laisha bjori blanda.danielle blanda.irving blanda.ruthe blaze.miller block.kasandra block.toby bmccullough botsford.edwardo botsford.jennie boyd.balistreri boyer.khalid boyle.franco bpaucek bpurdy bradford.heidenreich brannon24 braun.adaline braun.jeanie breanne.schmeler breitenberg.demarco brennan.emmerich bret57 broderick53 brooklyn22 bruecker bstamm buckridge.julius buddy42 bwalker camilla20 cara.bechtelar carlotta.kreiger carolyn09 carolyne63 carroll.emmalee cartwright.garland casimir.keebler casper.eldred casper.juliana casper38 cassin.carmel cassin.krystel catherine.hilll cathrine.gislason cbartoletti cbecker cbednar cbreitenberg cecelia.schoen celestine97 cfriesen cgreenfelder chad.kuphal chance.conroy chasity63 chet.pacocha christina.simonis chyna05 citlalli41 ckertzmann clarabelle65 clementine.grimes clotilde39 cnikolaus cole.alice coleman55 collier.sage collins.skylar columbus78 connelly.josefina conner.doyle coralie47 cordelia25 corkery.arch cormier.adriana cormier.amy cormier.landen cormier.vida cory76 cpaucek cprice craig93 creola.emard creola88 crona.jaclyn cronin.clint crooks.josh crystel24 csipes cummings.frederic cwaelchi cwest cwhite cwolf cydney.hayes dahlia.white daisy.johns dakota.bednar dakota.wiza dallas.marquardt dante.shields darwin.howe dave46 davis.bennett davis.solon dayne.padberg dayton03 delaney91 delbert.auer delia.lindgren deontae36 dereck.ward derek.bahringer derek79 deven.spinka devon34 dgottlieb dhudson dickinson.ashleigh dillan66 djerde dock.bednar dolly.beer donnie.langosh dorothy67 dorthy.legros doyle.nelle drippin dubuque.brooklyn dubuque.cordia dvandervort dwiegand dwolf earlene.marvin earline.baumbach easter73 eauer ebert.cordie ebony.williamson ebony59 edgar33 edgardo.gorczany edibbert effertz.mateo effie.keeling efren31 egrimes ehirthe ehuel ehuels eino23 ekoelpin eldora.steuber eldred65 elenor33 elesch eli.mann elisabeth95 eliseo49 ella.roberts ellen.krajcik ellen12 elliot.kling elliot.weissnat ellis37 elsie.kuhic elva.baumbach elvis45 emelia.ortiz emerald.shanahan emerson07 emie.schneider emilio.crona emily91 emmalee.waters enid57 enid78 enoch.hilll enola.rath ephraim76 erdman.ethyl erdman.niko eriberto.russel erik04 erika74 ernser.addison ernser.geovany ervin.carter espinka ethan.daugherty ethel56 ethelyn46 ethyl68 ettie49 eulah49 fabian55 fadel.trevion fae00 fahey.rosalee farrell.asha farrell.lessie fbraun feeney.angelica feeney.elizabeth feeney.nathanial feil.rae ferdman ferry.eusebio fherman filomena18 finn.torphy flavie41 florida.o'hara ford85 fosinski frami.bulah franecki.rosetta fred35 freda25 frederik.stracke fsporer fstokes fturner gabriel.mccullough gardner.jacobson garnet.oberbrunner garry.windler gaylord.myrtis gblock gbrakus georgette.mueller geovanni.jones geovany07 german.leffler german40 ggislason gia15 gibson.amiya giovani.langworth giovanna.hickle giovanny.haley gislason.mae gisselle.jacobs gladyce88 glang gottlieb.jerry goyette.roman gparker gprosacco gracie.mcdermott graciela.jacobson grayson78 greenfelder.amya greenfelder.larry greenfelder.ozella gretchen19 gretchen38 greynolds greyson63 grimes.andreane gulgowski.allie gusikowski.aliyah gutkowski.laron gwunsch haag.alaina hackett.alycia hadley.abernathy hailee01 hal67 haley.grace haley.krystel haley.lauretta halvorson.bulah hammes.dimitri hand.lauren hand.tiana hansen.vanessa harber.larissa harber.vicenta harris.kailey hartmann.dedrick harvey.hillard haven13 hayes.delores hayley08 hazle21 hazle43 heathcote.ashly hegmann.sallie heidenreich.julia helene.o'connell henriette21 herman.sanford herzog.eileen hessel.barry hflatley hhackett hhyatt hickle.isabell hirthe.bryana hirthe.letitia hirthe.reymundo hmarvin hoeger.anastacio hollie29 howe.abagail howell.daugherty hquigley hrodriguez hspinka hstamm htowne hudson.bernie hudson.deion huels.alfred huels.enid hugh22 humberto98 hvandervort hyatt.astrid hyatt.soledad iabernathy idaugherty idella50 idonnelly ifeil ileuschke imuller ipredovic irwin.gutkowski irwin31 isabell95 isabella.parisian isac13 isac67 isaiah47 isaiah50 isaias90 isobel.mraz ivy73 izabella.hermann jacobs.carmela jada.romaguera jadon.reinger jailyn62 jalon90 jamaal.cassin jamarcus.weissnat janelle93 janice.walker jannie71 jaquan94 jaqueline.o'kon jarod94 jarrod.lindgren jasmin.ruecker javier.volkman javier13 javier62 jayda.d'amore jazmyne63 jborer jeanette45 jedidiah.hyatt jefferey02 jenkins.letha jerald.konopelski jeremy.o'keefe jessika.schmeler jessy16 jett00 jfeest jheaney jherzog jlebsack jlockman jo'hara jodie.casper johnnie66 johnston.brooklyn jonas97 jones.jazmyn jordan.turner joshua.mraz josiah59 joyce.casper jruecker jschamberger jschinner jthompson jtowne jude.jakubowski jude92 juliana.witting juliet55 june.runolfsson justina63 jwindler kadams kadin.mayer kaelyn05 kaelyn88 kamille.watsica kamron88 karson.mante kasey.abshire kassandra.reilly katheryn.walsh kathlyn02 kathryne.boehm kattie12 kaya24 kayleigh62 kbeahan kdicki keagan.hirthe keanu21 keanu42 keebler.rupert keeling.sydnee keira.dach kelly.konopelski kelvin.jakubowski kerluke.hiram kernser keshawn.boyle kessler.marisol keyon.gaylord keyon65 kherman khills khudson kiley63 kip12 kirk40 kirstin.cruickshank klarson kleuschke kling.laila klocko.filiberto kmohr ko'keefe koch.emmett koch.sophia koelpin.yoshiko krystel.stark kturcotte kub.marcel kuhic.hattie kuhlman.noel kuphal.ahmed kutch.chase kutch.madonna kutch.pasquale kuvalis.nicolette lane05 larkin.lawson larue.schuster laurel35 laurel72 laurence28 lauryn.beer lbode lbradtke leanne.cronin leannon.zander lebsack.harmony ledner.finn leif52 leilani73 lemke.ernestina lempi56 leopold69 lesch.delfina lesch.edna lesch.nyah leuschke.erika lexie.bernier lexie65 lgrady lillian50 lilliana.schaden lily.hansen lind.dane lloyd60 lmckenzie lnicolas london07 lonnie.little lonnie10 loraine.hammes lorna31 louisa76 lquitzon lubowitz.colleen lubowitz.jazmyne lucas.ferry luciano79 lucienne13 lucio.huel lucio20 luella.deckow lullrich luther.lesch mac.hermann macey95 macie.corwin macy.greenholt maddison66 madilyn.wyman madisyn51 madyson.johns maeve.raynor maggio.kayli maia14 mante.ashlee mante.maymie marc97 marcel56 marco.gerlach mariana.sipes marietta.swift marina.mayert marion15 marion35 marjolaine45 mark.casper marks.trace marlen34 marlene95 marley.sipes marvin.ivory maryjane.kutch maudie25 mayer.tanner mccullough.vella mcdermott.kaitlyn mckenzie.maximus mdare meaghan89 melisa61 metz.elmer metz.ima michaela.wolf miles.pollich milford39 milford40 mills.emmanuel mills.rickey miracle53 misty.boyer mitchell.delta mitchell.rafael mohammad.gorczany mohammed.lemke mohr.kylee mollie.deckow monroe.o'keefe monserrate.leannon monserrate.nikolaus monty.mills morar.aniya mosciski.alanis mraz.marcelina mrunte mtoy mueller.woodrow muller.akeem murazik.maximillia mwalter mylene.rogahn myra43 myron.bechtelar mzemlak mzieme nash88 nasir24 natalia66 nathanial37 nayeli.vandervort ndouglas neal.hand neichmann neil.gorczany nellie23 ngoldner nhaag nharber nharris nicolas.melyssa nicolas.wendy nikita.romaguera nikko.langosh nikolas.lang nikolas78 nikolaus.celestino njacobs nkshlerin noah.blick nolan.nora nolan.zachariah nolan56 norma46 novella67 npurdy nrath nrowe nstamm nward o'conner.arthur obie.weissnat oboyer octavia36 oda.robel odare odell96 ogulgowski ohaley ohowe okuneva.ebba olga.mertz olga.waelchi olin13 oliver.reichert olson.dedrick olynch omarvin omer.kirlin ondricka.alexzander ondricka.joy orion.quigley orn.katelyn orval95 oswaldo.kunze otreutel owehner owen82 pacocha.quentin pagac.coleman paige.murphy parisian.dena parker.ellie patience65 patricia.macejkovic pattie.waters pattie97 paul.hayes paula.fahey paxton73 pbotsford pconroy pcruickshank pdach perry63 pfannerstill.erna pframi phahn philpert phodkiewicz phoebe.crona phuel pierre.grant plesch pollich.danika polson powlowski.alfredo ppurdy price49 prohaska.ransom prudence76 prussel pschowalter pwaters pwatsica pwisozk qarmstrong qbatz qgislason qkunze qmayert qo'hara qpowlowski qromaguera qryan qschiller qschneider queen75 queenie33 quitzon.greyson quitzon.maxime rachel45 raphaelle55 ratke.aurelia rau.brent raven.walter raven.ziemann raymundo.ferry raynor.wilmer rdickens regan86 reginald.gulgowski reichert.margaretta reinger.johnathan remington.russel renner.lucius rey29 rice.ronaldo rico71 river66 rkoelpin rmayer robel.chance rocky.hoeger rodger.raynor rodolfo.effertz rohan.harmon rolando38 rolfson.jaren rosalee52 rosemarie.conn rosenbaum.elisa rosetta45 rowe.erik rschowalter rubie.hyatt russel64 rutherford.dawn sabina11 samara90 sarina.bednar savannah89 savion82 sawayn.catharine sawayn.pink sbailey schamberger.marcelle schiller.kameron schimmel.mavis schimmel.russell schmeler.dillon schmeler.flo schmidt.elwyn schmitt.magali schneider.rita schowalter.abbigail schroeder.zoey schulist.angelo schumm.carley schumm.danielle sebert selina.thiel sferry shaina.emard shanie.murazik sheathcote shegmann shields.bethany shoeger shyann28 sienna53 sigmund.schinner simeon.nader skihn skiles.darrin skye.jast skyla.friesen smith.nico so'kon soledad.connelly sonia05 sorn spencer.bessie spencer.darrel sschumm ssteuber stacy.leffler stark.vladimir stehr.odell stella.schowalter stracke.dakota streich.abdiel stroman.rae susanna55 swyman sylvia82 tabitha.mohr talon74 tanya65 tatum.harvey tbarrows tcole terry.corene terry.florian tessie.stroman tgrady thalia22 theo62 theodore55 theresia68 theron10 tkonopelski tlind tomas04 toni57 toy.deshawn trace03 tressa.price tressie47 treutel.evert treutel.minnie trolfson tromp.kaleigh trudie09 trutherford tsatterfield tstamm turcotte.armand turner.considine twila75 uabshire uchamplin udach ugusikowski uhansen ujenkins ukovacek ulesch ulises.beatty ulises44 ullrich.layne umraz una.larkin unique.pagac upton.zackery urban24 uschmeler uschumm usmith uwisoky uzieme van.ruecker vandervort.ezekiel vbins vborer vbraun vconn vdickinson veffertz velda.wehner velma37 vena.schumm verda93 vesta.ritchie veum.tyrell vivianne.macejkovic von.britney vorn vpfeffer vrolfson vschulist vvolkman vwaters wade91 walker.alec walsh.vincenza walter.lester walter.norval walton33 warren.feest watson70 webster48 webster70 weimann.tillman west.cristobal west.jude wiegand.blanche wilderman.sophia wilfred.feil will.edwina will.jerod will.lamont willms.amari wilson.white winnifred08 wisozk.cortez witting.chris witting.walker wiza.carmel wkertzmann wolff.caroline wpacocha wschaefer wschimmel wunsch.mose wwilkinson xcassin xgibson xgutmann xhermann xkohler xrodriguez yasmin55 yasmine.lowe ycole yfritsch yhudson yklein ylarkin yost.ari yost.magali ypredovic ywiza ywyman yyost zachery33 zboyle zella78 zheathcote ziemann.webster zieme.noemi zoe41 zstanton zulauf.amaya ===DONE=== PK.h]:qltests/server-construct-001.phptnu[--TEST-- MongoDB\Driver\Server::__construct() --SKIPIF-- --FILE-- getInfo()['me'] : URI; $parsed = parse_url($uri); $manager = create_test_manager(); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array('foo' => 'bar')); $server = $manager->executeBulkWrite(NS, $bulk)->getServer(); $expectedHost = $parsed['host']; $expectedPort = (integer) (isset($parsed['port']) ? $parsed['port'] : 27017); var_dump($server->getHost() == $expectedHost); var_dump($server->getPort() == $expectedPort); ?> ===DONE=== --EXPECTF-- bool(true) bool(true) ===DONE=== PK.h]eO{{!tests/decimal128-5-valid-024.phptnu[--TEST-- Decimal128: [decq200] underflow edge cases (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffffff095bc138938d44c64d31008000 {"d":{"$numberDecimal":"-9.99999999999999999999999999999999E-6144"}} 18000000136400ffffffff095bc138938d44c64d31008000 18000000136400ffffffff095bc138938d44c64d31008000 ===DONE===PK.h];xkk4tests/manager-ctor-disableClientPersistence-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): disableClientPersistence option --FILE-- false]); // Will reuse the previous client due to same options new MongoDB\Driver\Manager(null, [], ['disableClientPersistence' => false]); // Will create a non-persistent client new MongoDB\Driver\Manager(null, [], ['disableClientPersistence' => true]); // Will create another non-persistent client new MongoDB\Driver\Manager(null, [], ['disableClientPersistence' => true]); ini_set('mongodb.debug', ''); ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored persistent client with hash: %s [%s] PHONGO: DEBUG > Not destroying persistent client for Manager%A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored persistent client with hash: %s [%s] PHONGO: DEBUG > Not destroying persistent client for Manager%A [%s] PHONGO: DEBUG > Found client for hash: %s [%s] PHONGO: DEBUG > Not destroying persistent client for Manager%A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A ===DONE=== PK.h])cc!tests/decimal128-3-valid-005.phptnu[--TEST-- Decimal128: [basx027] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000f270000000000000000000000003ab000 {"d":{"$numberDecimal":"-9.999"}} 180000001364000f270000000000000000000000003ab000 ===DONE===PK.h]d! tests/writeresult-debug-001.phptnu[--TEST-- MongoDB\Driver\WriteResult debug output without errors --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk); var_dump($result); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteResult)#%d (%d) { ["nInserted"]=> int(1) ["nMatched"]=> int(1) ["nModified"]=> int(1) ["nRemoved"]=> int(1) ["nUpserted"]=> int(2) ["upsertedIds"]=> array(2) { [0]=> array(2) { ["index"]=> int(2) ["_id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } } [1]=> array(2) { ["index"]=> int(3) ["_id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } } } ["writeErrors"]=> array(0) { } ["writeConcernError"]=> NULL ["writeConcern"]=> object(MongoDB\Driver\WriteConcern)#%d (%d) { } } ===DONE=== PK.h]ӻ_  !tests/decimal128-3-valid-222.phptnu[--TEST-- Decimal128: [basx321] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000443000 {"d":{"$numberDecimal":"1.0E+3"}} 180000001364000a00000000000000000000000000443000 180000001364000a00000000000000000000000000443000 ===DONE===PK.h]?tests/top-parseError-024.phptnu[--TEST-- Top-level document validity: Bad $code with $scope (scope is number, not doc) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]J6Ldd!tests/decimal128-2-valid-004.phptnu[--TEST-- Decimal128: [decq821] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffff7f0000000000000000000040b000 {"d":{"$numberDecimal":"-2147483647"}} 18000000136400ffffff7f0000000000000000000040b000 ===DONE===PK.h]0UUtests/readconcern-002.phptnu[--TEST-- ReadConcern: MongoDB\Driver\Manager::executeQuery() with readConcern option (OP_QUERY) --SKIPIF-- =', '3.1'); ?> --FILE-- insert(['_id' => 1, 'x' => 1]); $bulk->insert(['_id' => 2, 'x' => 2]); $manager->executeBulkWrite(NS, $bulk); $rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL); $query = new MongoDB\Driver\Query(['x' => 2], ['readConcern' => $rc]); echo throws(function() use ($manager, $query) { $manager->executeQuery(NS, $query); }, 'MongoDB\Driver\Exception\RuntimeException'), "\n"; $rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY); $query = new MongoDB\Driver\Query(['x' => 2], ['readConcern' => $rc]); echo throws(function() use ($manager, $query) { $manager->executeQuery(NS, $query); }, 'MongoDB\Driver\Exception\RuntimeException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\RuntimeException The selected server does not support readConcern OK: Got MongoDB\Driver\Exception\RuntimeException The selected server does not support readConcern ===DONE=== PK.h]tests/code-decodeError-007.phptnu[--TEST-- Javascript Code: invalid UTF-8 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]ytests/top-parseError-026.phptnu[--TEST-- Top-level document validity: Bad $timestamp ('t' type is string, not number) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]xmtests/session-constants.phptnu[--TEST-- MongoDB\Driver\Session constants --FILE-- ===DONE=== --EXPECTF-- string(4) "none" string(8) "starting" string(11) "in_progress" string(9) "committed" string(7) "aborted" ===DONE=== PK.h]'H!tests/decimal128-5-valid-034.phptnu[--TEST-- Decimal128: [decq438] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000fedf00 {"d":{"$numberDecimal":"-0E+6111"}} 180000001364000000000000000000000000000000fedf00 180000001364000000000000000000000000000000fedf00 ===DONE===PK.h]k/tests/commandStartedEvent-getServiceId-002.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandStartedEvent omits serviceId for non-load balanced topology --SKIPIF-- --FILE-- getCommandName()); var_dump($event->getServiceId()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(); $manager->addSubscriber(new MySubscriber); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); ?> --EXPECTF-- commandStarted: ping NULL PK.h]֚MMtests/query-ctor-006.phptnu[--TEST-- MongoDB\Driver\Query construction "allowPartialResults" overrides "partial" option --FILE-- 1], ['partial' => true] )); var_dump(new MongoDB\Driver\Query( ['x' => 1], [ 'allowPartialResults' => false, 'partial' => true, ] )); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["allowPartialResults"]=> bool(true) } ["readConcern"]=> NULL } object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["allowPartialResults"]=> bool(false) } ["readConcern"]=> NULL } ===DONE=== PK.h]bϜww!tests/causal-consistency-007.phptnu[--TEST-- Causal consistency: reads in non-causally consistent session never include afterClusterTime --SKIPIF-- --FILE-- observe( function() { $manager = create_test_manager(); $session = $manager->startSession(['causalConsistency' => false]); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); $manager->executeQuery(NS, $query, ['session' => $session]); }, function(stdClass $command) { $hasAfterClusterTime = isset($command->readConcern->afterClusterTime); printf("Read includes afterClusterTime: %s\n", ($hasAfterClusterTime ? 'yes' : 'no')); } ); ?> ===DONE=== --EXPECT-- Read includes afterClusterTime: no Read includes afterClusterTime: no ===DONE=== PK.h]ܳ1tests/manager-ctor-auto_encryption-error-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): auto encryption when compiling without libmongocrypt --SKIPIF-- --FILE-- []]); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot enable automatic field-level encryption. Please recompile with support for libmongocrypt using the with-mongodb-client-side-encryption configure switch. ===DONE=== PK.h]be:00!tests/decimal128-2-valid-029.phptnu[--TEST-- Decimal128: [decq404] zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000000000 {"d":{"$numberDecimal":"0E-6176"}} 180000001364000000000000000000000000000000000000 ===DONE===PK.h]88!tests/decimal128-2-valid-023.phptnu[--TEST-- Decimal128: [decq160] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400010000000000000000000000000040b000 {"d":{"$numberDecimal":"-1"}} 18000000136400010000000000000000000000000040b000 ===DONE===PK.h]q"u  tests/bug1266.phptnu[--TEST-- Test for PHPC-1266: Empty deeply nested BSON document causes unallocated memory writes --FILE-- ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["value"]=> object(stdClass)#%d (%d) { ["payload"]=> object(stdClass)#%d (%d) { ["PayloadMasterDataMeteringPointPartyEvent"]=> object(stdClass)#%d (%d) { ["MeteringPointPartyDetailMeteringPointPartyCharacteristic"]=> object(stdClass)#%d (%d) { ["AdministrativePartyMPAdministrativeParty"]=> array(%d) { [0]=> object(stdClass)#%d (%d) { ["AdministrativePartyAddressLocationAddress"]=> object(stdClass)#%d (%d) { ["StreetCode"]=> object(stdClass)#%d (%d) { } } } } } } } } } ===DONE=== PK.h]e#tests/bson-undefined_error-001.phptnu[--TEST-- MongoDB\BSON\Undefined cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyUndefined %s final class %SMongoDB\BSON\Undefined%S in %s on line %d PK.h]5BB&tests/server-executeBulkWrite-004.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() with legacy write concern (replica set secondary) --SKIPIF-- --FILE-- false]); $server = $manager->selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY)); $writeConcerns = array(1, 2, MongoDB\Driver\WriteConcern::MAJORITY); foreach ($writeConcerns as $wc) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array('wc' => $wc)); echo throws(function() use ($server, $bulk, $wc) { $server->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern($wc)); }, "MongoDB\Driver\Exception\RuntimeException"), "\n"; } ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\RuntimeException not %r(primary|master)%r OK: Got MongoDB\Driver\Exception\RuntimeException not %r(primary|master)%r OK: Got MongoDB\Driver\Exception\RuntimeException not %r(primary|master)%r ===DONE=== PK.h]-;;!tests/decimal128-2-valid-024.phptnu[--TEST-- Decimal128: [decq172] Nmin and below --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000428000 {"d":{"$numberDecimal":"-1E-6143"}} 180000001364000100000000000000000000000000428000 ===DONE===PK.h];Ζ55!tests/decimal128-2-valid-138.phptnu[--TEST-- Decimal128: [decq730] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400e203000000000000000000000000403000 {"d":{"$numberDecimal":"994"}} 18000000136400e203000000000000000000000000403000 ===DONE===PK.h]+q͢#tests/serverApi-var_export-001.phptnu[--TEST-- MongoDB\Driver\ServerApi: var_export() --FILE-- ===DONE=== --EXPECTF-- MongoDB\Driver\ServerApi::__set_state(array( 'version' => '1', 'strict' => NULL, 'deprecationErrors' => NULL, )) MongoDB\Driver\ServerApi::__set_state(array( 'version' => '1', 'strict' => true, 'deprecationErrors' => NULL, )) MongoDB\Driver\ServerApi::__set_state(array( 'version' => '1', 'strict' => NULL, 'deprecationErrors' => true, )) MongoDB\Driver\ServerApi::__set_state(array( 'version' => '1', 'strict' => false, 'deprecationErrors' => false, )) ===DONE=== PK.h]m2__!tests/decimal128-3-valid-242.phptnu[--TEST-- Decimal128: [basx010] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640069000000000000000000000000003e3000 {"d":{"$numberDecimal":"10.5"}} 1800000013640069000000000000000000000000003e3000 ===DONE===PK.h]'GG!tests/decimal128-5-valid-045.phptnu[--TEST-- Decimal128: [decq621] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000080f64ae1c7022d1500000000fe5f00 {"d":{"$numberDecimal":"1.00000000000000000000000E+6134"}} 18000000136400000080f64ae1c7022d1500000000fe5f00 18000000136400000080f64ae1c7022d1500000000fe5f00 ===DONE===PK.h]!tests/decimal128-3-valid-143.phptnu[--TEST-- Decimal128: [basx259] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003c3000 {"d":{"$numberDecimal":"12.65"}} 18000000136400f1040000000000000000000000003c3000 18000000136400f1040000000000000000000000003c3000 ===DONE===PK.h];!tests/decimal128-3-valid-150.phptnu[--TEST-- Decimal128: [basx159] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640049000000000000000000000000002e3000 {"d":{"$numberDecimal":"7.3E-8"}} 1800000013640049000000000000000000000000002e3000 1800000013640049000000000000000000000000002e3000 ===DONE===PK.h] ^$$%tests/bulkwrite-update_error-002.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() with invalid update document --FILE-- update(['x' => 1], ['$set' => ['x' => ['' => 1]]]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['$set' => ['x' => ["\xc3\x28" => 1]]]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; /* This newObj argument mixes an update and replacement document, but * php_phongo_bulkwrite_update_has_operators() will categorize it as an update * due to the presence of an atomic operator. As such, _mongoc_validate_update() * will report the error. */ echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['$set' => ['y' => 1], 'z' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException invalid argument for update: empty key OK: Got MongoDB\Driver\Exception\InvalidArgumentException invalid argument for update: corrupt BSON OK: Got MongoDB\Driver\Exception\InvalidArgumentException Invalid key 'z': update only works with $ operators and pipelines ===DONE===PK.h]@R:tests/array-valid-003.phptnu[--TEST-- Array: Single Element Array with index set incorrectly to empty string --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($degenerateBson))), "\n"; // Degenerate BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($degenerateBson)), "\n"; ?> ===DONE=== --EXPECT-- 140000000461000c0000001030000a0000000000 {"a":[{"$numberInt":"10"}]} 140000000461000c0000001030000a0000000000 140000000461000c0000001030000a0000000000 {"a":[{"$numberInt":"10"}]} ===DONE===PK.h]qjD&tests/decimal128-4-parseError-008.phptnu[--TEST-- Decimal128: [basx563] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]yOL &tests/transaction-integration-001.phptnu[--TEST-- MongoDB\Driver\Session::startTransaction() Committing a transaction with example for how to handle failures --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => $EMPLOYEES_COL ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $manager->executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => $EVENTS_COL ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); /* Do the transaction */ $session = $manager->startSession(); $session->startTransaction( [ 'readConcern' => new \MongoDB\Driver\ReadConcern( "snapshot" ), 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); while (true) { try { $cmd = new \MongoDB\Driver\Command( [ 'update' => $EMPLOYEES_COL, 'updates' => [ [ 'q' => [ 'employee' => 3 ], 'u' => [ '$set' => [ 'status' => 'Inactive' ] ], ] ] ] ); $manager->executeCommand(DATABASE_NAME, $cmd, ['session' => $session]); $cmd = new \MongoDB\Driver\Command( [ 'insert' => $EVENTS_COL, 'documents' => [ [ 'employee' => 3, 'status' => [ 'new' => 'Inactive', 'old' => 'Active' ] ] ] ] ); $manager->executeCommand(DATABASE_NAME, $cmd, ['session' => $session]); $session->commitTransaction(); echo "Transaction committed.\n";break; } catch (\MongoDB\Driver\Exception\CommandException $e) { $rd = $e->getResultDocument(); if (isset($rd->errorLabels) && in_array('TransientTransactionError', $rd->errorLabels)) { echo "Temporary error: ", $e->getMessage(), ", retrying...\n"; $rd = $e->getResultDocument(); var_dump($rd); continue; } else { var_dump($e); } break; } } ?> ===DONE=== --EXPECTF-- Transaction committed. ===DONE=== PK.h]c 1tests/manager-ctor-read_preference-error-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid read preference (maxStalenessSeconds) --FILE-- 'invalid']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; // Invalid range in URI string (array option is tested in 64-bit error test) echo throws(function() { create_test_manager('mongodb://127.0.0.1/?readPreference=secondary&maxStalenessSeconds=2147483648'); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; // Invalid values echo throws(function() { create_test_manager('mongodb://127.0.0.1/?maxstalenessseconds=1231'); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://127.0.0.1/?maxStalenessSeconds=1231'); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager(null, ['maxstalenessseconds' => 1231]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager(null, ['maxStalenessSeconds' => 1231]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager(null, ['readPreference' => 'secondary', 'maxStalenessSeconds' => -2]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager(null, ['readPreference' => 'secondary', 'maxStalenessSeconds' => 0]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager(null, ['readPreference' => 'secondary', 'maxStalenessSeconds' => 42]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=secondary&maxStalenessSeconds=invalid'. Unsupported value for "maxstalenessseconds": "invalid". OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected integer for "maxStalenessSeconds" URI option, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=secondary&maxStalenessSeconds=2147483648'. Unsupported value for "maxstalenessseconds": "2147483648". OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?maxstalenessseconds=1231'. Invalid readPreferences. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?maxStalenessSeconds=1231'. Invalid readPreferences. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Primary read preference mode conflicts with maxStalenessSeconds OK: Got MongoDB\Driver\Exception\InvalidArgumentException Primary read preference mode conflicts with maxStalenessSeconds OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected maxStalenessSeconds to be >= 90, -2 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected maxStalenessSeconds to be >= 90, 0 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected maxStalenessSeconds to be >= 90, 42 given ===DONE=== PK.h]4#tests/manager-selectServer-001.phptnu[--TEST-- MongoDB\Driver\Manager::selectServer() select a server from SDAM based on ReadPreference --SKIPIF-- --FILE-- selectServer($rp); $rp2 = new MongoDB\Driver\ReadPreference('primary'); $server2 = $manager->selectServer($rp2); // load fixtures for test $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1, 'x' => 2, 'y' => 3]); $bulk->insert(['_id' => 2, 'x' => 3, 'y' => 4]); $bulk->insert(['_id' => 3, 'x' => 4, 'y' => 5]); $server->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); $cursor = $server->executeQuery(NS, $query); var_dump($cursor instanceof MongoDB\Driver\Cursor); var_dump($server == $cursor->getServer()); var_dump(iterator_to_array($cursor)); $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); $cursor = $server2->executeQuery(NS, $query); var_dump($cursor instanceof MongoDB\Driver\Cursor); var_dump($server2 == $cursor->getServer()); var_dump(iterator_to_array($cursor)); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1, 'x' => 2, 'y' => 3]); $bulk->insert(['_id' => 2, 'x' => 3, 'y' => 4]); $bulk->insert(['_id' => 3, 'x' => 4, 'y' => 5]); throws(function() use($server2, $bulk) { $server2->executeBulkWrite(NS, $bulk); }, "MongoDB\Driver\Exception\BulkWriteException"); ?> ===DONE=== --EXPECTF-- bool(true) bool(true) array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["y"]=> int(4) } } bool(true) bool(true) array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["y"]=> int(4) } } OK: Got MongoDB\Driver\Exception\BulkWriteException ===DONE=== PK.h]Z``2tests/bson-decimal128-serialization_error-004.phptnu[--TEST-- MongoDB\BSON\Decimal128 unserialization requires valid decimal string (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing Decimal128 string: INVALID ===DONE=== PK.h]Gvv!tests/decimal128-2-valid-056.phptnu[--TEST-- Decimal128: [decq618] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000004a48011416954508000000fe5f00 {"d":{"$numberDecimal":"1.0000000000000000000000000E+6136"}} 180000001364000000004a48011416954508000000fe5f00 ===DONE===PK.h]V55!tests/decimal128-2-valid-124.phptnu[--TEST-- Decimal128: [decq732] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000802000000000000000000000000403000 {"d":{"$numberDecimal":"520"}} 180000001364000802000000000000000000000000403000 ===DONE===PK.h](f+tests/bson-int64-clone-001.phptnu[--TEST-- MongoDB\BSON\Int64 can be cloned --SKIPIF-- --FILE-- foo = 'bar'; $clone = clone $int64; var_dump($clone == $int64); var_dump($clone === $int64); unset($int64); var_dump($clone); var_dump($clone->foo); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(19) "9223372036854775807" } string(3) "bar" ===DONE=== PK.h]5!tests/decimal128-3-valid-293.phptnu[--TEST-- Decimal128: [basx235] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003c3000 {"d":{"$numberDecimal":"12.65"}} 18000000136400f1040000000000000000000000003c3000 18000000136400f1040000000000000000000000003c3000 ===DONE===PK.h]$**tests/bson-fromPHP-005.phptnu[--TEST-- BSON\fromPHP(): PHP document with public property whose name is an empty string --FILE-- 1], (object) ['' => 1], ]; foreach ($tests as $document) { $s = fromPHP($document); echo "Test ", toJSON($s), "\n"; hex_dump($s); } ?> ===DONE=== --EXPECT-- Test { "" : 1 } 0 : 0b 00 00 00 10 00 01 00 00 00 00 [...........] Test { "" : 1 } 0 : 0b 00 00 00 10 00 01 00 00 00 00 [...........] ===DONE=== PK.h]IAu$tests/commandSucceededEvent-002.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandSucceededEvent: requestId and operationId match --SKIPIF-- --FILE-- getCommandName(), "\n"; $this->startRequestId = $event->getRequestId(); $this->startOperationId = $event->getOperationId(); } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { echo "succeeded: ", $event->getCommandName(), "\n"; echo "- requestId matches: ", $this->startRequestId == $event->getRequestId() ? 'yes' : 'no', " \n"; echo "- operationId matches: ", $this->startOperationId == $event->getOperationId() ? 'yes' : 'no', " \n"; } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $query = new MongoDB\Driver\Query( [] ); $subscriber = new MySubscriber; MongoDB\Driver\Monitoring\addSubscriber( $subscriber ); $cursor = $m->executeQuery( "demo.test", $query ); ?> --EXPECT-- started: find succeeded: find - requestId matches: yes - operationId matches: yes PK.h]PT*tests/code-valid-002.phptnu[--TEST-- Javascript Code: Single character --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0e0000000d610002000000620000 {"a":{"$code":"b"}} 0e0000000d610002000000620000 ===DONE===PK.h].L22tests/findAndModify-001.phptnu[--TEST-- MongoDB\Driver\Command with findAndModify and arrayFilters --SKIPIF-- --FILE-- insert([ '_id' => 1, 'grades' => [ 95, 92, 90 ] ]); $bulk->insert([ '_id' => 2, 'grades' => [ 98, 100, 102 ] ]); $bulk->insert([ '_id' => 3, 'grades' => [ 95, 110, 100 ] ]); $manager->executeBulkWrite(DATABASE_NAME . '.' . COLLECTION_NAME, $bulk); $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['grades' => [ '$gt' => 100 ] ], 'update' => ['$set' => [ 'grades.$[element]' => 100 ] ], 'arrayFilters' => [ [ 'element' => [ '$gt' => 100 ] ] ], ]); // Running this twice, because findAndModify only updates the first document // it finds. $manager->executeCommand(DATABASE_NAME, $command); $manager->executeCommand(DATABASE_NAME, $command); $cursor = $manager->executeQuery( DATABASE_NAME . '.' . COLLECTION_NAME, new \MongoDB\Driver\Query([])); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- array(%d) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(1) ["grades"]=> array(%d) { [0]=> int(95) [1]=> int(92) [2]=> int(90) } } [1]=> object(stdClass)#%d (%d) { ["_id"]=> int(2) ["grades"]=> array(%d) { [0]=> int(98) [1]=> int(100) [2]=> int(100) } } [2]=> object(stdClass)#%d (%d) { ["_id"]=> int(3) ["grades"]=> array(%d) { [0]=> int(95) [1]=> int(100) [2]=> int(100) } } } ===DONE=== PK.h]"|&tests/decimal128-7-parseError-050.phptnu[--TEST-- Decimal128: [basx554] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]Ҽnn'tests/bson-regex-jsonserialize-003.phptnu[--TEST-- MongoDB\BSON\Regex::jsonSerialize() with json_encode() (without flags) --FILE-- new MongoDB\BSON\Regex('pattern')]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$regex" : "pattern", "$options" : "" } } {"foo":{"$regex":"pattern","$options":""}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(7) "pattern" ["flags"]=> string(0) "" } } ===DONE=== PK.h]za)&tests/decimal128-7-parseError-058.phptnu[--TEST-- Decimal128: [basx548] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]ӷ%]%tests/bulkwrite-update_error-003.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() with invalid options --FILE-- update(['x' => 1], ['y' => 1], ['multi' => true]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['y' => 1], ['collation' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['$set' => ['y' => 1]], ['collation' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['$set' => ['y' => 1]], ['arrayFilters' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['$set' => ['y' => 1]], ['arrayFilters' => ['foo' => 'bar']]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['$set' => ['y' => 1]], ['hint' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Replacement document conflicts with true "multi" option OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "collation" option to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "collation" option to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "arrayFilters" option to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException "arrayFilters" option has invalid keys for a BSON array OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "hint" option to be string, array, or object, int%S given ===DONE=== PK.h]~1!tests/decimal128-3-valid-282.phptnu[--TEST-- Decimal128: [basx213] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000363000 {"d":{"$numberDecimal":"0.01265"}} 18000000136400f104000000000000000000000000363000 18000000136400f104000000000000000000000000363000 ===DONE===PK.h] tests/regex-decodeError-002.phptnu[--TEST-- Regular Expression type: Null byte in flags string --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]h*!tests/decimal128-3-valid-267.phptnu[--TEST-- Decimal128: [basx068] examples --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364003200000000000000000000000000323000 {"d":{"$numberDecimal":"0.0000050"}} 180000001364003200000000000000000000000000323000 180000001364003200000000000000000000000000323000 ===DONE===PK.h]#tests/readpreference-constants.phptnu[--TEST-- MongoDB\Driver\ReadPreference constants --FILE-- ===DONE=== --EXPECTF-- int(1) int(5) int(2) int(6) int(10) int(-1) int(90) string(7) "primary" string(16) "primaryPreferred" string(9) "secondary" string(18) "secondaryPreferred" string(7) "nearest" ===DONE=== PK.h]*GDu(tests/commandStartedEvent-debug-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandStartedEvent debug output --SKIPIF-- --FILE-- addSubscriber(new MySubscriber); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Monitoring\CommandStartedEvent)#%d (%d) { ["command"]=> object(stdClass)#%d (%d) {%A } ["commandName"]=> string(4) "ping" ["databaseName"]=> string(%d) "%s" ["operationId"]=> string(%d) "%d" ["requestId"]=> string(%d) "%d" ["server"]=> object(MongoDB\Driver\Server)#%d (%d) {%A } ["serviceId"]=> %r(NULL|object\(MongoDB\\BSON\\ObjectId\).*)%r } ===DONE=== PK.h]W&tests/decimal128-6-parseError-024.phptnu[--TEST-- Decimal128: Invalid --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]+;(tests/bson-maxkey-serialization-002.phptnu[--TEST-- MongoDB\BSON\MaxKey serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\MaxKey)#%d (%d) { } string(31) "O:19:"MongoDB\BSON\MaxKey":0:{}" object(MongoDB\BSON\MaxKey)#%d (%d) { } ===DONE=== PK.h]]Z,tests/bson-objectid-set_state_error-001.phptnu[--TEST-- MongoDB\BSON\ObjectId::__set_state() requires "oid" string field --FILE-- 0]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\ObjectId initialization requires "oid" string field ===DONE=== PK.h]itests/bug1151-004.phptnu[--TEST-- PHPC-1151: Segfault if session unset before cursor is killed (aggregate) --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [], 'cursor' => ['batchSize' => 2], ]); $session = $manager->startSession(); $cursor = $manager->executeReadCommand(DATABASE_NAME, $command, ['session' => $session]); unset($session); unset($cursor); ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]95.tests/bson-binary-serialization_error-005.phptnu[--TEST-- MongoDB\BSON\Binary unserialization requires unsigned 8-bit integer for type (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected type to be an unsigned 8-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected type to be an unsigned 8-bit integer, 256 given ===DONE=== PK.h] DJJ,tests/bson-javascript-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\Javascript::jsonSerialize() return value (without scope) --FILE-- jsonSerialize()); ?> ===DONE=== --EXPECT-- array(1) { ["$code"]=> string(33) "function foo(bar) { return bar; }" } ===DONE=== PK.h]"!tests/decimal128-4-valid-005.phptnu[--TEST-- Decimal128: [basx043] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400fc040000000000000000000000003c3000 {"d":{"$numberDecimal":"12.76"}} 18000000136400fc040000000000000000000000003c3000 18000000136400fc040000000000000000000000003c3000 ===DONE===PK.h]4KBB.tests/bson-binary-serialization_error-002.phptnu[--TEST-- MongoDB\BSON\Binary unserialization requires unsigned 8-bit integer for type (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected type to be an unsigned 8-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected type to be an unsigned 8-bit integer, 256 given ===DONE=== PK.h]s2 Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000fe5f00 {"d":{"$numberDecimal":"1E+6111"}} 180000001364000100000000000000000000000000fe5f00 ===DONE===PK.h]nRorWW+tests/cursorid-serialization_error-002.phptnu[--TEST-- MongoDB\Driver\CursorId unserialization errors (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\CursorId initialization requires "id" string field ===DONE=== PK.h]BmI-tests/bson-javascript-get_properties-002.phptnu[--TEST-- MongoDB\BSON\Javascript get_properties handler (foreach) --FILE-- 42]), ]; foreach ($tests as $test) { foreach ($test as $key => $value) { var_dump($key); var_dump($value); } } ?> ===DONE=== --EXPECTF-- string(4) "code" string(33) "function foo(bar) { return bar; }" string(5) "scope" NULL string(4) "code" string(30) "function foo() { return bar; }" string(5) "scope" object(stdClass)#%d (%d) { ["bar"]=> int(42) } ===DONE=== PK.h]@`z%tests/clientEncryption-constants.phptnu[--TEST-- MongoDB\Driver\ClientEncryption constants --FILE-- ===DONE=== --EXPECT-- string(43) "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" string(36) "AEAD_AES_256_CBC_HMAC_SHA_512-Random" ===DONE=== PK.h]خxu  !tests/decimal128-3-valid-185.phptnu[--TEST-- Decimal128: [basx363] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000563000 {"d":{"$numberDecimal":"7E+11"}} 180000001364000700000000000000000000000000563000 180000001364000700000000000000000000000000563000 ===DONE===PK.h]%%!tests/decimal128-3-valid-061.phptnu[--TEST-- Decimal128: [basx675] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000323000 {"d":{"$numberDecimal":"0E-7"}} 180000001364000000000000000000000000000000323000 180000001364000000000000000000000000000000323000 ===DONE===PK.h]]22tests/bson-toPHP-011.phptnu[--TEST-- MongoDB\BSON\toPHP(): Setting fieldPath typemaps for compound types with wildcard keys (nested) --FILE-- 1, 'object' => [ 'parent1' => [ 'child1' => [ 1, 2, 3 ], 'child2' => [ 4, 5, 6 ], ], 'parent2' => [ 'child1' => [ 7, 8, 9 ], 'child2' => [ 10, 11, 12 ], ], ], ] ); function fetch($bson, $typeMap = []) { return \MongoDB\BSON\toPHP($bson, $typeMap); } echo "\nSetting 'object.$.child1' path to 'MyWildcardArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'object.$.child1' => "MyWildcardArrayObject" ]]); var_dump($document->object->parent1 instanceof stdClass); var_dump($document->object->parent1->child1 instanceof MyWildcardArrayObject); var_dump(is_array($document->object->parent1->child2)); var_dump($document->object->parent2 instanceof stdClass); var_dump($document->object->parent2->child1 instanceof MyWildcardArrayObject); var_dump(is_array($document->object->parent2->child2)); echo "\nSetting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.parent2.child1' to 'MyArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'object.parent1.$' => "MyWildcardArrayObject", 'object.parent2.child1' => "MyArrayObject", ]]); var_dump($document->object->parent1 instanceof stdClass); var_dump($document->object->parent1->child1 instanceof MyWildcardArrayObject); var_dump($document->object->parent1->child2 instanceof MyWildcardArrayObject); var_dump($document->object->parent2 instanceof stdClass); var_dump($document->object->parent2->child1 instanceof MyArrayObject); var_dump(is_array($document->object->parent2->child2)); echo "\nSetting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.$.$' to 'MyArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'object.parent1.$' => "MyWildcardArrayObject", 'object.$.$' => "MyArrayObject", ]]); var_dump($document->object->parent1 instanceof stdClass); var_dump($document->object->parent1->child1 instanceof MyWildcardArrayObject); var_dump($document->object->parent1->child2 instanceof MyWildcardArrayObject); var_dump($document->object->parent2 instanceof stdClass); var_dump($document->object->parent2->child1 instanceof MyArrayObject); var_dump($document->object->parent2->child2 instanceof MyArrayObject); echo "\nSetting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.$.child2' to 'MyArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'object.parent1.child1' => "MyWildcardArrayObject", 'object.$.child2' => "MyArrayObject", ]]); var_dump($document->object->parent1 instanceof stdClass); var_dump($document->object->parent1->child1 instanceof MyWildcardArrayObject); var_dump($document->object->parent1->child2 instanceof MyArrayObject); var_dump($document->object->parent2 instanceof stdClass); var_dump(is_array($document->object->parent2->child1)); var_dump($document->object->parent2->child2 instanceof MyArrayObject); echo "\nSetting 'object.parent1.child2 path to 'MyArrayObject' and 'object.$.$' to 'MyWildcardArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'object.parent1.child2' => "MyArrayObject", 'object.$.$' => "MyWildcardArrayObject", ]]); var_dump($document->object->parent1 instanceof stdClass); var_dump($document->object->parent1->child1 instanceof MyWildcardArrayObject); var_dump($document->object->parent1->child2 instanceof MyArrayObject); var_dump($document->object->parent2 instanceof stdClass); var_dump($document->object->parent2->child1 instanceof MyWildcardArrayObject); var_dump($document->object->parent2->child2 instanceof MyWildcardArrayObject); ?> ===DONE=== --EXPECT-- Setting 'object.$.child1' path to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.parent2.child1' to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.$.$' to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.$.child2' to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.child2 path to 'MyArrayObject' and 'object.$.$' to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]?ؙ:EE"tests/readpreference-ctor-002.phptnu[--TEST-- MongoDB\Driver\ReadPreference construction with strings --FILE-- getMessage(), "\n"; } var_dump( $rp ); } ?> --EXPECTF-- object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "nearest" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "nearest" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "nearest" } PK.h]$~tests/dbref-valid-005.phptnu[--TEST-- Document type (DBRef sub-documents): Document with key names similar to those of a DBRef --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 3e0000000224726566000c0000006e6f742d612d646272656600072469640058921b3e6e32ab156a22b59e022462616e616e6100050000007065656c0000 {"$ref":"not-a-dbref","$id":{"$oid":"58921b3e6e32ab156a22b59e"},"$banana":"peel"} 3e0000000224726566000c0000006e6f742d612d646272656600072469640058921b3e6e32ab156a22b59e022462616e616e6100050000007065656c0000 ===DONE===PK.h]nF/tests/standalone-ssl-verify_cert-error-001.phptnu[--TEST-- Connect to MongoDB with SSL and cert verification error --SKIPIF-- --FILE-- true, 'weak_cert_validation' => false, ]; echo throws(function() use ($driverOptions) { $manager = create_test_manager(URI, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); var_dump($cursor->toArray()[0]); }, MongoDB\Driver\Exception\ConnectionException::class, 'executeCommand'), "\n"; ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_invalid_hostname" driver option is deprecated. Please use the "tlsAllowInvalidHostnames" URI option instead.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "weak_cert_validation" driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead.%s OK: Got MongoDB\Driver\Exception\ConnectionException thrown from executeCommand %sTLS handshake failed%s ===DONE=== PK.h]6c__/tests/readpreference-getMaxStalenessMS-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference::getMaxStalenessSeconds() --FILE-- $test]); var_dump($rp->getMaxStalenessSeconds()); } ?> ===DONE=== --EXPECT-- int(-1) int(90) int(90) int(1000) int(2147483647) ===DONE=== PK.h]S3vv-tests/bson-utcdatetime-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\UTCDateTime::jsonSerialize() with json_encode() --FILE-- new MongoDB\BSON\UTCDateTime(new DateTime('2016-10-11 13:34:26.817 UTC'))]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$date" : 1476192866817 } } {"foo":{"$date":{"$numberLong":"1476192866817"}}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1476192866817" } } ===DONE=== PK.h]/Kr#tests/bson-toCanonicalJSON-002.phptnu[--TEST-- MongoDB\BSON\toCanonicalExtendedJSON(): Encoding extended JSON types --FILE-- new MongoDB\BSON\ObjectId('56315a7c6118fd1b920270b1') ], [ 'binary' => new MongoDB\BSON\Binary('foo', MongoDB\BSON\Binary::TYPE_GENERIC) ], [ 'date' => new MongoDB\BSON\UTCDateTime(1445990400000) ], [ 'timestamp' => new MongoDB\BSON\Timestamp(1234, 5678) ], [ 'regex' => new MongoDB\BSON\Regex('pattern', 'i') ], [ 'code' => new MongoDB\BSON\Javascript('function() { return 1; }') ], [ 'code_ws' => new MongoDB\BSON\Javascript('function() { return a; }', ['a' => 1]) ], [ 'minkey' => new MongoDB\BSON\MinKey ], [ 'maxkey' => new MongoDB\BSON\MaxKey ], ]; foreach ($tests as $value) { $bson = fromPHP($value); echo toCanonicalExtendedJSON($bson), "\n"; } ?> ===DONE=== --EXPECT-- { "_id" : { "$oid" : "56315a7c6118fd1b920270b1" } } { "binary" : { "$binary" : { "base64" : "Zm9v", "subType" : "00" } } } { "date" : { "$date" : { "$numberLong" : "1445990400000" } } } { "timestamp" : { "$timestamp" : { "t" : 5678, "i" : 1234 } } } { "regex" : { "$regularExpression" : { "pattern" : "pattern", "options" : "i" } } } { "code" : { "$code" : "function() { return 1; }" } } { "code_ws" : { "$code" : "function() { return a; }", "$scope" : { "a" : { "$numberInt" : "1" } } } } { "minkey" : { "$minKey" : 1 } } { "maxkey" : { "$maxKey" : 1 } } ===DONE=== PK.h]Am!tests/decimal128-3-valid-278.phptnu[--TEST-- Decimal128: [basx215] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003a3000 {"d":{"$numberDecimal":"1.265"}} 18000000136400f1040000000000000000000000003a3000 18000000136400f1040000000000000000000000003a3000 ===DONE===PK.h]$^rEE!tests/bson-regex-compare-001.phptnu[--TEST-- MongoDB\BSON\Regex comparisons (without flags) --FILE-- new MongoDB\BSON\Regex('regexp')); var_dump(new MongoDB\BSON\Regex('regexp') < new MongoDB\BSON\Regex('regexr')); var_dump(new MongoDB\BSON\Regex('regexp') > new MongoDB\BSON\Regex('regexo')); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) bool(true) ===DONE=== PK.h]g00+tests/bson-objectid-get_properties-001.phptnu[--TEST-- MongoDB\BSON\ObjectId get_properties handler (get_object_vars) --FILE-- ===DONE=== --EXPECT-- array(1) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } ===DONE=== PK.h]tests/server-getTags-002.phptnu[--TEST-- MongoDB\Driver\Server::getTags() with replica set --SKIPIF-- --FILE-- 1]); $manager->executeCommand(DATABASE_NAME, $command); function assertSomeServerHasTags(array $servers, array $expectedTags) { foreach ($servers as $server) { /* Using a non-strict comparison guards against tags being returned in * a different order than expected. */ if ($expectedTags == $server->getTags()) { printf("Found server with tags: %s\n", json_encode($expectedTags)); return; } } printf("No server has tags: %s\n", json_encode($expectedTags)); } $servers = $manager->getServers(); assertSomeServerHasTags($servers, ['dc' => 'ny', 'ordinal' => 'one']); assertSomeServerHasTags($servers, ['dc' => 'pa', 'ordinal' => 'two']); assertSomeServerHasTags($servers, []); ?> ===DONE=== --EXPECT-- Found server with tags: {"dc":"ny","ordinal":"one"} Found server with tags: {"dc":"pa","ordinal":"two"} Found server with tags: [] ===DONE=== PK.h],--!tests/decimal128-5-valid-058.phptnu[--TEST-- Decimal128: [decq647] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000e40b5402000000000000000000fe5f00 {"d":{"$numberDecimal":"1.0000000000E+6121"}} 1800000013640000e40b5402000000000000000000fe5f00 1800000013640000e40b5402000000000000000000fe5f00 ===DONE===PK.h],"!tests/decimal128-2-valid-013.phptnu[--TEST-- Decimal128: [decq122] Nmax and similar --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffffff638e8d37c087adbe09edffdf00 {"d":{"$numberDecimal":"-9.999999999999999999999999999999999E+6144"}} 18000000136400ffffffff638e8d37c087adbe09edffdf00 ===DONE===PK.h]n}!!$tests/bson-binary-set_state-001.phptnu[--TEST-- MongoDB\BSON\Binary::__set_state() --FILE-- $data, 'type' => $type, ])); echo "\n\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\BSON\Binary::__set_state(array( %w'data' => 'foobar', %w'type' => 0, )) MongoDB\BSON\Binary::__set_state(array( %w'data' => '', %w'type' => 0, )) MongoDB\BSON\Binary::__set_state(array( %w'data' => '' . "\0" . 'foo', %w'type' => 0, )) MongoDB\BSON\Binary::__set_state(array( %w'data' => '>EgӤVBfUD' . "\0" . '' . "\0" . '', %w'type' => 4, )) MongoDB\BSON\Binary::__set_state(array( %w'data' => '8X"0<_0 fC?', %w'type' => 5, )) ===DONE=== PK.h]dF__!tests/decimal128-4-valid-001.phptnu[--TEST-- Decimal128: [basx023] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640001000000000000000000000000003eb000 {"d":{"$numberDecimal":"-0.1"}} 1800000013640001000000000000000000000000003eb000 ===DONE===PK.h]{?>>-tests/bson-utcdatetime-serialization-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(1) "0" } string(71) "C:24:"MongoDB\BSON\UTCDateTime":34:{a:1:{s:12:"milliseconds";s:1:"0";}}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(1) "0" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(14) "-1416445411987" } string(85) "C:24:"MongoDB\BSON\UTCDateTime":48:{a:1:{s:12:"milliseconds";s:14:"-1416445411987";}}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(14) "-1416445411987" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1416445411987" } string(84) "C:24:"MongoDB\BSON\UTCDateTime":47:{a:1:{s:12:"milliseconds";s:13:"1416445411987";}}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1416445411987" } ===DONE=== PK.h]  tests/array-valid-002.phptnu[--TEST-- Array: Single Element Array --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 140000000461000c0000001030000a0000000000 {"a":[{"$numberInt":"10"}]} 140000000461000c0000001030000a0000000000 ===DONE===PK.h]&tests/decimal128-7-parseError-063.phptnu[--TEST-- Decimal128: [basx532] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]D?))#tests/bson-timestamp-clone-001.phptnu[--TEST-- MongoDB\BSON\Timestamp can be cloned --FILE-- foo = 'bar'; $clone = clone $timestamp; var_dump($clone == $timestamp); var_dump($clone === $timestamp); unset($timestamp); var_dump($clone); var_dump($clone->foo); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) object(MongoDB\BSON\Timestamp)#%d (2) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } string(3) "bar" ===DONE=== PK.h]Q`ō-tests/bson-int64-serialization_error-002.phptnu[--TEST-- MongoDB\BSON\Int64 unserialization requires "int" string field to be valid (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "1234.5678" as 64-bit integer for MongoDB\BSON\Int64 initialization ===DONE=== PK.h]A(422!tests/decimal128-1-valid-024.phptnu[--TEST-- Decimal128: Scientific - Tiny --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000000000 {"d":{"$numberDecimal":"1E-6176"}} 180000001364000100000000000000000000000000000000 ===DONE===PK.h]e!tests/decimal128-3-valid-194.phptnu[--TEST-- Decimal128: [basx379] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000463000 {"d":{"$numberDecimal":"7E+3"}} 180000001364000700000000000000000000000000463000 180000001364000700000000000000000000000000463000 ===DONE===PK.h]=!tests/decimal128-3-valid-050.phptnu[--TEST-- Decimal128: [basx632] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h],M  %tests/bulkwrite-delete_error-002.phptnu[--TEST-- MongoDB\Driver\BulkWrite::delete() with BSON encoding error (invalid UTF-8 string) --FILE-- delete(['x' => "\xc3\x28"]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->delete(['x' => 1], ['collation' => ['locale' => "\xc3\x28"]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "x": %s OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "locale": %s ===DONE=== PK.h] I!tests/bson-toRelaxedJSON-002.phptnu[--TEST-- MongoDB\BSON\toRelaxedExtendedJSON(): Encoding extended JSON types --FILE-- new MongoDB\BSON\ObjectId('56315a7c6118fd1b920270b1') ], [ 'binary' => new MongoDB\BSON\Binary('foo', MongoDB\BSON\Binary::TYPE_GENERIC) ], [ 'date' => new MongoDB\BSON\UTCDateTime(1445990400000) ], [ 'timestamp' => new MongoDB\BSON\Timestamp(1234, 5678) ], [ 'regex' => new MongoDB\BSON\Regex('pattern', 'i') ], [ 'code' => new MongoDB\BSON\Javascript('function() { return 1; }') ], [ 'code_ws' => new MongoDB\BSON\Javascript('function() { return a; }', ['a' => 1]) ], [ 'minkey' => new MongoDB\BSON\MinKey ], [ 'maxkey' => new MongoDB\BSON\MaxKey ], ]; foreach ($tests as $value) { $bson = fromPHP($value); echo toRelaxedExtendedJSON($bson), "\n"; } ?> ===DONE=== --EXPECT-- { "_id" : { "$oid" : "56315a7c6118fd1b920270b1" } } { "binary" : { "$binary" : { "base64" : "Zm9v", "subType" : "00" } } } { "date" : { "$date" : "2015-10-28T00:00:00Z" } } { "timestamp" : { "$timestamp" : { "t" : 5678, "i" : 1234 } } } { "regex" : { "$regularExpression" : { "pattern" : "pattern", "options" : "i" } } } { "code" : { "$code" : "function() { return 1; }" } } { "code_ws" : { "$code" : "function() { return a; }", "$scope" : { "a" : 1 } } } { "minkey" : { "$minKey" : 1 } } { "maxkey" : { "$maxKey" : 1 } } ===DONE=== PK.h]m4tests/manager-ctor-disableClientPersistence-009.phptnu[--TEST-- MongoDB\Driver\Manager with disableClientPersistence=true referenced by CommandSucceededEvent --SKIPIF-- --FILE-- getCommandName()); $this->events[] = $event; } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $subscriber = new MySubscriber; ini_set('mongodb.debug', 'stderr'); $manager = create_test_manager(URI, [], ['disableClientPersistence' => true]); ini_set('mongodb.debug', ''); MongoDB\Driver\Monitoring\addSubscriber($subscriber); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command); /* Remove the subscriber to ensure that the extension does not hold an internal * reference to it. This guarantees that the event object (and final Manager * reference) will be freed when the subscriber is later unset. */ MongoDB\Driver\Monitoring\removeSubscriber($subscriber); echo "Unsetting manager\n"; ini_set('mongodb.debug', 'stderr'); unset($manager); ini_set('mongodb.debug', ''); echo "Unsetting subscriber\n"; ini_set('mongodb.debug', 'stderr'); unset($subscriber); ini_set('mongodb.debug', ''); ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client Command succeeded: ping Unsetting manager Unsetting subscriber%A [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A ===DONE=== PK.h]!L L -tests/server-executeReadWriteCommand-002.phptnu[--TEST-- MongoDB\Driver\Server::executeReadWriteCommand() pins transaction to server --SKIPIF-- --FILE-- executeReadWriteCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $servers = $manager->getServers(); $selectedServer = array_pop($servers); $wrongServer = array_pop($servers); var_dump($selectedServer != $wrongServer); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$group' => ['_id' => 1]]], 'cursor' => (object) [] ]); $selectedServer->executeReadWriteCommand(DATABASE_NAME, $command, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); echo throws(function () use ($wrongServer, $session) { $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$group' => ['_id' => 1]]], 'cursor' => (object) [] ]); $wrongServer->executeReadCommand(DATABASE_NAME, $command, ['session' => $session]); }, \MongoDB\Driver\Exception\RuntimeException::class), "\n"; $session->commitTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) OK: Got MongoDB\Driver\Exception\RuntimeException Requested server id does not matched pinned server id bool(true) bool(false) ===DONE=== PK.h]礸f  tests/writeerror_error-001.phptnu[--TEST-- MongoDB\Driver\WriteError cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyWriteError %s final class %SMongoDB\Driver\WriteError%S in %s on line %d PK.h]# tests/bson-binary_error-001.phptnu[--TEST-- MongoDB\BSON\Binary argument count errors --SKIPIF-- =', '7.99'); ?> --FILE-- getData(2); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; echo throws(function() use ($binary) { $binary->getType(2); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; echo throws(function() { new MongoDB\BSON\Binary("random binary data without type"); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary::getData() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary::getType() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary::__construct() expects exactly 2 %r(argument|parameter)%rs, 1 given ===DONE=== PK.h]i0tests/server-002.phptnu[--TEST-- MongoDB\Driver\Server: Manager->getServer() returning correct server --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query(array()), $rp); /* writes go to the primary */ $server = $result->getServer(); var_dump( $server->getHost() ); $tags = $server->getTags(); echo "dc: ", array_key_exists('dc', $tags) ? $tags['dc'] : 'not set', "\n"; echo "ordinal: ", array_key_exists('ordinal', $tags) ? $tags['ordinal'] : 'not set', "\n"; var_dump( $server->getLatency(), $server->getPort(), $server->getType() == MongoDB\Driver\Server::TYPE_RS_SECONDARY, $server->isPrimary(), $server->isSecondary(), $server->isArbiter(), $server->isHidden(), $server->isPassive() ); $info = $server->getInfo(); // hello response changes between mongod versions var_dump($info["setName"], $info["hosts"]); var_dump($info["me"] == $server->getHost() . ":" . $server->getPort()); ?> ===DONE=== --EXPECTF-- string(%d) "%s" dc: pa ordinal: two int(%d) int(%d) bool(true) bool(false) bool(true) bool(false) bool(false) bool(false) string(%s) "repl0%S" array(2) { [0]=> string(%d) "%s:%d" [1]=> string(%d) "%s:%d" } bool(true) ===DONE=== PK.h],e44#tests/bson-regex-set_state-001.phptnu[--TEST-- MongoDB\BSON\Regex::__set_state() --FILE-- 'regexp', 'flags' => 'i', ])); echo "\n"; ?> ===DONE=== --EXPECTF-- MongoDB\BSON\Regex::__set_state(array( %w'pattern' => 'regexp', %w'flags' => 'i', )) ===DONE=== PK.h]"N%%+tests/bson-dbpointer-jsonserialize-003.phptnu[--TEST-- MongoDB\BSON\DBPointer::jsonSerialize() with json_encode() --FILE-- ===DONE=== --EXPECTF-- { "foo" : { "$ref" : "phongo.test", "$id" : "5a2e78accd485d55b4050000" } } {"foo":{"$dbPointer":{"$ref":"phongo.test","$id":{"$oid":"5a2e78accd485d55b4050000"}}}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\DBPointer)#%d (%d) { ["ref"]=> string(11) "phongo.test" ["id"]=> string(24) "5a2e78accd485d55b4050000" } } ===DONE=== PK.h]q҃#tests/manager-executeQuery-007.phptnu[--TEST-- MongoDB\Driver\Manager::executeQuery() read concern inheritance --SKIPIF-- --FILE-- 'local']); (new CommandObserver)->observe( function() use ($manager) { $manager->executeQuery(NS, new MongoDB\Driver\Query([])); $manager->executeQuery(NS, new MongoDB\Driver\Query([], [ 'readConcern' => new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE), ])); }, function(stdClass $command) { echo json_encode($command->readConcern), "\n"; } ); ?> ===DONE=== --EXPECT-- {"level":"local"} {"level":"available"} ===DONE=== PK.h]U!tests/decimal128-3-valid-043.phptnu[--TEST-- Decimal128: [basx683] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]r 4bb-tests/manager-executeBulkWrite_error-008.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() with empty BulkWrite --SKIPIF-- --FILE-- executeBulkWrite(NS, new MongoDB\Driver\BulkWrite); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot do an empty bulk write ===DONE=== PK.h]\'!tests/manager-getservers-002.phptnu[--TEST-- MongoDB\Driver\Manager::getServers() (replica set) --SKIPIF-- --FILE-- getServers(); printf("Known servers: %d\n", count($servers)); echo "Pinging\n"; $command = new MongoDB\Driver\Command(array('ping' => 1)); $manager->executeCommand(DATABASE_NAME, $command); $servers = $manager->getServers(); printf("Known servers: %d\n", count($servers)); foreach ($servers as $server) { printf("Found server: %s:%d\n", $server->getHost(), $server->getPort()); assertServerType($server->getType()); } ?> ===DONE=== --EXPECTF-- Known servers: 0 Pinging Known servers: 3 Found server: %s:%d Found replica set server type: %r(4|5|6)%r Found server: %s:%d Found replica set server type: %r(4|5|6)%r Found server: %s:%d Found replica set server type: %r(4|5|6)%r ===DONE=== PK.h]2Zk.tests/bson-javascript-set_state_error-002.phptnu[--TEST-- MongoDB\BSON\Javascript::__set_state() expects optional scope to be array or object --FILE-- 'function foo() {}', 'scope' => 'INVALID']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected scope to be array or object, string given ===DONE=== PK.h]!tests/decimal128-3-valid-268.phptnu[--TEST-- Decimal128: [basx169] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006400000000000000000000000000523000 {"d":{"$numberDecimal":"1.00E+11"}} 180000001364006400000000000000000000000000523000 180000001364006400000000000000000000000000523000 ===DONE===PK.h]t'&tests/decimal128-7-parseError-031.phptnu[--TEST-- Decimal128: [basx586] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]FV0*tests/writeresult-getdeletedcount-002.phptnu[--TEST-- MongoDB\Driver\WriteResult::getDeletedCount() with unacknowledged write --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(0)); var_dump($result->getDeletedCount()); ?> ===DONE=== --EXPECT-- NULL ===DONE=== PK.h]˿`&tests/decimal128-6-parseError-031.phptnu[--TEST-- Decimal128: Invalid --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] $&tests/decimal128-7-parseError-040.phptnu[--TEST-- Decimal128: [basx515] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] N  tests/double-valid-008.phptnu[--TEST-- Double type: -0.0 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000016400000000000000008000 {"d":{"$numberDouble":"-0"}} {"d":-0} 10000000016400000000000000008000 {"d":-0} ===DONE===PK.h]zT$tests/retryable-reads_error-001.phptnu[--TEST-- Retryable reads: executeReadCommand is not retried when retryable reads are disabled --SKIPIF-- --FILE-- getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(URI, ['retryReads' => false]); // Select a specific server for future operations to avoid mongos switching in sharded clusters $server = $manager->selectServer(new \MongoDB\Driver\ReadPreference('primary')); configureTargetedFailPoint($server, 'failCommand', ['times' => 1], ['failCommands' => ['aggregate'], 'closeConnection' => true]); $observer = new Observer; MongoDB\Driver\Monitoring\addSubscriber($observer); throws( function() use ($server) { $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$group' => ['_id' => 1, 'n' => ['$sum' => 1]]], ], 'cursor' => (object) [], ]); $server->executeReadCommand(DATABASE_NAME, $command); }, \MongoDB\Driver\Exception\ConnectionTimeoutException::class ); ?> ===DONE=== --EXPECT-- Command started: aggregate OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException ===DONE=== PK.h]\p __"tests/server-executeQuery-010.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() takes a read preference as legacy option --SKIPIF-- --FILE-- insert(['_id' => 1, 'x' => 2, 'y' => 3]); $manager->executeBulkWrite(NS, $bulk); $primaryRp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY); $secondaryRp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY); $primary = $manager->selectServer($primaryRp); $secondary = $manager->selectServer($secondaryRp); echo "Testing primary:\n"; $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); $cursor = $manager->executeQuery(NS, $query, $primaryRp); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; echo "Testing secondary:\n"; $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); $cursor = $manager->executeQuery(NS, $query, $secondaryRp); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; ?> ===DONE=== --EXPECTF-- Testing primary: is_primary: true is_secondary: false Testing secondary: is_primary: false is_secondary: true ===DONE=== PK.h]c!N--&tests/server-executeBulkWrite-005.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() with write concern (replica set secondary, local DB) --SKIPIF-- --FILE-- false]); $server = $manager->selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY)); /* The server ignores write concerns with w>2 for writes to the local database, * so we won't test behavior for w=2 and w=majority. */ $writeConcerns = array(0, 1); foreach ($writeConcerns as $wc) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array('wc' => $wc)); $result = $server->executeBulkWrite('local.' . COLLECTION_NAME, $bulk, new MongoDB\Driver\WriteConcern($wc)); var_dump($result->isAcknowledged()); var_dump($result->getInsertedCount()); } $bulk = new MongoDB\Driver\BulkWrite(); $bulk->delete( (object) [] ); $server->executeBulkWrite('local.' . COLLECTION_NAME, $bulk); ?> ===DONE=== --EXPECT-- bool(false) NULL bool(true) int(1) ===DONE=== PK.h]55'tests/clientEncryption-encrypt-001.phptnu[--TEST-- MongoDB\Driver\ClientEncryption::encrypt() --SKIPIF-- --FILE-- createClientEncryption(['keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary($key, 0)]]]); $key = $clientEncryption->createDataKey('local'); var_dump($clientEncryption->encrypt('top-secret', ['keyId' => $key, 'algorithm' => MongoDB\Driver\ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC])); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(82) "%a" ["type"]=> int(6) } ===DONE=== PK.h] !tests/manager-ctor_error-004.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): empty replicaSet argument --FILE-- executeQuery(NS, new MongoDB\Driver\Query([])); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; echo throws(function () { $manager = create_test_manager('mongodb://localhost:27017', ['replicaSet' => '']); $manager->executeQuery(NS, new MongoDB\Driver\Query([])); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?replicaSet='. Value for URI option "replicaset" cannot be empty string. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Value for URI option "replicaSet" cannot be empty string. ===DONE=== PK.h] 1ff$tests/writeresult-getserver-001.phptnu[--TEST-- MongoDB\Driver\WriteResult::getUpsertedIds() --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $result = $server->executeBulkWrite(NS, $bulk); var_dump($result->getServer() == $server); ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]22tests/manager-ctor-ssl-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): ssl option does not require driverOptions --SKIPIF-- --FILE-- true])); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Manager)#%d (%d) { ["uri"]=> string(29) "mongodb://127.0.0.1/?ssl=true" ["cluster"]=> array(0) { } } object(MongoDB\Driver\Manager)#%d (%d) { ["uri"]=> string(20) "mongodb://127.0.0.1/" ["cluster"]=> array(0) { } } ===DONE=== PK.h]tyy!tests/decimal128-3-valid-134.phptnu[--TEST-- Decimal128: [basx037] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640078df0d8648700000000000000000223000 {"d":{"$numberDecimal":"0.123456789012344"}} 1800000013640078df0d8648700000000000000000223000 ===DONE===PK.h]cH#55!tests/decimal128-3-valid-120.phptnu[--TEST-- Decimal128: [basx139] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000052b000 {"d":{"$numberDecimal":"-0E+9"}} 18000000136400000000000000000000000000000052b000 ===DONE===PK.h]QQ%tests/manager-executeCommand-004.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() options (MONGOC_CMD_RAW) --SKIPIF-- --FILE-- observe( function() use ($manager) { $command = new MongoDB\Driver\Command([ 'ping' => true, ]); try { $manager->executeCommand( DATABASE_NAME, $command, [ 'readPreference' => new \MongoDB\Driver\ReadPreference(\MongoDB\Driver\ReadPreference::RP_SECONDARY), 'readConcern' => new \MongoDB\Driver\ReadConcern(\MongoDB\Driver\ReadConcern::LOCAL), 'writeConcern' => new \MongoDB\Driver\WriteConcern(\MongoDB\Driver\WriteConcern::MAJORITY), ] ); } catch ( Exception $e ) { // Ignore exception that ping doesn't support writeConcern } }, function(stdClass $command) { echo "Read Preference: ", $command->{'$readPreference'}->mode, "\n"; echo "Read Concern: ", $command->readConcern->level, "\n"; echo "Write Concern: ", $command->writeConcern->w, "\n"; } ); ?> ===DONE=== --EXPECTF-- Read Preference: secondary Read Concern: local Write Concern: majority ===DONE=== PK.h]fƯ)tests/standalone-ssl-verify_cert-001.phptnu[--TEST-- Connect to MongoDB with SSL and cert verification --SKIPIF-- --FILE-- true, 'weak_cert_validation' => false, 'ca_file' => SSL_DIR . '/ca.pem', ]; $manager = create_test_manager(URI, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); printf("ping: %d\n", $cursor->toArray()[0]->ok); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_invalid_hostname" driver option is deprecated. Please use the "tlsAllowInvalidHostnames" URI option instead.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "weak_cert_validation" driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "ca_file" driver option is deprecated. Please use the "tlsCAFile" URI option instead.%s ping: 1 ===DONE=== PK.h]i|tests/cursorid-debug-002.phptnu[--TEST-- MongoDB\Driver\CursorId debug output on 32-bit platform --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> string(19) "7250031947823432848" } ===DONE=== PK.h]8xu>>+tests/bson-timestamp-serialization-003.phptnu[--TEST-- MongoDB\BSON\Timestamp serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } string(88) "O:22:"MongoDB\BSON\Timestamp":2:{s:9:"increment";s:4:"1234";s:9:"timestamp";s:4:"5678";}" object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "2147483647" ["timestamp"]=> string(1) "0" } string(92) "O:22:"MongoDB\BSON\Timestamp":2:{s:9:"increment";s:10:"2147483647";s:9:"timestamp";s:1:"0";}" object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "2147483647" ["timestamp"]=> string(1) "0" } object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "2147483647" } string(92) "O:22:"MongoDB\BSON\Timestamp":2:{s:9:"increment";s:1:"0";s:9:"timestamp";s:10:"2147483647";}" object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "2147483647" } ===DONE=== PK.h]`utests/bulkwrite-update-004.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() with hint option --SKIPIF-- --FILE-- getCommandName() !== 'update') { return; } printf("update included hint: %s\n", json_encode($event->getCommand()->updates[0]->hint)); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $manager->executeBulkWrite(NS, $bulk); MongoDB\Driver\Monitoring\addSubscriber(new CommandLogger); $bulk = new MongoDB\Driver\BulkWrite; $bulk->update(['_id' => 1], ['$set' => ['x' => 11]], ['hint' => '_id_']); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite; $bulk->update(['_id' => 2], ['$set' => ['x' => 22]], ['hint' => ['_id' => 1]]); $manager->executeBulkWrite(NS, $bulk); ?> ===DONE=== --EXPECTF-- update included hint: "_id_" update included hint: {"_id":1} ===DONE=== PK.h]ee!tests/decimal128-3-valid-212.phptnu[--TEST-- Decimal128: [basx325] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000403000 {"d":{"$numberDecimal":"10"}} 180000001364000a00000000000000000000000000403000 180000001364000a00000000000000000000000000403000 ===DONE===PK.h]gwtests/bug0974-001.phptnu[--TEST-- PHPC-974: Converting JSON to BSON to PHP introduces gaps in array indexes --FILE-- ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["myArray"]=> array(1) { [0]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "201700601301102102609060" } } } object(stdClass)#%d (%d) { [%r(0|"0")%r]=> int(1) [%r(1|"1")%r]=> int(2) [%r(2|"2")%r]=> int(3) [%r(3|"3")%r]=> object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1497352886906" } } object(stdClass)#3 (2) { [%r(0|"0")%r]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "55f2b3f1f657b3fa97c9c0a2" } [%r(1|"1")%r]=> object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1497352886906" } } ===DONE=== PK.h]55!tests/decimal128-1-valid-013.phptnu[--TEST-- Decimal128: Regular - Smallest --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400d204000000000000000000000000343000 {"d":{"$numberDecimal":"0.001234"}} 18000000136400d204000000000000000000000000343000 ===DONE===PK.h]eqZ"tests/bson-symbol-compare-001.phptnu[--TEST-- MongoDB\BSON\Symbol comparisons --FILE-- MongoDB\BSON\toPHP(MongoDB\BSON\fromJSON('{ "symbol": {"$symbol": "val0"} }'))); ?> ===DONE=== --EXPECT-- bool(true) bool(true) bool(true) ===DONE=== PK.h]m!tests/decimal128-3-valid-108.phptnu[--TEST-- Decimal128: [basx650] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]sstests/bson-toPHP-009.phptnu[--TEST-- MongoDB\BSON\toPHP(): Setting fieldPath typemaps for compound types with numerical keys --FILE-- 1, 'array0' => [0 => [ 4, 5, 6 ], 1 => [ 7, 8, 9 ]], 'array1' => [1 => [ 4, 5, 6 ], 2 => [ 7, 8, 9 ]], ] ); function fetch($bson, $typeMap = []) { return \MongoDB\BSON\toPHP($bson, $typeMap); } echo "Default\n"; $document = fetch($bson); var_dump($document instanceof stdClass); var_dump(is_array($document->array0)); var_dump(is_object($document->array1)); var_dump($document->array1 instanceof stdClass); echo "\nSetting 'array0' path to 'MyArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'array0' => "MyArrayObject" ]]); var_dump($document instanceof stdClass); var_dump(is_object($document->array0)); var_dump($document->array0 instanceof MyArrayObject); echo "\nSetting 'array0.1' path to 'MyArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'array0.1' => "MyArrayObject", ]]); var_dump($document instanceof stdClass); var_dump(is_array($document->array0)); var_dump(is_array($document->array0[0])); var_dump($document->array0[1] instanceof MyArrayObject); echo "\nSetting 'array1.1' path to 'MyArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'array1.1' => "MyArrayObject", ]]); var_dump($document instanceof stdClass); var_dump(is_object($document->array1)); var_dump($document->array1 instanceof stdClass); $a = ((array) $document->array1); var_dump($a[1] instanceof MyArrayObject); var_dump(is_array($a[2])); ?> ===DONE=== --EXPECT-- Default bool(true) bool(true) bool(true) bool(true) Setting 'array0' path to 'MyArrayObject' bool(true) bool(true) bool(true) Setting 'array0.1' path to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'array1.1' path to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]ʿ//-tests/bson-utcdatetime-serialization-003.phptnu[--TEST-- MongoDB\BSON\UTCDateTime serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(1) "0" } string(64) "O:24:"MongoDB\BSON\UTCDateTime":1:{s:12:"milliseconds";s:1:"0";}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(1) "0" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(14) "-1416445411987" } string(78) "O:24:"MongoDB\BSON\UTCDateTime":1:{s:12:"milliseconds";s:14:"-1416445411987";}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(14) "-1416445411987" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1416445411987" } string(77) "O:24:"MongoDB\BSON\UTCDateTime":1:{s:12:"milliseconds";s:13:"1416445411987";}" object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1416445411987" } ===DONE=== PK.h]dD!tests/code_w_scope-valid-004.phptnu[--TEST-- Javascript Code with Scope: Non-empty code string and non-empty scope --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 210000000f6100190000000500000061626364000c000000107800010000000000 {"a":{"$code":"abcd","$scope":{"x":{"$numberInt":"1"}}}} 210000000f6100190000000500000061626364000c000000107800010000000000 ===DONE===PK.h]Atests/datetime-valid-002.phptnu[--TEST-- DateTime: positive ms --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000096100c5d8d6cc3b01000000 {"a":{"$date":{"$numberLong":"1356351330501"}}} {"a":{"$date":"2012-12-24T12:15:30.501Z"}} 10000000096100c5d8d6cc3b01000000 {"a":{"$date":"2012-12-24T12:15:30.501Z"}} ===DONE===PK.h]aDtt!tests/decimal128-5-valid-003.phptnu[--TEST-- Decimal128: [decq077] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000081efac855b416d2dee04000000 {"d":{"$numberDecimal":"1.00000000000000000000000000000000E-6144"}} 180000001364000000000081efac855b416d2dee04000000 180000001364000000000081efac855b416d2dee04000000 ===DONE===PK.h]",tests/bson-decimal128-serialization-001.phptnu[--TEST-- MongoDB\BSON\Decimal128 serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(9) "1234.5678" } string(68) "C:23:"MongoDB\BSON\Decimal128":32:{a:1:{s:3:"dec";s:9:"1234.5678";}}" object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(9) "1234.5678" } object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(10) "-1234.5678" } string(70) "C:23:"MongoDB\BSON\Decimal128":34:{a:1:{s:3:"dec";s:10:"-1234.5678";}}" object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(10) "-1234.5678" } object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(11) "1.23456E-75" } string(71) "C:23:"MongoDB\BSON\Decimal128":35:{a:1:{s:3:"dec";s:11:"1.23456E-75";}}" object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(11) "1.23456E-75" } object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(8) "Infinity" } string(67) "C:23:"MongoDB\BSON\Decimal128":31:{a:1:{s:3:"dec";s:8:"Infinity";}}" object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(8) "Infinity" } object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(3) "NaN" } string(62) "C:23:"MongoDB\BSON\Decimal128":26:{a:1:{s:3:"dec";s:3:"NaN";}}" object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(3) "NaN" } ===DONE=== PK.h]Q~'tests/readpreference-set_state-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference::__set_state() --FILE-- 'primary' ], [ 'mode' => 'primaryPreferred' ], [ 'mode' => 'secondary' ], [ 'mode' => 'secondaryPreferred' ], [ 'mode' => 'nearest' ], [ 'mode' => 'secondary', 'tags' => [['dc' => 'ny']] ], [ 'mode' => 'secondary', 'tags' => [['dc' => 'ny'], ['dc' => 'sf', 'use' => 'reporting'], []] ], [ 'mode' => 'secondary', 'maxStalenessSeconds' => 1000 ], ]; foreach ($tests as $fields) { var_export(MongoDB\Driver\ReadPreference::__set_state($fields)); echo "\n\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'primary', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'primaryPreferred', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'secondary', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'secondaryPreferred', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'nearest', )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'secondary', 'tags' => array ( 0 => %Sarray( 'dc' => 'ny', %S), ), )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'secondary', 'tags' => array ( 0 => %Sarray( 'dc' => 'ny', %S), 1 => %Sarray( 'dc' => 'sf', 'use' => 'reporting', %S), 2 => %Sarray( %S), ), )) MongoDB\Driver\ReadPreference::__set_state(array( 'mode' => 'secondary', 'maxStalenessSeconds' => 1000, )) ===DONE=== PK.h]%}!tests/decimal128-1-valid-012.phptnu[--TEST-- Decimal128: Regular - Adjusted Exponent Limit --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f2af967ed05c82de3297ff6fde3cf22f00 {"d":{"$numberDecimal":"0.000001234567890123456789012345678901234"}} 18000000136400f2af967ed05c82de3297ff6fde3cf22f00 ===DONE===PK.h]a"'tests/manager-executeBulkWrite-014.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() write concern inheritance --SKIPIF-- --FILE-- 2, 'wtimeoutms' => 1000]); (new CommandObserver)->observe( function() use ($manager) { $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['writeConcern' => new MongoDB\Driver\WriteConcern(1)]); }, function(stdClass $command) { echo json_encode($command->writeConcern), "\n"; } ); ?> ===DONE=== --EXPECT-- {"w":2,"wtimeout":1000} {"w":1} ===DONE=== PK.h]W4UU!tests/decimal128-5-valid-038.phptnu[--TEST-- Decimal128: [decq607] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000040eaed7446d09c2c9f0c00fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000000000000E+6141"}} 1800000013640000000040eaed7446d09c2c9f0c00fe5f00 1800000013640000000040eaed7446d09c2c9f0c00fe5f00 ===DONE===PK.h]>G,,&tests/writeconcernerror_error-001.phptnu[--TEST-- MongoDB\Driver\WriteConcernError cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyWriteConcernError %s final class %SMongoDB\Driver\WriteConcernError%S in %s on line %d PK.h]$F܋)tests/manager-ctor-write_concern-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): write concern options (w) --FILE-- -1]], [null, ['w' => -0]], [null, ['w' => 1]], [null, ['w' => 'majority']], [null, ['w' => 'customTagSet']], ]; foreach ($tests as $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getWriteConcern()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(-1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(12) "customTagSet" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(-1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(12) "customTagSet" } ===DONE=== PK.h]N㈔,tests/bson-decimal128-serialization-002.phptnu[--TEST-- MongoDB\BSON\Decimal128 serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(9) "1234.5678" } string(61) "O:23:"MongoDB\BSON\Decimal128":1:{s:3:"dec";s:9:"1234.5678";}" object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(9) "1234.5678" } object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(10) "-1234.5678" } string(63) "O:23:"MongoDB\BSON\Decimal128":1:{s:3:"dec";s:10:"-1234.5678";}" object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(10) "-1234.5678" } object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(11) "1.23456E-75" } string(64) "O:23:"MongoDB\BSON\Decimal128":1:{s:3:"dec";s:11:"1.23456E-75";}" object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(11) "1.23456E-75" } object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(8) "Infinity" } string(60) "O:23:"MongoDB\BSON\Decimal128":1:{s:3:"dec";s:8:"Infinity";}" object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(8) "Infinity" } object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(3) "NaN" } string(55) "O:23:"MongoDB\BSON\Decimal128":1:{s:3:"dec";s:3:"NaN";}" object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(3) "NaN" } ===DONE=== PK.h]qj!tests/decimal128-3-valid-093.phptnu[--TEST-- Decimal128: [basx667] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000303000 {"d":{"$numberDecimal":"0E-8"}} 180000001364000000000000000000000000000000303000 180000001364000000000000000000000000000000303000 ===DONE===PK.h]X6.tests/bson-binary-serialization_error-004.phptnu[--TEST-- MongoDB\BSON\Binary unserialization requires "data" string and "type" integer fields (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields ===DONE=== PK.h]l(qq)tests/bson-symbol-get_properties-002.phptnu[--TEST-- MongoDB\BSON\Symbol get_properties handler (foreach) --FILE-- symbol; foreach ($symbol as $key => $value) { var_dump($key); var_dump($value); } ?> ===DONE=== --EXPECT-- string(6) "symbol" string(4) "test" ===DONE=== PK.h]!tests/bson-fromPHP_error-005.phptnu[--TEST-- MongoDB\BSON\fromPHP(): Serializable with circular references --FILE-- $this]; } } echo "\nTesting Serializable with direct circular reference\n"; echo throws(function() { fromPHP(new MyRecursiveSerializable); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting Serializable with indirect circular reference\n"; echo throws(function() { fromPHP(new MyIndirectlyRecursiveSerializable); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECT-- Testing Serializable with direct circular reference OK: Got MongoDB\Driver\Exception\UnexpectedValueException Expected MyRecursiveSerializable::bsonSerialize() to return an array or stdClass, MyRecursiveSerializable given Testing Serializable with indirect circular reference OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected recursion for field path "parent.parent" ===DONE=== PK.h]Itests/server_error-001.phptnu[--TEST-- MongoDB\Driver\Server cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyServer %s final class %SMongoDB\Driver\Server%S in %s on line %d PK.h]'[Ltests/bug0667.phptnu[--TEST-- PHPC-667: BulkWrite::insert() does not generate ObjectId if another field has "_id" prefix --FILE-- insert(['_ids' => 1])); var_dump($bulk->insert((object) ['_ids' => 1])); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } ===DONE=== PK.h]"NN!tests/decimal128-3-valid-246.phptnu[--TEST-- Decimal128: [basx040] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000c00000000000000000000000000403000 {"d":{"$numberDecimal":"12"}} 180000001364000c00000000000000000000000000403000 ===DONE===PK.h]d**!tests/decimal128-3-valid-118.phptnu[--TEST-- Decimal128: [basx658] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000503000 {"d":{"$numberDecimal":"0E+8"}} 180000001364000000000000000000000000000000503000 ===DONE===PK.h]QGtests/cursor_error-001.phptnu[--TEST-- MongoDB\Driver\Cursor cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyCursor %s final class %SMongoDB\Driver\Cursor%S in %s on line %d PK.h]cEtests/server-getTags-001.phptnu[--TEST-- MongoDB\Driver\Server::getTags() with standalone --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY))->getTags()); ?> ===DONE=== --EXPECTF-- array(0) { } ===DONE=== PK.h]̕ehh!tests/decimal128-1-valid-022.phptnu[--TEST-- Decimal128: Regular - Largest --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f2af967ed05c82de3297ff6fde3c403000 {"d":{"$numberDecimal":"1234567890123456789012345678901234"}} 18000000136400f2af967ed05c82de3297ff6fde3c403000 ===DONE===PK.h]p::!tests/decimal128-2-valid-012.phptnu[--TEST-- Decimal128: [decq158] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000c0000000000000000000000000040b000 {"d":{"$numberDecimal":"-12"}} 180000001364000c0000000000000000000000000040b000 ===DONE===PK.h]S.tests/manager-executeReadWriteCommand-003.phptnu[--TEST-- MongoDB\Driver\Manager::executeReadWriteCommand() read and write concern inheritance --SKIPIF-- --FILE-- 'local', 'w' => 2, 'wtimeoutms' => 1000]); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$group' => ['_id' => 1]], ['$out' => COLLECTION_NAME . '.out'], ], 'cursor' => (object) [], ]); (new CommandObserver)->observe( function() use ($manager, $command) { $manager->executeReadWriteCommand(DATABASE_NAME, $command); $manager->executeReadWriteCommand(DATABASE_NAME, $command, [ 'readConcern' => new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE), 'writeConcern' => new MongoDB\Driver\WriteConcern(1), ]); }, function(stdClass $command) { echo json_encode($command->readConcern), "\n"; echo json_encode($command->writeConcern), "\n"; } ); ?> ===DONE=== --EXPECT-- {"level":"local"} {"w":2,"wtimeout":1000} {"level":"available"} {"w":1} ===DONE=== PK.h]֌@@tests/cursor-destruct-001.phptnu[--TEST-- MongoDB\Driver\Cursor destruct should kill a live cursor --SKIPIF-- --FILE-- executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(array('serverStatus' => 1))); $result = current($cursor->toArray()); if (isset($result->metrics->cursor->open->total)) { return $result->metrics->cursor->open->total; } if (isset($result->cursors->totalOpen)) { return $result->cursors->totalOpen; } throw new RuntimeException('Could not find number of open cursors in serverStatus'); } $manager = create_test_manager(); // Select a specific server for future operations to avoid mongos switching in sharded clusters $server = $manager->selectServer(new \MongoDB\Driver\ReadPreference('primary')); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 1)); $bulk->insert(array('_id' => 2)); $bulk->insert(array('_id' => 3)); $server->executeBulkWrite(NS, $bulk); $numOpenCursorsBeforeQuery = getNumOpenCursors($server); $cursor = $server->executeQuery(NS, new MongoDB\Driver\Query(array(), array('batchSize' => 2))); var_dump($cursor->isDead()); var_dump(getNumOpenCursors($server) == $numOpenCursorsBeforeQuery + 1); unset($cursor); var_dump(getNumOpenCursors($server) == $numOpenCursorsBeforeQuery); ?> ===DONE=== --EXPECT-- bool(false) bool(true) bool(true) ===DONE=== PK.h]pǵ&tests/decimal128-7-parseError-038.phptnu[--TEST-- Decimal128: [basx527] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]-Rbb!tests/decimal128-2-valid-151.phptnu[--TEST-- Decimal128: [decq828] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400feffffff00000000000000000000403000 {"d":{"$numberDecimal":"4294967294"}} 18000000136400feffffff00000000000000000000403000 ===DONE===PK.h]! I!tests/decimal128-5-valid-066.phptnu[--TEST-- Decimal128: [decq663] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006400000000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.00E+6113"}} 180000001364006400000000000000000000000000fe5f00 180000001364006400000000000000000000000000fe5f00 ===DONE===PK.h]x\tests/bug0671-001.phptnu[--TEST-- PHPC-671: Segfault if Manager is already freed when destructing live Cursor --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['batchSize' => 2])); unset($manager); unset($cursor); ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]w4vv!tests/bson-fromPHP_error-008.phptnu[--TEST-- MongoDB\BSON\fromPHP(): PHP documents with circular references --FILE-- 1, 'y' => [1, 2, 3]]; $document['y'][] = &$document['y']; fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting associative array with circular reference\n"; echo throws(function() { $document = ['x' => 1, 'y' => []]; $document['y'][0]['z'] = &$document['y']; fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting object with circular reference\n"; echo throws(function() { $document = (object) ['x' => 1, 'y' => (object) []]; $document->y->z = &$document->y; fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECT-- Testing packed array with circular reference OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected recursion for field path "y.3" Testing associative array with circular reference OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected recursion for field path "y.0.z" Testing object with circular reference OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected recursion for field path "y.z" ===DONE=== PK.h]!tests/decimal128-3-valid-167.phptnu[--TEST-- Decimal128: [basx176] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000383000 {"d":{"$numberDecimal":"0.1265"}} 18000000136400f104000000000000000000000000383000 18000000136400f104000000000000000000000000383000 ===DONE===PK.h] tests/query-ctor_error-002.phptnu[--TEST-- MongoDB\Driver\Query construction (invalid option types) --FILE-- 0], ['collation' => 0], ['comment' => 0], ['hint' => 0], ['max' => 0], ['min' => 0], ['projection' => 0], ['sort' => 0], ['modifiers' => ['$comment' => 0]], ['modifiers' => ['$hint' => 0]], ['modifiers' => ['$max' => 0]], ['modifiers' => ['$min' => 0]], ['modifiers' => ['$orderby' => 0]], ]; foreach ($tests as $options) { echo throws(function() use ($options) { new MongoDB\Driver\Query([], $options); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; } ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "modifiers" option to be array, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "collation" option to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "comment" option to be string, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "hint" option to be string, array, or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "max" option to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "min" option to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "projection" option to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "sort" option to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "$comment" modifier to be string, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "$hint" modifier to be string, array, or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "$max" modifier to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "$min" modifier to be array or object, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "$orderby" modifier to be array or object, int%S given ===DONE=== PK.h]Y!tests/decimal128-3-valid-281.phptnu[--TEST-- Decimal128: [basx220] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000443000 {"d":{"$numberDecimal":"1.265E+5"}} 18000000136400f104000000000000000000000000443000 18000000136400f104000000000000000000000000443000 ===DONE===PK.h]9@++!tests/decimal128-3-valid-028.phptnu[--TEST-- Decimal128: [basx019] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003cb000 {"d":{"$numberDecimal":"-0.00"}} 1800000013640000000000000000000000000000003cb000 1800000013640000000000000000000000000000003cb000 ===DONE===PK.h]QT*!tests/decimal128-3-valid-124.phptnu[--TEST-- Decimal128: [basx042] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400fc040000000000000000000000003c3000 {"d":{"$numberDecimal":"12.76"}} 18000000136400fc040000000000000000000000003c3000 18000000136400fc040000000000000000000000003c3000 ===DONE===PK.h]{^3tests/bson-utcdatetime-serialization_error-002.phptnu[--TEST-- MongoDB\BSON\UTCDateTime unserialization requires "milliseconds" string to parse as 64-bit integer (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "1234.5678" as 64-bit integer for MongoDB\BSON\UTCDateTime initialization ===DONE=== PK.h]vķ^""tests/symbol-valid-001.phptnu[--TEST-- Symbol: Empty string --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0d0000000e6100010000000000 {"a":{"$symbol":""}} 0d0000000e6100010000000000 ===DONE===PK.h]p!tests/double-decodeError-001.phptnu[--TEST-- Double type: double truncated --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h])]]0tests/manager-executeWriteCommand_error-003.phptnu[--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=== PK.h]7!tests/decimal128-3-valid-082.phptnu[--TEST-- Decimal128: [basx662] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003a3000 {"d":{"$numberDecimal":"0.000"}} 1800000013640000000000000000000000000000003a3000 1800000013640000000000000000000000000000003a3000 ===DONE===PK.h]w)II1tests/bson-timestamp-serialization_error-007.phptnu[--TEST-- MongoDB\BSON\Timestamp unserialization requires 64-bit integers to be positive unsigned 32-bit integers (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, 4294967296 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, 4294967296 given ===DONE=== PK.h]3dt'tests/code_w_scope-decodeError-003.phptnu[--TEST-- Javascript Code with Scope: field length too short (less than minimum size) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]_~&tests/decimal128-7-parseError-028.phptnu[--TEST-- Decimal128: [basx584] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]u`ϧ!tests/decimal128-4-valid-011.phptnu[--TEST-- Decimal128: [basx047] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640005000000000000000000000000003e3000 {"d":{"$numberDecimal":"0.5"}} 1800000013640005000000000000000000000000003e3000 1800000013640005000000000000000000000000003e3000 ===DONE===PK.h]5!tests/decimal128-5-valid-027.phptnu[--TEST-- Decimal128: [decq414] clamped zeros... (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000fe5f00 {"d":{"$numberDecimal":"0E+6111"}} 180000001364000000000000000000000000000000fe5f00 180000001364000000000000000000000000000000fe5f00 ===DONE===PK.h]N%tests/retryable-writes_error-001.phptnu[--TEST-- Retryable writes: actionable error message when using retryable writes on unsupported storage engines --SKIPIF-- --FILE-- startSession(); echo throws( function() use ($manager, $session) { $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['x' => 1], 'update' => ['$inc' => ['x' => 1]], ]); $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['session' => $session]); }, \MongoDB\Driver\Exception\CommandException::class ); echo "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\CommandException This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string. ===DONE=== PK.h]dk( tests/writeresult-debug-002.phptnu[--TEST-- MongoDB\Driver\WriteResult debug output with errors --SKIPIF-- --FILE-- false]); $bulk->update(['x' => 1], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 2], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $bulk->insert(['_id' => 3]); try { /* We assume that the replica set does not have 30 nodes */ $result = $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(30)); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteResult)#%d (%d) { ["nInserted"]=> int(3) ["nMatched"]=> int(0) ["nModified"]=> int(0) ["nRemoved"]=> int(0) ["nUpserted"]=> int(2) ["upsertedIds"]=> array(2) { [0]=> array(2) { ["index"]=> int(0) ["_id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } } [1]=> array(2) { ["index"]=> int(1) ["_id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } } } ["writeErrors"]=> array(3) { [0]=> object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "E11000 duplicate key %S phongo.writeResult_writeresult_debug_002%s dup key: { %S: 1 }" ["code"]=> int(11000) ["index"]=> int(3) ["info"]=> NULL } [1]=> object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "E11000 duplicate key %S phongo.writeResult_writeresult_debug_002%s dup key: { %S: 2 }" ["code"]=> int(11000) ["index"]=> int(5) ["info"]=> NULL } [2]=> object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "E11000 duplicate key %S phongo.writeResult_writeresult_debug_002%s dup key: { %S: 3 }" ["code"]=> int(11000) ["index"]=> int(7) ["info"]=> NULL } } ["writeConcernError"]=> object(MongoDB\Driver\WriteConcernError)#%d (%d) { ["message"]=> string(29) "Not enough data-bearing nodes" ["code"]=> int(100) ["info"]=> %a } ["writeConcern"]=> object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(30) } } ===DONE=== PK.h]<@)tests/bson-objectid-getTimestamp-002.phptnu[--TEST-- MongoDB\BSON\ObjectId::getTimestamp: Ensure that the Timestamp field is represented as an unsigned 32-bit integer --FILE-- getTimestamp()); echo $ts, "\n"; echo date_create("@{$ts}")->format("Y-m-d H:i:s"), "\n"; } create_object_id('000000000000000000000000'); create_object_id('7FFFFFFF0000000000000000'); create_object_id('800000000000000000000000'); create_object_id('FFFFFFFF0000000000000000'); ?> --EXPECT-- 0 1970-01-01 00:00:00 2147483647 2038-01-19 03:14:07 2147483648 2038-01-19 03:14:08 4294967295 2106-02-07 06:28:15PK.h]ej&&%tests/bulkwrite-update_error-008.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() hint option requires MongoDB 4.2 (server-side error) --SKIPIF-- =', '4.2'); ?> --FILE-- update(['_id' => 1], ['$set' => ['x' => 11]], ['hint' => '_id_']); echo throws(function() use ($manager, $bulk) { $manager->executeBulkWrite(NS, $bulk); }, 'MongoDB\Driver\Exception\BulkWriteException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\BulkWriteException BSON field 'update.updates.hint' is an unknown field. ===DONE=== PK.h];=N'^^!tests/decimal128-5-valid-014.phptnu[--TEST-- Decimal128: [decq132] fold-downs (more below) (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000a5bc138938d44c64d31fedf00 {"d":{"$numberDecimal":"-1.000000000000000000000000000000000E+6144"}} 18000000136400000000000a5bc138938d44c64d31fedf00 18000000136400000000000a5bc138938d44c64d31fedf00 ===DONE===PK.h]0w tests/standalone-plain-0001.phptnu[--TEST-- Connect to MongoDB with using PLAIN auth mechanism --XFAIL-- authMechanism=PLAIN (LDAP) tests must be reimplemented (PHPC-1172) parse_url() tests must be reimplemented (PHPC-1177) --SKIPIF-- --FILE-- "bugs", "roles" => array(array("role" => "readWrite", "db" => DATABASE_NAME)), ); $command = new MongoDB\Driver\Command($cmd); try { $result = $adminmanager->executeCommand('$external', $command); echo "User Created\n"; } catch(Exception $e) { echo $e->getMessage(), "\n"; } $username = "bugs"; $password = "password"; $database = '$external'; $dsn = sprintf("mongodb://%s:%s@%s:%d/?authSource=%s&authMechanism=PLAIN", $username, $password, $parsed["host"], $parsed["port"], $database); $manager = create_test_manager($dsn); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array("very" => "important")); try { $manager->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query(array("very" => "important")); $cursor = $manager->executeQuery(NS, $query); foreach($cursor as $document) { var_dump($document->very); } $cmd = new MongoDB\Driver\Command(array("drop" => COLLECTION_NAME)); $result = $manager->executeCommand(DATABASE_NAME, $cmd); } catch(Exception $e) { printf("Caught %s: %s\n", get_class($e), $e->getMessage()); } $cmd = array( "dropUser" => "bugs", ); $command = new MongoDB\Driver\Command($cmd); try { $result = $adminmanager->executeCommand('$external', $command); echo "User deleted\n"; } catch(Exception $e) { echo $e->getMessage(), "\n"; } ?> ===DONE=== --EXPECT-- User Created string(9) "important" User deleted ===DONE=== PK.h]!!tests/decimal128-1-valid-037.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - Unsigned Positive Exponent --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000463000 {"d":{"$numberDecimal":"1E+3"}} 180000001364000100000000000000000000000000463000 180000001364000100000000000000000000000000463000 ===DONE===PK.h]S@  !tests/decimal128-3-valid-291.phptnu[--TEST-- Decimal128: [basx231] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000183000 {"d":{"$numberDecimal":"1.265E-17"}} 18000000136400f104000000000000000000000000183000 18000000136400f104000000000000000000000000183000 ===DONE===PK.h]m%%'tests/clientEncryption-decrypt-001.phptnu[--TEST-- MongoDB\Driver\ClientEncryption::decrypt() --SKIPIF-- --FILE-- createClientEncryption(['keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary($key, 0)]]]); $key = $clientEncryption->createDataKey('local'); $encrypted = $clientEncryption->encrypt('top-secret', ['keyId' => $key, 'algorithm' => MongoDB\Driver\ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC]); var_dump($clientEncryption->decrypt($encrypted)); ?> ===DONE=== --EXPECTF-- string(10) "top-secret" ===DONE=== PK.h]@__!tests/decimal128-3-valid-241.phptnu[--TEST-- Decimal128: [basx009] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640068000000000000000000000000003e3000 {"d":{"$numberDecimal":"10.4"}} 1800000013640068000000000000000000000000003e3000 ===DONE===PK.h]pjj!tests/decimal128-2-valid-062.phptnu[--TEST-- Decimal128: [decq630] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000e8890423c78a000000000000fe5f00 {"d":{"$numberDecimal":"1.0000000000000000000E+6130"}} 180000001364000000e8890423c78a000000000000fe5f00 ===DONE===PK.h]=$tests/manager-addSubscriber-006.phptnu[--TEST-- MongoDB\Driver\Manager::addSubscriber() subscriber is only notified once (two Managers) --SKIPIF-- --FILE-- getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { printf("commandSucceeded: %s\n", $event->getCommandName()); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { printf("commandFailed: %s\n", $event->getCommandName()); } } // Subscribers will share the same libmongoc client $m1 = create_test_manager(); $m2 = create_test_manager(); $pingCommand = new MongoDB\Driver\Command(['ping' => 1]); $subscriber = new MySubscriber; $m1->addSubscriber($subscriber); $m2->addSubscriber($subscriber); printf("ping: %d\n", $m1->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); printf("ping: %d\n", $m2->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); ?> --EXPECT-- commandStarted: ping commandSucceeded: ping ping: 1 commandStarted: ping commandSucceeded: ping ping: 1 PK.h]G&tests/serverApi-serialization-001.phptnu[--TEST-- MongoDB\Driver\ServerApi serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> NULL ["deprecationErrors"]=> NULL } bool(true) C:24:"MongoDB\Driver\ServerApi":70:{a:3:{s:7:"version";s:1:"1";s:6:"strict";N;s:17:"deprecationErrors";N;}} object(MongoDB\Driver\ServerApi)#5 (3) { ["version"]=> string(1) "1" ["strict"]=> NULL ["deprecationErrors"]=> NULL } object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> bool(true) ["deprecationErrors"]=> NULL } bool(true) C:24:"MongoDB\Driver\ServerApi":72:{a:3:{s:7:"version";s:1:"1";s:6:"strict";b:1;s:17:"deprecationErrors";N;}} object(MongoDB\Driver\ServerApi)#5 (3) { ["version"]=> string(1) "1" ["strict"]=> bool(true) ["deprecationErrors"]=> NULL } object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> NULL ["deprecationErrors"]=> bool(true) } bool(true) C:24:"MongoDB\Driver\ServerApi":72:{a:3:{s:7:"version";s:1:"1";s:6:"strict";N;s:17:"deprecationErrors";b:1;}} object(MongoDB\Driver\ServerApi)#5 (3) { ["version"]=> string(1) "1" ["strict"]=> NULL ["deprecationErrors"]=> bool(true) } object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> bool(false) ["deprecationErrors"]=> bool(false) } bool(true) C:24:"MongoDB\Driver\ServerApi":74:{a:3:{s:7:"version";s:1:"1";s:6:"strict";b:0;s:17:"deprecationErrors";b:0;}} object(MongoDB\Driver\ServerApi)#5 (3) { ["version"]=> string(1) "1" ["strict"]=> bool(false) ["deprecationErrors"]=> bool(false) } ===DONE=== PK.h] qqtests/timestamp-valid-004.phptnu[--TEST-- Timestamp type: Timestamp with high-order bit set on both seconds and increment (not UINT32_MAX) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1000000011610000286bee00286bee00 {"a":{"$timestamp":{"t":4000000000,"i":4000000000}}} 1000000011610000286bee00286bee00 ===DONE===PK.h]tests/code-decodeError-004.phptnu[--TEST-- Javascript Code: bad code string length: longer than rest of document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]BBtests/bson-utcdatetime-002.phptnu[--TEST-- MongoDB\BSON\UTCDateTime debug handler --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> %rint\(|string\(13\) "|%r1416445411987%r"|\)%r } ===DONE=== PK.h]&ani i "tests/commandStartedEvent-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandStartedEvent --SKIPIF-- --FILE-- getCommandName(), "\n"; echo "- getCommand() returns an object: ", is_object( $event->getCommand() ) ? 'yes' : 'no', "\n"; echo "- getCommand() returns a stdClass object: ", $event->getCommand() instanceof stdClass ? 'yes' : 'no', "\n"; echo "- getDatabaseName() returns a string: ", is_string( $event->getDatabaseName() ) ? 'yes' : 'no', "\n"; echo "- getDatabaseName() returns '", $event->getDatabaseName(), "'\n"; echo "- getCommandName() returns a string: ", is_string( $event->getCommandName() ) ? 'yes' : 'no', "\n"; echo "- getCommandName() returns '", $event->getCommandName(), "'\n"; echo "- getServer() returns an object: ", is_object( $event->getServer() ) ? 'yes' : 'no', "\n"; echo "- getServer() returns a Server object: ", $event->getServer() instanceof MongoDB\Driver\Server ? 'yes' : 'no', "\n"; echo "- getOperationId() returns a string: ", is_string( $event->getOperationId() ) ? 'yes' : 'no', "\n"; echo "- getRequestId() returns a string: ", is_string( $event->getRequestId() ) ? 'yes' : 'no', "\n"; } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $query = new MongoDB\Driver\Query( [] ); $subscriber = new MySubscriber; MongoDB\Driver\Monitoring\addSubscriber( $subscriber ); $cursor = $m->executeQuery( "demo.test", $query ); ?> --EXPECT-- started: find - getCommand() returns an object: yes - getCommand() returns a stdClass object: yes - getDatabaseName() returns a string: yes - getDatabaseName() returns 'demo' - getCommandName() returns a string: yes - getCommandName() returns 'find' - getServer() returns an object: yes - getServer() returns a Server object: yes - getOperationId() returns a string: yes - getRequestId() returns a string: yes PK.h]-K~,&tests/decimal128-4-parseError-017.phptnu[--TEST-- Decimal128: [dqbsr434] check rounding modes heeded (Rounded & Inexact) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]^{`!tests/decimal128-3-valid-057.phptnu[--TEST-- Decimal128: [basx674] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000343000 {"d":{"$numberDecimal":"0.000000"}} 180000001364000000000000000000000000000000343000 180000001364000000000000000000000000000000343000 ===DONE===PK.h]Wtests/bson-encode-004.phptnu[--TEST-- BSON encoding: Object Document Mapper --FILE-- addAddress($sunnyvale); $hannes->addAddress($kopavogur); $mikola = new Person("Jeremy", 21); $michigan = new Address(48169, "USA"); $hannes->addFriend($mikola); var_dump($hannes); $s = fromPHP(array($hannes)); echo "Test ", toJSON($s), "\n"; hex_dump($s); $ret = toPHP($s); var_dump($ret); ?> ===DONE=== --EXPECTF-- object(Person)#%d (5) { ["name":protected]=> string(6) "Hannes" ["age":protected]=> int(42) ["addresses":protected]=> array(2) { [0]=> object(Address)#%d (2) { ["zip":protected]=> int(94086) ["country":protected]=> string(3) "USA" } [1]=> object(Address)#%d (2) { ["zip":protected]=> int(200) ["country":protected]=> string(7) "Iceland" } } ["friends":protected]=> array(1) { [0]=> object(Person)#%d (5) { ["name":protected]=> string(6) "Jeremy" ["age":protected]=> int(21) ["addresses":protected]=> array(0) { } ["friends":protected]=> array(0) { } ["secret":protected]=> string(24) "Jeremy confidential info" } } ["secret":protected]=> string(24) "Hannes confidential info" } Test { "0" : { "__pclass" : { "$binary" : "UGVyc29u", "$type" : "80" }, "name" : "Hannes", "age" : 42, "addresses" : [ { "__pclass" : { "$binary" : "QWRkcmVzcw==", "$type" : "80" }, "zip" : 94086, "country" : "USA" }, { "__pclass" : { "$binary" : "QWRkcmVzcw==", "$type" : "80" }, "zip" : 200, "country" : "Iceland" } ], "friends" : [ { "__pclass" : { "$binary" : "UGVyc29u", "$type" : "80" }, "name" : "Jeremy", "age" : 21, "addresses" : [ ], "friends" : [ ] } ] } } 0 : 23 01 00 00 03 30 00 1b 01 00 00 05 5f 5f 70 63 [#....0......__pc] 10 : 6c 61 73 73 00 06 00 00 00 80 50 65 72 73 6f 6e [lass......Person] 20 : 02 6e 61 6d 65 00 07 00 00 00 48 61 6e 6e 65 73 [.name.....Hannes] 30 : 00 10 61 67 65 00 2a 00 00 00 04 61 64 64 72 65 [..age.*....addre] 40 : 73 73 65 73 00 79 00 00 00 03 30 00 35 00 00 00 [sses.y....0.5...] 50 : 05 5f 5f 70 63 6c 61 73 73 00 07 00 00 00 80 41 [.__pclass......A] 60 : 64 64 72 65 73 73 10 7a 69 70 00 86 6f 01 00 02 [ddress.zip..o...] 70 : 63 6f 75 6e 74 72 79 00 04 00 00 00 55 53 41 00 [country.....USA.] 80 : 00 03 31 00 39 00 00 00 05 5f 5f 70 63 6c 61 73 [..1.9....__pclas] 90 : 73 00 07 00 00 00 80 41 64 64 72 65 73 73 10 7a [s......Address.z] A0 : 69 70 00 c8 00 00 00 02 63 6f 75 6e 74 72 79 00 [ip......country.] B0 : 08 00 00 00 49 63 65 6c 61 6e 64 00 00 00 04 66 [....Iceland....f] C0 : 72 69 65 6e 64 73 00 5a 00 00 00 03 30 00 52 00 [riends.Z....0.R.] D0 : 00 00 05 5f 5f 70 63 6c 61 73 73 00 06 00 00 00 [...__pclass.....] E0 : 80 50 65 72 73 6f 6e 02 6e 61 6d 65 00 07 00 00 [.Person.name....] F0 : 00 4a 65 72 65 6d 79 00 10 61 67 65 00 15 00 00 [.Jeremy..age....] 100 : 00 04 61 64 64 72 65 73 73 65 73 00 05 00 00 00 [..addresses.....] 110 : 00 04 66 72 69 65 6e 64 73 00 05 00 00 00 00 00 [..friends.......] 120 : 00 00 00 [...] object(stdClass)#%d (1) { [%r(0|"0")%r]=> object(Person)#%d (5) { ["name":protected]=> string(6) "Hannes" ["age":protected]=> int(42) ["addresses":protected]=> array(2) { [0]=> object(Address)#%d (2) { ["zip":protected]=> int(94086) ["country":protected]=> string(3) "USA" } [1]=> object(Address)#%d (2) { ["zip":protected]=> int(200) ["country":protected]=> string(7) "Iceland" } } ["friends":protected]=> array(1) { [0]=> object(Person)#%d (5) { ["name":protected]=> string(6) "Jeremy" ["age":protected]=> int(21) ["addresses":protected]=> array(0) { } ["friends":protected]=> array(0) { } ["secret":protected]=> string(4) "none" } } ["secret":protected]=> string(4) "none" } } ===DONE=== PK.h]Ftests/bug0430-003.phptnu[--TEST-- PHPC-430: Query constructor arguments are modified --FILE-- []]; $query = buildQuery($filter, $options); var_dump($options); ?> ===DONE=== --EXPECT-- array(1) { ["sort"]=> array(0) { } } ===DONE=== PK.h],ک] tests/writeconcern-ctor-002.phptnu[--TEST-- MongoDB\Driver\WriteConcern construction with 64-bit wtimeoutms --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["wtimeout"]=> int(2147483648) } ===DONE=== PK.h] 5$YY1tests/commandSucceededEvent-getServiceId-002.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandSucceededEvent omits serviceId for non-load balanced topology --SKIPIF-- --FILE-- getCommandName()); var_dump($event->getServiceId()); } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { printf("commandSucceeded: %s\n", $event->getCommandName()); var_dump($event->getServiceId()); } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $manager = create_test_manager(); $manager->addSubscriber(new MySubscriber); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); ?> --EXPECTF-- commandStarted: ping NULL commandSucceeded: ping NULL PK.h]tests/bug0671-002.phptnu[--TEST-- PHPC-671: Segfault if Manager is already freed when using selected Server --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); unset($manager); $cursor = $server->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); var_dump($cursor->toArray()[0]); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["ok"]=> float(1)%A } ===DONE=== PK.h]"nG00tests/bug0851-001.phptnu[--TEST-- PHPC-851: ReadPreference constructor should not modify tagSets argument --FILE-- 'ny'], [], ]; $rp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY_PREFERRED, $tagSets); var_dump($tagSets); /* Dump the Manager's ReadPreference to ensure that each element in the $tagSets * argument was converted to an object. */ var_dump($rp); ?> ===DONE=== --EXPECTF-- array(2) { [0]=> array(1) { ["dc"]=> string(2) "ny" } [1]=> array(0) { } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" ["tags"]=> array(2) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } [1]=> object(stdClass)#%d (%d) { } } } ===DONE=== PK.h]B][[tests/writeerror-debug-001.phptnu[--TEST-- MongoDB\Driver\WriteError debug output --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 1]); try { $manager->executeBulkWrite(NS, $bulk); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteErrors()[0]); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "%SE11000 duplicate key error %s: phongo.writeError_writeerror_debug_001%s dup key: { %S: 1 }" ["code"]=> int(11000) ["index"]=> int(1) ["info"]=> NULL } ===DONE=== PK.h]H eF&tests/decimal128-7-parseError-056.phptnu[--TEST-- Decimal128: [basx520] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h].!tests/decimal128-3-valid-068.phptnu[--TEST-- Decimal128: [basx149] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000523000 {"d":{"$numberDecimal":"0E+9"}} 180000001364000000000000000000000000000000523000 180000001364000000000000000000000000000000523000 ===DONE===PK.h]433tests/bson-utcdatetime-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime #001 --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => $utcdatetime)); $manager->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query(array('_id' => 1)); $cursor = $manager->executeQuery(NS, $query); $results = iterator_to_array($cursor); $tests = array( array($utcdatetime), array($results[0]->x), ); foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $bson = fromJSON($json); $testagain = toPHP($bson); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- Test#0 { "0" : { "$date" : 1416445411987 } } string(37) "{ "0" : { "$date" : 1416445411987 } }" string(37) "{ "0" : { "$date" : 1416445411987 } }" bool(true) Test#1 { "0" : { "$date" : 1416445411987 } } string(37) "{ "0" : { "$date" : 1416445411987 } }" string(37) "{ "0" : { "$date" : 1416445411987 } }" bool(true) ===DONE=== PK.h]K!tests/decimal128-3-valid-300.phptnu[--TEST-- Decimal128: [basx242] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000503000 {"d":{"$numberDecimal":"1.265E+11"}} 18000000136400f104000000000000000000000000503000 18000000136400f104000000000000000000000000503000 ===DONE===PK.h]2btests/bug0341.phptnu[--TEST-- PHPC-341: fromJSON() leaks when JSON contains array or object fields --FILE-- ===DONE=== --EXPECTF-- object(stdClass)#%d (2) { ["foo"]=> string(3) "yes" ["bar"]=> bool(false) } object(stdClass)#%d (2) { ["foo"]=> string(2) "no" ["array"]=> array(2) { [0]=> int(5) [1]=> int(6) } } object(stdClass)#%d (2) { ["foo"]=> string(2) "no" ["obj"]=> object(stdClass)#%d (1) { ["embedded"]=> float(4.125) } } ===DONE=== PK.h]p#~$tests/bson-javascript-clone-001.phptnu[--TEST-- MongoDB\BSON\Javascript can be cloned --FILE-- 42]); $javascript->foo = 'bar'; $clone = clone $javascript; var_dump($clone == $javascript); var_dump($clone === $javascript); unset($javascript); var_dump($clone); var_dump($clone->foo); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(62) "function foo(bar) {var baz = bar; var bar = foo; return bar; }" ["scope"]=> object(stdClass)#%d (%d) { ["foo"]=> int(42) } } string(3) "bar" ===DONE=== PK.h]uu/tests/standalone-x509-extract_username-002.phptnu[--TEST-- Connect to MongoDB with SSL and X509 auth and username retrieved from cert (stream context) --XFAIL-- parse_url() tests must be reimplemented (PHPC-1177) --SKIPIF-- --FILE-- stream_context_create([ 'ssl' => [ // libmongoc does not allow the hostname to be overridden as "server" 'allow_invalid_hostname' => true, 'allow_self_signed' => false, // "weak_cert_validation" alias 'cafile' => SSL_DIR . '/ca.pem', // "ca_file" alias 'local_cert' => SSL_DIR . '/client.pem', // "pem_file" alias ], ]), ]; $uriOptions = ['authMechanism' => 'MONGODB-X509', 'ssl' => true]; $parsed = parse_url(URI); $uri = sprintf('mongodb://%s:%d', $parsed['host'], $parsed['port']); $manager = create_test_manager($uri, $uriOptions, $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); var_dump($cursor->toArray()[0]); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["ok"]=> float(1) } ===DONE=== PK.h]9Xdd&tests/writeconcern-ctor_error-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern construction (invalid arguments) --SKIPIF-- =', '7.99'); ?> --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\WriteConcern::__construct() expects at most 3 %r(argument|parameter)%rs, 4 given ===DONE=== PK.h]ָ$tests/server-executeCommand-005.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() takes a read preference as legacy option --SKIPIF-- --FILE-- selectServer($primaryRp); $secondary = $manager->selectServer($secondaryRp); echo "Testing primary:\n"; $command = new MongoDB\Driver\Command(['ping' => 1]); $cursor = $primary->executeCommand(DATABASE_NAME, $command, $primaryRp); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; echo "Testing secondary:\n"; $command = new MongoDB\Driver\Command(['ping' => 1]); $cursor = $secondary->executeCommand(DATABASE_NAME, $command, $secondaryRp); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; ?> ===DONE=== --EXPECTF-- Testing primary: is_primary: true is_secondary: false Testing secondary: is_primary: false is_secondary: true ===DONE=== PK.h]n$)) tests/bson-symbol-clone-001.phptnu[--TEST-- MongoDB\BSON\Symbol can be cloned --FILE-- symbol; $symbol->foo = 'bar'; $clone = clone $symbol; var_dump($clone == $symbol); var_dump($clone === $symbol); unset($symbol); var_dump($clone); var_dump($clone->foo); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) object(MongoDB\BSON\Symbol)#%d (1) { ["symbol"]=> string(4) "test" } string(3) "bar" ===DONE=== PK.h]vtS66tests/bug0623.phptnu[--TEST-- PHPC-623: Numeric keys limited to unsigned 32-bit integer --SKIPIF-- --FILE-- 'a', 'X9781449410247' => 'b', 9781449410248 => 'c', ], [ '4294967295' => 'a', '4294967296' => 'b', '4294967297' => 'c', ] ]; foreach ($tests as $test) { printf("Test %s\n", json_encode($test)); $bson = fromPHP($test); hex_dump($bson); echo toJSON($bson), "\n\n"; } ?> ===DONE=== --EXPECT-- Test {"9781449410247":"a","X9781449410247":"b","9781449410248":"c"} 0 : 45 00 00 00 02 39 37 38 31 34 34 39 34 31 30 32 [E....97814494102] 10 : 34 37 00 02 00 00 00 61 00 02 58 39 37 38 31 34 [47.....a..X97814] 20 : 34 39 34 31 30 32 34 37 00 02 00 00 00 62 00 02 [49410247.....b..] 30 : 39 37 38 31 34 34 39 34 31 30 32 34 38 00 02 00 [9781449410248...] 40 : 00 00 63 00 00 [..c..] { "9781449410247" : "a", "X9781449410247" : "b", "9781449410248" : "c" } Test {"4294967295":"a","4294967296":"b","4294967297":"c"} 0 : 3b 00 00 00 02 34 32 39 34 39 36 37 32 39 35 00 [;....4294967295.] 10 : 02 00 00 00 61 00 02 34 32 39 34 39 36 37 32 39 [....a..429496729] 20 : 36 00 02 00 00 00 62 00 02 34 32 39 34 39 36 37 [6.....b..4294967] 30 : 32 39 37 00 02 00 00 00 63 00 00 [297.....c..] { "4294967295" : "a", "4294967296" : "b", "4294967297" : "c" } ===DONE=== PK.h]h)))tests/manager-executeQuery_error-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeQuery() should not issue warning before exception --FILE-- 1]); echo throws(function() use ($manager, $query) { $manager->executeQuery(NS, $query); }, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n"; // Valid host refuses connection $manager = create_test_manager('mongodb://localhost:54321', ['serverSelectionTimeoutMS' => 1]); echo throws(function() use ($manager, $query) { $manager->executeQuery(NS, $query); }, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s ===DONE=== PK.h] AA#tests/manager-ctor-appname-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): appname option --SKIPIF-- --FILE-- "2-{$name2}"]); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand("test", $command); ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]tests/bson-fromPHP-002.phptnu[--TEST-- MongoDB\BSON\fromPHP(): Encoding non-Persistable objects as a document --FILE-- ===DONE=== --EXPECT-- Test { "baz" : 3 } 0 : 0e 00 00 00 10 62 61 7a 00 03 00 00 00 00 [.....baz......] ===DONE=== PK.h]q] tests/binary-parseError-004.phptnu[--TEST-- Binary type: $uuid invalid value--misplaced hyphens --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]HHtests/bson-toJSON-002.phptnu[--TEST-- MongoDB\BSON\toJSON(): Encoding extended JSON types --FILE-- new MongoDB\BSON\ObjectId('56315a7c6118fd1b920270b1') ], [ 'binary' => new MongoDB\BSON\Binary('foo', MongoDB\BSON\Binary::TYPE_GENERIC) ], [ 'date' => new MongoDB\BSON\UTCDateTime(1445990400000) ], [ 'timestamp' => new MongoDB\BSON\Timestamp(1234, 5678) ], [ 'regex' => new MongoDB\BSON\Regex('pattern', 'i') ], [ 'code' => new MongoDB\BSON\Javascript('function() { return 1; }') ], [ 'code_ws' => new MongoDB\BSON\Javascript('function() { return a; }', ['a' => 1]) ], [ 'minkey' => new MongoDB\BSON\MinKey ], [ 'maxkey' => new MongoDB\BSON\MaxKey ], ]; foreach ($tests as $value) { $bson = fromPHP($value); echo toJSON($bson), "\n"; } ?> ===DONE=== --EXPECT-- { "_id" : { "$oid" : "56315a7c6118fd1b920270b1" } } { "binary" : { "$binary" : "Zm9v", "$type" : "00" } } { "date" : { "$date" : 1445990400000 } } { "timestamp" : { "$timestamp" : { "t" : 5678, "i" : 1234 } } } { "regex" : { "$regex" : "pattern", "$options" : "i" } } { "code" : { "$code" : "function() { return 1; }" } } { "code_ws" : { "$code" : "function() { return a; }", "$scope" : { "a" : 1 } } } { "minkey" : { "$minKey" : 1 } } { "maxkey" : { "$maxKey" : 1 } } ===DONE=== PK.h]99!tests/decimal128-2-valid-084.phptnu[--TEST-- Decimal128: [decq072] Nmin and below --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000420000 {"d":{"$numberDecimal":"1E-6143"}} 180000001364000100000000000000000000000000420000 ===DONE===PK.h]Y /tests/manager-ctor-write_concern-error-005.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid write concern (journal) --FILE-- 'invalid']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; // Invalid values (journal conflicts with unacknowledged write concerns) echo throws(function() { create_test_manager('mongodb://127.0.0.1/?w=-1&journal=true'); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://127.0.0.1/?w=0&journal=true'); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://127.0.0.1/?w=-1', ['journal' => true]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://127.0.0.1/?w=0', ['journal' => true]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://127.0.0.1/?journal=true', ['w' => -1]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://127.0.0.1/?journal=true', ['w' => 0]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager(null, ['w' => -1, 'journal' => true]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager(null, ['w' => 0, 'journal' => true]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?journal=invalid'. Unsupported value for "journal": "invalid". OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected boolean for "journal" URI option, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?w=-1&journal=true'. Journal conflicts with w value [w=-1]. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?w=0&journal=true'. Journal conflicts with w value [w=0]. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Journal conflicts with w value: -1 OK: Got MongoDB\Driver\Exception\InvalidArgumentException Journal conflicts with w value: 0 OK: Got MongoDB\Driver\Exception\InvalidArgumentException Journal conflicts with w value: -1 OK: Got MongoDB\Driver\Exception\InvalidArgumentException Journal conflicts with w value: 0 OK: Got MongoDB\Driver\Exception\InvalidArgumentException Journal conflicts with w value: -1 OK: Got MongoDB\Driver\Exception\InvalidArgumentException Journal conflicts with w value: 0 ===DONE=== PK.h]uutests/serverApi-debug.phptnu[--TEST-- MongoDB\Driver\ServerApi debug output --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> NULL ["deprecationErrors"]=> NULL } object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> bool(true) ["deprecationErrors"]=> NULL } object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> NULL ["deprecationErrors"]=> bool(true) } object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> bool(false) ["deprecationErrors"]=> bool(false) } ===DONE=== PK.h]P -tests/manager-executeBulkWrite_error-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() with duplicate key errors (ordered) --SKIPIF-- --FILE-- true]); $bulk->insert(array('_id' => 1)); $bulk->insert(array('_id' => 1)); $bulk->insert(array('_id' => 2)); $bulk->insert(array('_id' => 2)); try { $result = $manager->executeBulkWrite(NS, $bulk); echo "FAILED\n"; } catch (MongoDB\Driver\Exception\BulkWriteException $e) { printf("BulkWriteException: %s\n", $e->getMessage()); echo "\n===> WriteResult\n"; printWriteResult($e->getWriteResult()); } echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- BulkWriteException:%S E11000 duplicate key error %s: phongo.manager_manager_executeBulkWrite_error_001%sdup key: { %S: 1 } ===> WriteResult server: %s:%d insertedCount: 1 matchedCount: 0 modifiedCount: 0 upsertedCount: 0 deletedCount: 0 object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "%s" ["code"]=> int(11000) ["index"]=> int(1) ["info"]=> NULL } writeError[1].message: %s writeError[1].code: 11000 ===> Collection array(1) { [0]=> object(stdClass)#%d (1) { ["_id"]=> int(1) } } ===DONE=== PK.h]TQMM!tests/decimal128-5-valid-042.phptnu[--TEST-- Decimal128: [decq615] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000e4d20cc8dcd2b752000000fe5f00 {"d":{"$numberDecimal":"1.00000000000000000000000000E+6137"}} 18000000136400000000e4d20cc8dcd2b752000000fe5f00 18000000136400000000e4d20cc8dcd2b752000000fe5f00 ===DONE===PK.h]JJtests/cursor-isDead-002.phptnu[--TEST-- MongoDB\Driver\Cursor::isDead() with IteratorIterator (find command) --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['batchSize' => 2])); $iterator = new IteratorIterator($cursor); $iterator->rewind(); for ($i = 0; $i < 3; $i++) { var_dump($cursor->isDead()); $iterator->next(); } var_dump($cursor->isDead()); ?> ===DONE=== --EXPECT-- bool(false) bool(false) bool(false) bool(true) ===DONE=== PK.h]gUNtests/timestamp-valid-002.phptnu[--TEST-- Timestamp type: Timestamp: (123456789, 42) (keys reversed) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 100000001161002a00000015cd5b0700 {"a":{"$timestamp":{"t":123456789,"i":42}}} 100000001161002a00000015cd5b0700 100000001161002a00000015cd5b0700 ===DONE===PK.h]x!Wcc!tests/decimal128-3-valid-006.phptnu[--TEST-- Decimal128: [basx026] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364009f230000000000000000000000003ab000 {"d":{"$numberDecimal":"-9.119"}} 180000001364009f230000000000000000000000003ab000 ===DONE===PK.h]z1tests/bson-timestamp-serialization_error-005.phptnu[--TEST-- MongoDB\BSON\Timestamp unserialization requires "increment" and "timestamp" integer fields (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields ===DONE=== PK.h]YԒ&tests/decimal128-6-parseError-021.phptnu[--TEST-- Decimal128: trailing white space --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]NO/::!tests/decimal128-2-valid-122.phptnu[--TEST-- Decimal128: [decq056] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364007b00000000000000000000000000403000 {"d":{"$numberDecimal":"123"}} 180000001364007b00000000000000000000000000403000 ===DONE===PK.h]GG!tests/decimal128-3-valid-062.phptnu[--TEST-- Decimal128: [basx636] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000483000 {"d":{"$numberDecimal":"0E+4"}} 180000001364000000000000000000000000000000483000 180000001364000000000000000000000000000000483000 ===DONE===PK.h]2&tests/decimal128-7-parseError-077.phptnu[--TEST-- Decimal128: [basx541] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]P !tests/decimal128-3-valid-249.phptnu[--TEST-- Decimal128: [basx196] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003a3000 {"d":{"$numberDecimal":"1.265"}} 18000000136400f1040000000000000000000000003a3000 18000000136400f1040000000000000000000000003a3000 ===DONE===PK.h].?n00!tests/decimal128-1-valid-001.phptnu[--TEST-- Decimal128: Special - Canonical NaN --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007c00 {"d":{"$numberDecimal":"NaN"}} 180000001364000000000000000000000000000000007c00 ===DONE===PK.h]ء!tests/decimal128-3-valid-168.phptnu[--TEST-- Decimal128: [basx178] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003c3000 {"d":{"$numberDecimal":"12.65"}} 18000000136400f1040000000000000000000000003c3000 18000000136400f1040000000000000000000000003c3000 ===DONE===PK.h]Iʆ2tests/manager-ctor-directconnection-error-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): directConnection=true conflicts with SRV --FILE-- true]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb+srv://a.example.com/?directConnection=true'. SRV URI not allowed with directConnection option. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: SRV URI not allowed with directConnection option. ===DONE=== PK.h]itests/top-parseError-037.phptnu[--TEST-- Top-level document validity: Bad $maxKey (boolean, not integer) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]) tests/array-decodeError-002.phptnu[--TEST-- Array: Array length too short: leaks terminator --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]3Ҟ&tests/decimal128-6-parseError-011.phptnu[--TEST-- Decimal128: 2 signs --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] C!tests/decimal128-3-valid-098.phptnu[--TEST-- Decimal128: [basx649] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000503000 {"d":{"$numberDecimal":"0E+8"}} 180000001364000000000000000000000000000000503000 180000001364000000000000000000000000000000503000 ===DONE===PK.h]jKtests/bson-regex-003.phptnu[--TEST-- MongoDB\BSON\Regex with flags omitted --FILE-- getPattern()); printf("Flags: %s\n", $regexp->getFlags()); printf("String representation: %s\n", $regexp); $tests = array( array("regex" => $regexp), ); foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $bson = fromJSON($json); $testagain = toPHP($bson); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- Pattern: regexp Flags: String representation: /regexp/ Test#0 { "regex" : { "$regex" : "regexp", "$options" : "" } } string(54) "{ "regex" : { "$regex" : "regexp", "$options" : "" } }" string(54) "{ "regex" : { "$regex" : "regexp", "$options" : "" } }" bool(true) ===DONE=== PK.h]!(tests/bson-symbol-serialization-002.phptnu[--TEST-- MongoDB\BSON\Symbol serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- symbol; var_dump($symbol = $test); var_dump($s = serialize($symbol)); var_dump(unserialize($s)); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Symbol)#%d (%d) { ["symbol"]=> string(11) "symbolValue" } string(63) "O:19:"MongoDB\BSON\Symbol":1:{s:6:"symbol";s:11:"symbolValue";}" object(MongoDB\BSON\Symbol)#%d (%d) { ["symbol"]=> string(11) "symbolValue" } ===DONE=== PK.h]3*ff!tests/manager-ctor_error-005.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): Invalid handshake data --FILE-- []], ['version' => []], ['platform' => []], ]; foreach ($tests as $driver) { echo throws(function () use ($driver) { $manager = create_test_manager(null, [], ['driver' => $driver]); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; } ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "driver" driver option to be an array, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "driver" driver option to be an array, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "name" handshake option to be a string, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "version" handshake option to be a string, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "platform" handshake option to be a string, array given ===DONE=== PK.h]744!tests/decimal128-5-valid-019.phptnu[--TEST-- Decimal128: [decq181] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000028000 {"d":{"$numberDecimal":"-1E-6175"}} 180000001364000100000000000000000000000000028000 180000001364000100000000000000000000000000028000 ===DONE===PK.h]>/$tests/manager-addSubscriber-004.phptnu[--TEST-- MongoDB\Driver\Manager::addSubscriber() NOP if subscriber already registered --SKIPIF-- --FILE-- getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { printf("commandSucceeded: %s\n", $event->getCommandName()); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { printf("commandFailed: %s\n", $event->getCommandName()); } } $m = create_test_manager(); $pingCommand = new MongoDB\Driver\Command(['ping' => 1]); $subscriber = new MySubscriber; echo "adding subscriber twice\n"; $m->addSubscriber($subscriber); $m->addSubscriber($subscriber); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); ?> --EXPECT-- adding subscriber twice commandStarted: ping commandSucceeded: ping ping: 1 PK.h]8tests/cursor-getmore-006.phptnu[--TEST-- MongoDB\Driver\Cursor command result iteration with getmore failure --SKIPIF-- =", "3.6"); ?> --FILE-- insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$match' => new stdClass], ], 'cursor' => ['batchSize' => 2], ]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); failGetMore($manager); throws(function() use ($cursor) { foreach ($cursor as $i => $document) { printf("%d => {_id: %d}\n", $i, $document->_id); } }, "MongoDB\Driver\Exception\ConnectionException"); ?> ===DONE=== --CLEAN-- --EXPECT-- Inserted: 5 0 => {_id: 0} 1 => {_id: 1} OK: Got MongoDB\Driver\Exception\ConnectionException ===DONE=== PK.h]Ftests/top-parseError-043.phptnu[--TEST-- Top-level document validity: Null byte in $regularExpression pattern --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h] T(tests/bson-javascript-set_state-001.phptnu[--TEST-- MongoDB\BSON\Javascript::__set_state() --FILE-- 42]], ['function foo() { return id; }', ['id' => new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4603')]], ]; foreach ($tests as $test) { list($code, $scope) = $test; var_export(MongoDB\BSON\Javascript::__set_state([ 'code' => $code, 'scope' => $scope, ])); echo "\n\n"; } // Test with missing scope field var_export(MongoDB\BSON\Javascript::__set_state([ 'code' => 'function foo(bar) { return bar; }', ])); echo "\n\n"; ?> ===DONE=== --EXPECTF-- MongoDB\BSON\Javascript::__set_state(array( %w'code' => 'function foo(bar) { return bar; }', %w'scope' => NULL, )) MongoDB\BSON\Javascript::__set_state(array( %w'code' => 'function foo(bar) { return bar; }', %w'scope' => %Sarray( %S), )) MongoDB\BSON\Javascript::__set_state(array( %w'code' => 'function foo() { return foo; }', %w'scope' => %Sarray( %w'foo' => 42, %S), )) MongoDB\BSON\Javascript::__set_state(array( %w'code' => 'function foo() { return id; }', %w'scope' => %Sarray( %w'id' => MongoDB\BSON\ObjectId::__set_state(array( %w'oid' => '53e2a1c40640fd72175d4603', )), %S), )) MongoDB\BSON\Javascript::__set_state(array( %w'code' => 'function foo(bar) { return bar; }', %w'scope' => NULL, )) ===DONE=== PK.h]>ctests/regex-valid-006.phptnu[--TEST-- Regular Expression type: flags not alphabetized --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($degenerateBson))), "\n"; // Degenerate BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($degenerateBson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 100000000b610061626300696d780000 {"a":{"$regularExpression":{"pattern":"abc","options":"imx"}}} 100000000b610061626300696d780000 100000000b610061626300696d780000 {"a":{"$regularExpression":{"pattern":"abc","options":"imx"}}} 100000000b610061626300696d780000 ===DONE===PK.h]Ȫd6!tests/decimal128-3-valid-217.phptnu[--TEST-- Decimal128: [basx301] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000583000 {"d":{"$numberDecimal":"1.0E+13"}} 180000001364000a00000000000000000000000000583000 180000001364000a00000000000000000000000000583000 ===DONE===PK.h]m2tests/bson-decimal128-serialization_error-002.phptnu[--TEST-- MongoDB\BSON\Decimal128 unserialization requires valid decimal string (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing Decimal128 string: INVALID ===DONE=== PK.h]Iot``!tests/decimal128-1-valid-039.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - Long Significand with Exponent --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640079d9e0f9763ada429d0200000000583000 {"d":{"$numberDecimal":"1.2345689012345789012345E+34"}} 1800000013640079d9e0f9763ada429d0200000000583000 1800000013640079d9e0f9763ada429d0200000000583000 ===DONE===PK.h]z8v++!tests/decimal128-3-valid-036.phptnu[--TEST-- Decimal128: [basx291] some more negative zeros [systematic tests below] --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000036b000 {"d":{"$numberDecimal":"-0.00000"}} 18000000136400000000000000000000000000000036b000 18000000136400000000000000000000000000000036b000 ===DONE===PK.h]O<2tests/top-parseError-023.phptnu[--TEST-- Top-level document validity: Bad $code (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]!tests/decimal128-1-valid-010.phptnu[--TEST-- Decimal128: Special - Invalid representation treated as -0 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400dcba9876543210deadbeef00000010ec00 {"d":{"$numberDecimal":"-0"}} ===DONE===PK.h]oUy&tests/decimal128-7-parseError-030.phptnu[--TEST-- Decimal128: [basx589] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]mT\ \ #tests/readpreference-debug-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference debug output --FILE-- 'ny']]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, [['dc' => 'ny'], ['dc' => 'sf', 'use' => 'reporting'], []]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => 1000]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['hedge' => ['enabled' => true]]), ]; foreach ($tests as $test) { var_dump($test); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "nearest" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(3) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } [1]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "sf" ["use"]=> string(9) "reporting" } [2]=> object(stdClass)#%d (%d) { } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1000) } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["hedge"]=> object(stdClass)#%d (%d) { ["enabled"]=> bool(true) } } ===DONE=== PK.h]4ZB)tests/manager-ctor-write_concern-005.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): write concern options (64-bit wtimeoutms) --FILE-- getWriteConcern()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> %rint\(4294967296\)|string\(10\) "4294967296"%r } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" ["wtimeout"]=> %rint\(4294967296\)|string\(10\) "4294967296"%r } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(12) "customTagSet" ["wtimeout"]=> %rint\(4294967296\)|string\(10\) "4294967296"%r } ===DONE=== PK.h]BpFF!tests/decimal128-2-valid-080.phptnu[--TEST-- Decimal128: [decq666] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.0E+6112"}} 180000001364000a00000000000000000000000000fe5f00 ===DONE===PK.h]Htests/top-parseError-001.phptnu[--TEST-- Top-level document validity: Bad $regularExpression (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]4բ!tests/decimal128-3-valid-078.phptnu[--TEST-- Decimal128: [basx641] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]`R͈!tests/decimal128-2-valid-022.phptnu[--TEST-- Decimal128: [decq133] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000a5bc138938d44c64d31fedf00 {"d":{"$numberDecimal":"-1.000000000000000000000000000000000E+6144"}} 18000000136400000000000a5bc138938d44c64d31fedf00 ===DONE===PK.h]fcc(tests/bson-binary-serialization-001.phptnu[--TEST-- MongoDB\BSON\Binary serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(6) "foobar" ["type"]=> int(0) } string(77) "C:19:"MongoDB\BSON\Binary":45:{a:2:{s:4:"data";s:6:"foobar";s:4:"type";i:0;}}" object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(6) "foobar" ["type"]=> int(0) } object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(0) "" ["type"]=> int(0) } string(71) "C:19:"MongoDB\BSON\Binary":39:{a:2:{s:4:"data";s:0:"";s:4:"type";i:0;}}" object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(0) "" ["type"]=> int(0) } object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(4) "%sfoo" ["type"]=> int(0) } string(75) "C:19:"MongoDB\BSON\Binary":43:{a:2:{s:4:"data";s:4:"%sfoo";s:4:"type";i:0;}}" object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(4) "%sfoo" ["type"]=> int(0) } object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%s" ["type"]=> int(4) } string(88) "C:19:"MongoDB\BSON\Binary":56:{a:2:{s:4:"data";s:16:"%s";s:4:"type";i:4;}}" object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%s" ["type"]=> int(4) } object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%s" ["type"]=> int(5) } string(88) "C:19:"MongoDB\BSON\Binary":56:{a:2:{s:4:"data";s:16:"%s";s:4:"type";i:5;}}" object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%s" ["type"]=> int(5) } ===DONE=== PK.h]yyo!tests/decimal128-3-valid-269.phptnu[--TEST-- Decimal128: [basx167] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006400000000000000000000000000523000 {"d":{"$numberDecimal":"1.00E+11"}} 180000001364006400000000000000000000000000523000 180000001364006400000000000000000000000000523000 ===DONE===PK.h]#`1XXtests/bug1839-001.phptnu[--TEST-- PHPC-1839: Referenced, out-of-scope, non-interned string in typeMap (PHP < 8.1) --SKIPIF-- =', '8.1'); ?> --FILE-- &$rootValue, 'document' => &$documentValue]; return $typemap; } $typemap = createTypemap(); $bson = MongoDB\BSON\fromPhp((object) []); echo "Before:\n"; debug_zval_dump($typemap); MongoDB\BSON\toPHP($bson, $typemap); echo "After:\n"; debug_zval_dump($typemap); ?> ===DONE=== --EXPECT-- Before: array(2) refcount(2){ ["root"]=> string(5) "array" refcount(1) ["document"]=> string(5) "array" refcount(1) } After: array(2) refcount(2){ ["root"]=> string(5) "array" refcount(1) ["document"]=> string(5) "array" refcount(1) } ===DONE=== PK.h]a33!tests/decimal128-2-valid-119.phptnu[--TEST-- Decimal128: [decq721] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004d00000000000000000000000000403000 {"d":{"$numberDecimal":"77"}} 180000001364004d00000000000000000000000000403000 ===DONE===PK.h]!3!tests/decimal128-3-valid-086.phptnu[--TEST-- Decimal128: [basx644] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000463000 {"d":{"$numberDecimal":"0E+3"}} 180000001364000000000000000000000000000000463000 180000001364000000000000000000000000000000463000 ===DONE===PK.h]+g g tests/bug1529-001.phptnu[--TEST-- PHPC-1529: Resetting a client should also reset the keyVaultClient --SKIPIF-- --FILE-- pid = getmypid(); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); $commandName = $event->getCommandName(); $process = $this->pid === getmypid() ? 'Parent' : 'Child'; if ($commandName === 'find' || $commandName === 'getMore') { printf("%s executes %s with batchSize: %d\n", $process, $commandName, $command->batchSize); return; } printf("%s executes %s\n", $process, $commandName); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $keyVaultClient = create_test_manager(URI, [], ['disableClientPersistence' => true]); $autoEncryptionOpts = [ 'keyVaultClient' => $keyVaultClient, 'keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary(str_repeat('0', 96), 0)]], ]; $manager = create_test_manager(URI, [], ['autoEncryption' => $autoEncryptionOpts, 'disableClientPersistence' => true]); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $bulk->insert(['x' => 3]); $keyVaultClient->executeBulkWrite(NS, $bulk); MongoDB\Driver\Monitoring\addSubscriber(new CommandLogger); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $cursor = $keyVaultClient->executeQuery(NS, $query); $childPid = pcntl_fork(); if ($childPid === 0) { /* Executing any operation with the parent's client resets this client as well as * the keyVaultClient. Continuing iteration of the cursor opened on the * keyVaultClient before resetting it should then result in an error due to * the client having been reset. */ $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); echo throws( function () use ($cursor) { iterator_count($cursor); }, MongoDB\Driver\Exception\RuntimeException::class ), "\n"; echo "Child exits\n"; exit; } if ($childPid > 0) { $waitPid = pcntl_waitpid($childPid, $status); if ($waitPid === $childPid) { echo "Parent waited for child to exit\n"; } unset($cursor); } ?> ===DONE=== --EXPECT-- Parent executes find with batchSize: 2 Child executes ping OK: Got MongoDB\Driver\Exception\RuntimeException Cannot advance cursor after client reset Child exits Parent waited for child to exit Parent executes killCursors ===DONE=== PK.h]35tests/bug0672.phptnu[--TEST-- PHPC-672: ObjectId constructor should not modify string argument's memory --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "56925b7330616224d0000001" } string(24) "56925B7330616224D0000001" OK: Got MongoDB\Driver\Exception\InvalidArgumentException string(7) "T123456" ===DONE=== PK.h]1gp6 6 $tests/writeresult-getserver-002.phptnu[--TEST-- MongoDB\Driver\Server: Manager->getServer() returning correct server --SKIPIF-- --FILE-- false]); $doc = array("example" => "document"); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert($doc); $wresult = $manager->executeBulkWrite(NS, $bulk); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert($doc); /* writes go to the primary */ $server = $wresult->getServer(); /* This is the same server */ $server2 = $server->executeBulkWrite(NS, $bulk)->getServer(); /* Both are the primary, e.g. the same server */ var_dump($server == $server2); $rp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY); /* Fetch a secondary */ $server3 = $manager->executeQuery(NS, new MongoDB\Driver\Query(array()), $rp)->getServer(); var_dump($server == $server3); var_dump($server->getPort(), $server3->getPort()); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert($doc); $result = $server3->executeBulkWrite('local.' . COLLECTION_NAME, $bulk); var_dump($result, $result->getServer()->getHost(), $result->getServer()->getPort()); $result = $server3->executeQuery('local.' . COLLECTION_NAME, new MongoDB\Driver\Query(array())); foreach($result as $document) { var_dump($document); } $cmd = new MongoDB\Driver\Command(['drop' => COLLECTION_NAME]); $server3->executeCommand("local", $cmd); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) int(%d) int(%d) object(MongoDB\Driver\WriteResult)#%d (%d) { ["nInserted"]=> int(1) ["nMatched"]=> int(0) ["nModified"]=> int(0) ["nRemoved"]=> int(0) ["nUpserted"]=> int(0) ["upsertedIds"]=> array(0) { } ["writeErrors"]=> array(0) { } ["writeConcernError"]=> NULL ["writeConcern"]=> object(MongoDB\Driver\WriteConcern)#%d (%d) { } } string(%d) "%s" int(%d) object(stdClass)#%d (2) { ["_id"]=> object(%s\ObjectId)#%d (1) { ["oid"]=> string(24) "%s" } ["example"]=> string(8) "document" } ===DONE=== PK.h]e&tests/decimal128-7-parseError-079.phptnu[--TEST-- Decimal128: [basx523] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]aRTTtests/bug1839-004.phptnu[--TEST-- PHPC-1839: Referenced, local, interned string in typeMap (PHP < 8.1) --SKIPIF-- =', '8.1'); ?> --FILE-- &$rootValue, 'document' => &$documentValue]; $bson = MongoDB\BSON\fromPhp((object) []); echo "Before:\n"; debug_zval_dump($typemap); MongoDB\BSON\toPHP($bson, $typemap); echo "After:\n"; debug_zval_dump($typemap); ?> ===DONE=== --EXPECT-- Before: array(2) refcount(2){ ["root"]=> &string(5) "array" refcount(1) ["document"]=> &string(5) "array" refcount(1) } After: array(2) refcount(2){ ["root"]=> &string(5) "array" refcount(1) ["document"]=> &string(5) "array" refcount(1) } ===DONE=== PK.h]c\\tests/typemap-007.phptnu[--TEST-- MongoDB\Driver\Cursor::setTypeMap(): Setting fieldPath typemaps for compound types with wildcard keys (nested) --SKIPIF-- --FILE-- 1, 'object' => [ 'parent1' => [ 'child1' => [ 1, 2, 3 ], 'child2' => [ 4, 5, 6 ], ], 'parent2' => [ 'child1' => [ 7, 8, 9 ], 'child2' => [ 10, 11, 12 ], ], ], ]; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert($document); $manager->executeBulkWrite(NS, $bulk); function fetch($manager, $typemap = []) { $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); if ($typemap) { $cursor->setTypeMap($typemap); } $documents = $cursor->toArray(); return $documents; } echo "\nSetting 'object.$.child1' path to 'MyWildcardArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'object.$.child1' => "MyWildcardArrayObject" ]]); var_dump($documents[0]->object->parent1 instanceof stdClass); var_dump($documents[0]->object->parent1->child1 instanceof MyWildcardArrayObject); var_dump(is_array($documents[0]->object->parent1->child2)); var_dump($documents[0]->object->parent2 instanceof stdClass); var_dump($documents[0]->object->parent2->child1 instanceof MyWildcardArrayObject); var_dump(is_array($documents[0]->object->parent2->child2)); echo "\nSetting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.parent2.child1' to 'MyArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'object.parent1.$' => "MyWildcardArrayObject", 'object.parent2.child1' => "MyArrayObject", ]]); var_dump($documents[0]->object->parent1 instanceof stdClass); var_dump($documents[0]->object->parent1->child1 instanceof MyWildcardArrayObject); var_dump($documents[0]->object->parent1->child2 instanceof MyWildcardArrayObject); var_dump($documents[0]->object->parent2 instanceof stdClass); var_dump($documents[0]->object->parent2->child1 instanceof MyArrayObject); var_dump(is_array($documents[0]->object->parent2->child2)); echo "\nSetting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.$.$' to 'MyArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'object.parent1.$' => "MyWildcardArrayObject", 'object.$.$' => "MyArrayObject", ]]); var_dump($documents[0]->object->parent1 instanceof stdClass); var_dump($documents[0]->object->parent1->child1 instanceof MyWildcardArrayObject); var_dump($documents[0]->object->parent1->child2 instanceof MyWildcardArrayObject); var_dump($documents[0]->object->parent2 instanceof stdClass); var_dump($documents[0]->object->parent2->child1 instanceof MyArrayObject); var_dump($documents[0]->object->parent2->child2 instanceof MyArrayObject); echo "\nSetting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.$.child2' to 'MyArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'object.parent1.child1' => "MyWildcardArrayObject", 'object.$.child2' => "MyArrayObject", ]]); var_dump($documents[0]->object->parent1 instanceof stdClass); var_dump($documents[0]->object->parent1->child1 instanceof MyWildcardArrayObject); var_dump($documents[0]->object->parent1->child2 instanceof MyArrayObject); var_dump($documents[0]->object->parent2 instanceof stdClass); var_dump(is_array($documents[0]->object->parent2->child1)); var_dump($documents[0]->object->parent2->child2 instanceof MyArrayObject); echo "\nSetting 'object.parent1.child2 path to 'MyArrayObject' and 'object.$.$' to 'MyWildcardArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'object.parent1.child2' => "MyArrayObject", 'object.$.$' => "MyWildcardArrayObject", ]]); var_dump($documents[0]->object->parent1 instanceof stdClass); var_dump($documents[0]->object->parent1->child1 instanceof MyWildcardArrayObject); var_dump($documents[0]->object->parent1->child2 instanceof MyArrayObject); var_dump($documents[0]->object->parent2 instanceof stdClass); var_dump($documents[0]->object->parent2->child1 instanceof MyWildcardArrayObject); var_dump($documents[0]->object->parent2->child2 instanceof MyWildcardArrayObject); ?> ===DONE=== --EXPECT-- Setting 'object.$.child1' path to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.parent2.child1' to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.$.$' to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.$' path to 'MyWildcardArrayObject' and 'object.$.child2' to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.child2 path to 'MyArrayObject' and 'object.$.$' to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]hJ&tests/decimal128-6-parseError-022.phptnu[--TEST-- Decimal128: Invalid --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]^  $tests/commandSucceededEvent-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandSucceededEvent --SKIPIF-- --FILE-- getCommandName(), "\n"; } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { echo "succeeded: ", $event->getCommandName(), "\n"; echo "- getReply() returns an object: ", is_object( $event->getReply() ) ? 'yes' : 'no', "\n"; echo "- getReply() returns a stdClass object: ", $event->getReply() instanceof stdClass ? 'yes' : 'no', "\n"; echo "- getDurationMicros() returns an integer: ", is_integer( $event->getDurationMicros() ) ? 'yes' : 'no', "\n"; echo "- getDurationMicros() returns > 0: ", $event->getDurationMicros() > 0 ? 'yes' : 'no', "\n"; echo "- getCommandName() returns a string: ", is_string( $event->getCommandName() ) ? 'yes' : 'no', "\n"; echo "- getCommandName() returns '", $event->getCommandName(), "'\n"; echo "- getServer() returns an object: ", is_object( $event->getServer() ) ? 'yes' : 'no', "\n"; echo "- getServer() returns a Server object: ", $event->getServer() instanceof MongoDB\Driver\Server ? 'yes' : 'no', "\n"; echo "- getOperationId() returns a string: ", is_string( $event->getOperationId() ) ? 'yes' : 'no', "\n"; echo "- getRequestId() returns a string: ", is_string( $event->getRequestId() ) ? 'yes' : 'no', "\n"; } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $query = new MongoDB\Driver\Query( [] ); $subscriber = new MySubscriber; MongoDB\Driver\Monitoring\addSubscriber( $subscriber ); $cursor = $m->executeQuery( "demo.test", $query ); ?> --EXPECT-- started: find succeeded: find - getReply() returns an object: yes - getReply() returns a stdClass object: yes - getDurationMicros() returns an integer: yes - getDurationMicros() returns > 0: yes - getCommandName() returns a string: yes - getCommandName() returns 'find' - getServer() returns an object: yes - getServer() returns a Server object: yes - getOperationId() returns a string: yes - getRequestId() returns a string: yes PK.h]\KKtests/exception-001.phptnu[--TEST-- MongoDB\Driver\Exception\Exception extends Throwable --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]69PP*tests/ini-mock_service_id-ini_get-002.phptnu[--TEST-- ini_get() reports mongodb.mock_service_id (master and local) --INI-- mongodb.mock_service_id=1 --FILE-- ===DONE=== --EXPECT-- string(1) "1" string(1) "0" ===DONE=== PK.h]K|H[[-tests/bson-utcdatetime-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime::jsonSerialize() return value --FILE-- jsonSerialize()); ?> ===DONE=== --EXPECT-- array(1) { ["$date"]=> array(1) { ["$numberLong"]=> string(13) "1476192866817" } } ===DONE=== PK.h]1#tests/bson-minkeyinterface-001.phptnu[--TEST-- MongoDB\BSON\MinKeyInterface is implemented by MongoDB\BSON\MinKey --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]AP P !tests/bson-fromPHP_error-007.phptnu[--TEST-- MongoDB\BSON\fromPHP(): Serializable returns document with null bytes in field name --FILE-- data = $data; } public function bsonSerialize() { return $this->data; } } echo "\nTesting array with one leading null byte in field name\n"; echo throws(function() { fromPHP(new MySerializable(["\0" => 1])); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting array with one trailing null byte in field name\n"; echo throws(function() { fromPHP(new MySerializable(["a\0" => 1])); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting array with multiple null bytes in field name\n"; echo throws(function() { fromPHP(new MySerializable(["\0\0\0" => 1])); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; /* Per PHPC-884, field names with a leading null byte are ignored when encoding * a document from an object's property hash table, since PHP uses leading bytes * to denote protected and private properties. However, in this case the object * was returned from Serializable::bsonSerialize() and we skip the check for * protected and private properties. */ echo "\nTesting object with one leading null byte in field name\n"; echo throws(function() { fromPHP(new MySerializable((object) ["\0" => 1])); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting object with one trailing null byte in field name\n"; echo throws(function() { fromPHP(new MySerializable((object) ["a\0" => 1])); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; echo "\nTesting object with multiple null bytes in field name\n"; echo throws(function() { fromPHP(new MySerializable((object) ["\0\0\0" => 1])); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECT-- Testing array with one leading null byte in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". Testing array with one trailing null byte in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "a". Testing array with multiple null bytes in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". Testing object with one leading null byte in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". Testing object with one trailing null byte in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "a". Testing object with multiple null bytes in field name OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". ===DONE=== PK.h]QAc!tests/decimal128-3-valid-066.phptnu[--TEST-- Decimal128: [basx638] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000004c3000 {"d":{"$numberDecimal":"0E+6"}} 1800000013640000000000000000000000000000004c3000 1800000013640000000000000000000000000000004c3000 ===DONE===PK.h]!. . tests/write-0001.phptnu[--TEST-- MongoDB\Driver\BulkWrite: #001 Variety Bulk --SKIPIF-- --FILE-- insert(array("my" => "value")); $bulk->insert(array("my" => "value", "foo" => "bar")); $bulk->insert(array("my" => "value", "foo" => "bar")); var_dump($bulk); $bulk->delete(array("my" => "value", "foo" => "bar"), array("limit" => 1)); var_dump($bulk); $bulk->update(array("foo" => "bar"), array('$set' => array("foo" => "baz")), array("limit" => 1, "upsert" => 0)); var_dump($bulk); $retval = $manager->executeBulkWrite(NS, $bulk); var_dump($bulk); printf("Inserted: %d\n", getInsertCount($retval)); printf("Deleted: %d\n", getDeletedCount($retval)); printf("Updated: %d\n", getModifiedCount($retval)); printf("Upserted: %d\n", getUpsertedCount($retval)); foreach(getWriteErrors($retval) as $error) { printf("WriteErrors: %", $error); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> NULL ["collection"]=> NULL ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(false) ["server_id"]=> int(0) ["session"]=> NULL ["write_concern"]=> NULL } object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> NULL ["collection"]=> NULL ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(false) ["server_id"]=> int(0) ["session"]=> NULL ["write_concern"]=> NULL } object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> NULL ["collection"]=> NULL ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(false) ["server_id"]=> int(0) ["session"]=> NULL ["write_concern"]=> NULL } object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> NULL ["collection"]=> NULL ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(false) ["server_id"]=> int(0) ["session"]=> NULL ["write_concern"]=> NULL } object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(15) "bulk_write_0001" ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(true) ["server_id"]=> int(%r[1-9]\d*%r) ["session"]=> NULL ["write_concern"]=> NULL } Inserted: 3 Deleted: 1 Updated: 1 Upserted: 0 ===DONE=== PK.h]ptests/bug0146-001.phptnu[--TEST-- PHPC-146: ReadPreference primaryPreferred and secondary swapped (OP_QUERY) --SKIPIF-- =', '3.1'); ?> --FILE-- insert(array('my' => 'document')); $manager->executeBulkWrite(NS, $bulk); $rps = array( MongoDB\Driver\ReadPreference::RP_PRIMARY, MongoDB\Driver\ReadPreference::RP_PRIMARY_PREFERRED, MongoDB\Driver\ReadPreference::RP_SECONDARY, MongoDB\Driver\ReadPreference::RP_SECONDARY_PREFERRED, MongoDB\Driver\ReadPreference::RP_NEAREST, ); foreach($rps as $r) { $rp = new MongoDB\Driver\ReadPreference($r); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array("my" => "query")), $rp); var_dump($cursor); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(26) "readPreference_bug0146_001" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["my"]=> string(5) "query" } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } ["session"]=> NULL ["isDead"]=> bool(true) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(26) "readPreference_bug0146_001" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["my"]=> string(5) "query" } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } ["session"]=> NULL ["isDead"]=> bool(true) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(26) "readPreference_bug0146_001" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["my"]=> string(5) "query" } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } ["session"]=> NULL ["isDead"]=> bool(true) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(26) "readPreference_bug0146_001" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["my"]=> string(5) "query" } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } ["session"]=> NULL ["isDead"]=> bool(true) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(26) "readPreference_bug0146_001" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["my"]=> string(5) "query" } ["options"]=> object(stdClass)#%d (%d) { } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "nearest" } ["session"]=> NULL ["isDead"]=> bool(true) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } ===DONE=== PK.h]k#tests/manager-invalidnamespace.phptnu[--TEST-- MongoDB\Driver\Manager: Invalid namespace --SKIPIF-- --FILE-- insert(array("my" => "value")); echo throws(function() use($manager, $bulk) { $manager->executeBulkWrite("database", $bulk); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() use($manager) { $manager->executeQuery("database", new MongoDB\Driver\Query(array("document "=> 1))); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Invalid namespace provided: database OK: Got MongoDB\Driver\Exception\InvalidArgumentException Invalid namespace provided: database ===DONE=== PK.h].k`@/tests/server-executeWriteCommand_error-001.phptnu[--TEST-- MongoDB\Driver\Server::executeWriteCommand() with invalid options --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY)); $command = new MongoDB\Driver\Command([]); echo throws(function() use ($server, $command) { $server->executeWriteCommand(DATABASE_NAME, $command, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeWriteCommand(DATABASE_NAME, $command, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeWriteCommand(DATABASE_NAME, $command, ['writeConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeWriteCommand(DATABASE_NAME, $command, ['writeConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given ===DONE=== PK.h](C$tests/server-executeCommand-010.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() does not inherit read or write concern --SKIPIF-- --FILE-- 'local', 'w' => 2, 'wtimeoutms' => 1000]); $server = $manager->selectServer(new MongoDB\Driver\ReadPreference('primary')); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$group' => ['_id' => 1]], ['$out' => COLLECTION_NAME . '.out'], ], 'cursor' => (object) [], ]); (new CommandObserver)->observe( function() use ($server, $command) { $server->executeCommand(DATABASE_NAME, $command); $server->executeCommand(DATABASE_NAME, $command, [ 'readConcern' => new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE), 'writeConcern' => new MongoDB\Driver\WriteConcern(1), ]); }, function(stdClass $command) { echo json_encode($command->readConcern ?? null), "\n"; echo json_encode($command->writeConcern ?? null), "\n"; } ); ?> ===DONE=== --EXPECT-- null null {"level":"available"} {"w":1} ===DONE=== PK.h]J!tests/decimal128-2-valid-018.phptnu[--TEST-- Decimal128: [decq131] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000807f1bcf85b27059c8a43cfedf00 {"d":{"$numberDecimal":"-1.230000000000000000000000000000000E+6144"}} 18000000136400000000807f1bcf85b27059c8a43cfedf00 ===DONE===PK.h]-tests/session-startTransaction_error-005.phptnu[--TEST-- MongoDB\Driver\Session::startTransaction() with wrong argument for options array (PHP 8) --SKIPIF-- --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 %SMongoDB\Driver\Session::startTransaction()%sarray, int given OK: Got TypeError %SMongoDB\Driver\Session::startTransaction()%sarray, %r(object|stdClass)%r given ===DONE=== PK.h]E  +tests/writeresult-getmodifiedcount-002.phptnu[--TEST-- MongoDB\Driver\WriteResult::getModifiedCount() with unacknowledged write --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(0)); var_dump($result->getModifiedCount()); ?> ===DONE=== --EXPECT-- NULL ===DONE=== PK.h]޽'#tests/bson-dbpointer-clone-001.phptnu[--TEST-- MongoDB\BSON\DBPointer can be cloned --FILE-- dbref; $dbPointer->foo = 'bar'; $clone = clone($dbPointer); var_dump($clone == $dbPointer); var_dump($clone === $dbPointer); unset($dbPointer); var_dump($clone); var_dump($clone->foo); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) object(MongoDB\BSON\DBPointer)#%d (2) { ["ref"]=> string(11) "phongo.test" ["id"]=> string(24) "5a2e78accd485d55b405ac12" } string(3) "bar" ===DONE=== PK.h]!Ǻtests/string-valid-001.phptnu[--TEST-- String: Empty string --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0d000000026100010000000000 {"a":""} 0d000000026100010000000000 ===DONE===PK.h]gY!tests/decimal128-3-valid-014.phptnu[--TEST-- Decimal128: [basx602] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000303000 {"d":{"$numberDecimal":"0E-8"}} 180000001364000000000000000000000000000000303000 180000001364000000000000000000000000000000303000 ===DONE===PK.h]55!tests/decimal128-5-valid-054.phptnu[--TEST-- Decimal128: [decq639] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000407a10f35a0000000000000000fe5f00 {"d":{"$numberDecimal":"1.00000000000000E+6125"}} 1800000013640000407a10f35a0000000000000000fe5f00 1800000013640000407a10f35a0000000000000000fe5f00 ===DONE===PK.h]'ڃv22tests/int64-valid-005.phptnu[--TEST-- Int64 type: 1 --XFAIL-- PHP encodes integers as 32-bit if range allows --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000126100010000000000000000 {"a":{"$numberLong":"1"}} {"a":1} 10000000126100010000000000000000 {"a":1} ===DONE===PK.h]n-ll!tests/decimal128-2-valid-061.phptnu[--TEST-- Decimal128: [decq628] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000010632d5ec76b050000000000fe5f00 {"d":{"$numberDecimal":"1.00000000000000000000E+6131"}} 18000000136400000010632d5ec76b050000000000fe5f00 ===DONE===PK.h]e$$!tests/decimal128-2-valid-033.phptnu[--TEST-- Decimal128: [decq409] zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 ===DONE===PK.h]%0(tests/serverApi-set_state_error-001.phptnu[--TEST-- MongoDB\Driver\ServerApi::__set_state() requires correct data types and values --FILE-- 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ServerApi::__set_state(['version' => '2']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ServerApi::__set_state(['version' => '1', 'strict' => 'true']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ServerApi::__set_state(['version' => '1', 'deprecationErrors' => 'true']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "version" field to be string OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "version" field to be string OK: Got MongoDB\Driver\Exception\InvalidArgumentException Server API version "2" is not supported in this driver version OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "strict" field to be bool or null OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "deprecationErrors" field to be bool or null ===DONE=== PK.h]N̺,tests/bson-javascript-jsonserialize-003.phptnu[--TEST-- MongoDB\BSON\Javascript::jsonSerialize() with json_encode() (without scope) --FILE-- new MongoDB\BSON\Javascript('function foo(bar) { return bar; }')]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$code" : "function foo(bar) { return bar; }" } } {"foo":{"$code":"function foo(bar) { return bar; }"}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> NULL } } ===DONE=== PK.h]6EE+tests/bson-undefined-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\Undefined::jsonSerialize() return value --FILE-- undefined; var_dump($undefined->jsonSerialize()); ?> ===DONE=== --EXPECT-- array(1) { ["$undefined"]=> bool(true) } ===DONE=== PK.h]:'',tests/transaction-integration_error-002.phptnu[--TEST-- MongoDB\Driver\Session: Setting per-op readConcern in transaction (executeReadCommand) --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); /* Do the transaction */ $session = $manager->startSession(); $session->startTransaction( [ 'readConcern' => new \MongoDB\Driver\ReadConcern( "snapshot" ), 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); echo throws(function() use ($manager, $session) { $cmd = new \MongoDB\Driver\Command( [ 'count' => COLLECTION_NAME, 'query' => [ 'q' => [ 'employee' => 3 ] ] ] ); $manager->executeReadCommand( DATABASE_NAME, $cmd, [ 'session' => $session, 'readConcern' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ) ] ); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot set read concern after starting transaction ===DONE=== PK.h]NVtests/typemap-003.phptnu[--TEST-- MongoDB\Driver\Cursor::setTypeMap(): Setting and replacing typemaps --SKIPIF-- --FILE-- 1, 'array' => [1, 2, 3], 'object' => ['string' => ['sleutels', 'keys'] ] ]; $document2 = [ '_id' => 2, 'array' => [4, 5, 6], 'object' => ['associative' => ['elementen', 'elements' ]] ]; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert($document1); $bulk->insert($document2); $manager->executeBulkWrite(NS, $bulk); $typemap1 = ["fieldPaths" => [ 'object.string' => "MyArrayObject", 'object' => "MyArrayObject", ]]; $typemap2 = ["fieldPaths" => [ 'object.associative' => "MyProperties", 'object' => "MyArrayObject", ]]; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); $cursor->setTypeMap($typemap1); $cursor->setTypeMap($typemap2); $documents = $cursor->toArray(); var_dump($documents[0] instanceof stdClass); var_dump(is_array($documents[0]->array)); var_dump($documents[0]->object instanceof MyArrayObject); var_dump(is_array($documents[0]->object['string'])); var_dump(is_array($documents[0]->object->string)); var_dump($documents[1] instanceof stdClass); var_dump(is_array($documents[1]->array)); var_dump($documents[1]->object instanceof MyArrayObject); var_dump($documents[1]->object['associative'] instanceof MyProperties); var_dump($documents[1]->object->associative instanceof MyProperties); ?> ===DONE=== --EXPECT-- bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]f__!tests/decimal128-3-valid-208.phptnu[--TEST-- Decimal128: [basx007] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640064000000000000000000000000003e3000 {"d":{"$numberDecimal":"10.0"}} 1800000013640064000000000000000000000000003e3000 ===DONE===PK.h]H))!tests/decimal128-5-valid-060.phptnu[--TEST-- Decimal128: [decq651] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000e1f50500000000000000000000fe5f00 {"d":{"$numberDecimal":"1.00000000E+6119"}} 1800000013640000e1f50500000000000000000000fe5f00 1800000013640000e1f50500000000000000000000fe5f00 ===DONE===PK.h])-dd/tests/bson-utcdatetime-set_state_error-002.phptnu[--TEST-- MongoDB\BSON\UTCDateTime::__set_state() requires "milliseconds" string to parse as 64-bit integer --FILE-- '1234.5678']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; /* TODO: Add tests for out-of-range values once CDRIVER-1377 is resolved */ ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "1234.5678" as 64-bit integer for MongoDB\BSON\UTCDateTime initialization ===DONE=== PK.h]}&tests/writeconcernerror-debug-002.phptnu[--TEST-- MongoDB\Driver\WriteConcernError debug output --SKIPIF-- =', '3.1'); ?> --FILE-- insert(['x' => $i, 'y' => str_repeat('a', 4194304)]); } try { $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(2, 1)); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteConcernError()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcernError)#%d (%d) { ["message"]=> string(33) "waiting for replication timed out" ["code"]=> int(64) ["info"]=> object(stdClass)#%d (%d) { ["wtimeout"]=> bool(true) } } ===DONE=== PK.h]K !tests/decimal128-3-valid-017.phptnu[--TEST-- Decimal128: [basx620] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000032b000 {"d":{"$numberDecimal":"-0E-7"}} 18000000136400000000000000000000000000000032b000 18000000136400000000000000000000000000000032b000 ===DONE===PK.h]N (tests/readpreference-ctor_error-007.phptnu[--TEST-- MongoDB\Driver\ReadPreference construction (combining hedge with primary read preference) --FILE-- ['enabled' => true]]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException hedge may not be used with primary mode ===DONE=== PK.h]pu4tests/top-parseError-020.phptnu[--TEST-- Top-level document validity: Bad $binary (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h] ܽtests/symbol-valid-004.phptnu[--TEST-- Symbol: two-byte UTF-8 (é) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000e61000d000000c3a9c3a9c3a9c3a9c3a9c3a90000 {"a":{"$symbol":"\u00e9\u00e9\u00e9\u00e9\u00e9\u00e9"}} 190000000e61000d000000c3a9c3a9c3a9c3a9c3a9c3a90000 ===DONE===PK.h]EٳS #tests/manager-selectserver-001.phptnu[--TEST-- MongoDB\Driver\Manager::selectServer() select a server from SDAM based on ReadPreference --SKIPIF-- --FILE-- false]); $rp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY); $server = $manager->selectServer($rp); $rp2 = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY); $server2 = $manager->selectServer($rp2); // load fixtures for test $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 1, 'x' => 2, 'y' => 3)); $bulk->insert(array('_id' => 2, 'x' => 3, 'y' => 4)); $bulk->insert(array('_id' => 3, 'x' => 4, 'y' => 5)); $server->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query(array('x' => 3), array('projection' => array('y' => 1))); $cursor = $server->executeQuery(NS, $query); var_dump($cursor instanceof MongoDB\Driver\Cursor); var_dump($server == $cursor->getServer()); var_dump(iterator_to_array($cursor)); $query = new MongoDB\Driver\Query(array('x' => 3), array('projection' => array('y' => 1))); $cursor = $server2->executeQuery(NS, $query); var_dump($cursor instanceof MongoDB\Driver\Cursor); var_dump($server2 == $cursor->getServer()); var_dump(iterator_to_array($cursor)); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 1, 'x' => 2, 'y' => 3)); $bulk->insert(array('_id' => 2, 'x' => 3, 'y' => 4)); $bulk->insert(array('_id' => 3, 'x' => 4, 'y' => 5)); throws(function() use($server2, $bulk) { $server2->executeBulkWrite(NS, $bulk); }, "MongoDB\Driver\Exception\BulkWriteException"); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 1, 'x' => 2, 'y' => 3)); $bulk->insert(array('_id' => 2, 'x' => 3, 'y' => 4)); $bulk->insert(array('_id' => 3, 'x' => 4, 'y' => 5)); $result = $server2->executeBulkWrite('local.' . COLLECTION_NAME, $bulk); var_dump($result->getInsertedCount()); ?> ===DONE=== --EXPECTF-- bool(true) bool(true) array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["y"]=> int(4) } } bool(true) bool(true) array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["y"]=> int(4) } } OK: Got MongoDB\Driver\Exception\BulkWriteException int(3) ===DONE=== PK.h]nn2tests/bson-decimal128-serialization_error-003.phptnu[--TEST-- MongoDB\BSON\Decimal128 unserialization requires "dec" string field (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Decimal128 initialization requires "dec" string field ===DONE=== PK.h]drXX!tests/manager-ctor_error-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): too many arguments --SKIPIF-- =', '7.99'); ?> --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Manager::__construct() expects at most 3 %r(argument|parameter)%rs, 4 given ===DONE=== PK.h]1``!tests/decimal128-3-valid-301.phptnu[--TEST-- Decimal128: [basx060] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400185c0ace00000000000000000000383000 {"d":{"$numberDecimal":"345678.5432"}} 18000000136400185c0ace00000000000000000000383000 ===DONE===PK.h]D"!tests/decimal128-3-valid-122.phptnu[--TEST-- Decimal128: [basx154] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000523000 {"d":{"$numberDecimal":"0E+9"}} 180000001364000000000000000000000000000000523000 180000001364000000000000000000000000000000523000 ===DONE===PK.h]LK+tests/writeresult-getmodifiedcount-001.phptnu[--TEST-- MongoDB\Driver\WriteResult::getModifiedCount() with acknowledged write --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk); var_dump($result->getModifiedCount()); ?> ===DONE=== --EXPECT-- int(1) ===DONE=== PK.h]<00!tests/decimal128-3-valid-020.phptnu[--TEST-- Decimal128: [basx605] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000363000 {"d":{"$numberDecimal":"0.00000"}} 180000001364000000000000000000000000000000363000 ===DONE===PK.h]n&tests/decimal128-4-parseError-002.phptnu[--TEST-- Decimal128: [basx565] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] ;,,tests/bson-regex-004.phptnu[--TEST-- MongoDB\BSON\Regex debug handler with flags omitted --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(0) "" } ===DONE=== PK.h]0f'tests/standalone-ssl-no_verify-002.phptnu[--TEST-- Connect to MongoDB with SSL and no host/cert verification (context options) --SKIPIF-- --FILE-- stream_context_create([ 'ssl' => [ 'allow_invalid_hostname' => true, 'allow_self_signed' => true, // "weak_cert_validation" alias ], ]), ]; $manager = create_test_manager(URI, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); printf("ping: %d\n", $cursor->toArray()[0]->ok); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_invalid_hostname" driver option is deprecated. Please use the "tlsAllowInvalidHostnames" URI option instead.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_self_signed" context driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead.%s ping: 1 ===DONE=== PK.h]*$tests/manager-addSubscriber-005.phptnu[--TEST-- MongoDB\Driver\Manager::addSubscriber() subscriber is only notified once (Manager and global) --SKIPIF-- --FILE-- getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { printf("commandSucceeded: %s\n", $event->getCommandName()); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { printf("commandFailed: %s\n", $event->getCommandName()); } } $m = create_test_manager(); $pingCommand = new MongoDB\Driver\Command(['ping' => 1]); $subscriber = new MySubscriber; MongoDB\Driver\Monitoring\addSubscriber($subscriber); $m->addSubscriber($subscriber); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); // Global subscriber is still notified after Manager subscriber is unregistered $m->removeSubscriber($subscriber); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); ?> --EXPECT-- commandStarted: ping commandSucceeded: ping ping: 1 commandStarted: ping commandSucceeded: ping ping: 1 PK.h]g33!tests/decimal128-2-valid-109.phptnu[--TEST-- Decimal128: [decq711] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364003b00000000000000000000000000403000 {"d":{"$numberDecimal":"59"}} 180000001364003b00000000000000000000000000403000 ===DONE===PK.h] oxbb!tests/decimal128-2-valid-149.phptnu[--TEST-- Decimal128: [decq826] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000008000000000000000000000403000 {"d":{"$numberDecimal":"2147483648"}} 180000001364000000008000000000000000000000403000 ===DONE===PK.h] ;tests/oid-valid-001.phptnu[--TEST-- ObjectId: All zeroes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1400000007610000000000000000000000000000 {"a":{"$oid":"000000000000000000000000"}} 1400000007610000000000000000000000000000 ===DONE===PK.h]䈋 ,tests/bson-javascript-serialization-002.phptnu[--TEST-- MongoDB\BSON\Javascript serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- 42]], ['function foo() { return id; }', ['id' => new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4603')]], ]; foreach ($tests as $test) { list($code, $scope) = $test; var_dump($js = new MongoDB\BSON\Javascript($code, $scope)); var_dump($s = serialize($js)); var_dump(unserialize($s)); echo "\n"; } ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> NULL } string(101) "O:23:"MongoDB\BSON\Javascript":2:{s:4:"code";s:33:"function foo(bar) { return bar; }";s:5:"scope";N;}" object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> NULL } object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> object(stdClass)#%d (%d) { } } string(118) "O:23:"MongoDB\BSON\Javascript":2:{s:4:"code";s:33:"function foo(bar) { return bar; }";s:5:"scope";O:8:"stdClass":0:{}}" object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> object(stdClass)#%d (%d) { } } object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(30) "function foo() { return foo; }" ["scope"]=> object(stdClass)#%d (%d) { ["foo"]=> int(42) } } string(130) "O:23:"MongoDB\BSON\Javascript":2:{s:4:"code";s:30:"function foo() { return foo; }";s:5:"scope";O:8:"stdClass":1:{s:3:"foo";i:42;}}" object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(30) "function foo() { return foo; }" ["scope"]=> object(stdClass)#%d (%d) { ["foo"]=> int(42) } } object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(29) "function foo() { return id; }" ["scope"]=> object(stdClass)#%d (%d) { ["id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } } } string(198) "O:23:"MongoDB\BSON\Javascript":2:{s:4:"code";s:29:"function foo() { return id; }";s:5:"scope";O:8:"stdClass":1:{s:2:"id";O:21:"MongoDB\BSON\ObjectId":1:{s:3:"oid";s:24:"53e2a1c40640fd72175d4603";}}}" object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(29) "function foo() { return id; }" ["scope"]=> object(stdClass)#%d (%d) { ["id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } } } ===DONE=== PK.h]p'tests/bson-timestamp-set_state-001.phptnu[--TEST-- MongoDB\BSON\Timestamp::__set_state() --FILE-- $increment, 'timestamp' => $timestamp, ])); echo "\n\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\BSON\Timestamp::__set_state(array( %w'increment' => '1234', %w'timestamp' => '5678', )) MongoDB\BSON\Timestamp::__set_state(array( %w'increment' => '2147483647', %w'timestamp' => '0', )) MongoDB\BSON\Timestamp::__set_state(array( %w'increment' => '0', %w'timestamp' => '2147483647', )) ===DONE=== PK.h]Otests/bson-decode-001.phptnu[--TEST-- BSON encoding: Encoding data into BSON representation, and BSON into Extended JSON --FILE-- "world"), array((object)array("hello" => "world")), array(null), array(123), array(4.125), array(true), array(false), array("string"), array("string", true), array('test', 'foo', 'bar'), array('test' => 'test', 'foo' => 'foo', 'bar' => 'bar'), array('foo' => 'test', 'foo', 'bar'), /* (object)array("hello" => "world"), array(array("hello" => "world")), array(array(1, 2, 3, 4, 5, 6, 7, 8, 9)), array((object)array(1, 2, 3, 4, 5, 6, 7, 8, 9)), array(array("0" => 1, "1" => 2, "2" => 3, "3" => 4, "4" => 5, "5" => 6, "6" => 7, "7" => 8, "8" => 9)), array("int" => 3, "boolean" => true, "array" => array("foo", "bar"), "object" => new stdclass, "string" => "test", 3 => "test"), array(array("string", true)), array(array('test', 'foo', 'bar')), array(array('test' => 'test', 'foo' => 'foo', 'bar' => 'bar')), array(array('foo' => 'test', 'foo', 'bar')), array(array("int" => 3, "boolean" => true, "array" => array("foo", "bar"), "object" => new stdclass, "string" => "test", 3 => "test")), */ ); foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", toJSON($s), "\n"; $val = toPHP($s); if ($val == (object) $test) { echo "OK\n"; } else { var_dump($val, $test); } } ?> ===DONE=== --EXPECT-- Test#0 { "hello" : "world" } OK Test#1 { "0" : { "hello" : "world" } } OK Test#2 { "0" : null } OK Test#3 { "0" : 123 } OK Test#4 { "0" : 4.125 } OK Test#5 { "0" : true } OK Test#6 { "0" : false } OK Test#7 { "0" : "string" } OK Test#8 { "0" : "string", "1" : true } OK Test#9 { "0" : "test", "1" : "foo", "2" : "bar" } OK Test#10 { "test" : "test", "foo" : "foo", "bar" : "bar" } OK Test#11 { "foo" : "test", "0" : "foo", "1" : "bar" } OK ===DONE=== PK.h]]44!tests/decimal128-3-valid-001.phptnu[--TEST-- Decimal128: [basx066] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400185c0ace0000000000000000000038b000 {"d":{"$numberDecimal":"-345678.5432"}} 18000000136400185c0ace0000000000000000000038b000 18000000136400185c0ace0000000000000000000038b000 ===DONE===PK.h]C*tests/writeresult-getmatchedcount-001.phptnu[--TEST-- MongoDB\Driver\WriteResult::getMatchedCount() --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk); var_dump($result->getMatchedCount()); ?> ===DONE=== --EXPECT-- int(1) ===DONE=== PK.h]w* tests/command-aggregate-001.phptnu[--TEST-- DRIVERS-289: Test iteration on live command cursor with empty first batch --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ [ '$match' => [ '_id' => [ '$gt' => 1 ]]], ], 'cursor' => ['batchSize' => 0], ]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- array(2) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(2) } [1]=> object(stdClass)#%d (%d) { ["_id"]=> int(3) } } ===DONE=== PK.h]Ʈ<<&tests/transaction-integration-003.phptnu[--TEST-- MongoDB\Driver\Session::startTransaction() Transient Error Test --SKIPIF-- --FILE-- COLLECTION_NAME, ]); $manager->executeCommand(DATABASE_NAME, $cmd); /* Insert Data */ $bw = new \MongoDB\Driver\BulkWrite(); $bw->insert( [ '_id' => 0, 'msg' => 'Initial Value' ] ); $manager->executeBulkWrite(NS, $bw); /* First 'thread', try to update document, but don't close transaction */ $sessionA = $manager->startSession(); $sessionA->startTransaction( [ 'readConcern' => new \MongoDB\Driver\ReadConcern( "snapshot" ), 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $bw = new \MongoDB\Driver\BulkWrite(); $bw->update( [ '_id' => 0 ], [ '$set' => [ 'msg' => 'Update from session A' ] ] ); $manager->executeBulkWrite(NS, $bw, ['session' => $sessionA]); /* Second 'thread', try to update the same document, should trigger exception. In handler, commit * first settion, verify result, and redo this transaction. */ $sessionB = $manager->startSession(); $sessionB->startTransaction( [ 'readConcern' => new \MongoDB\Driver\ReadConcern( "snapshot" ), 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); try { $bw = new \MongoDB\Driver\BulkWrite(); $bw->update( [ '_id' => 0 ], [ '$set' => [ 'msg' => 'Update from session B' ] ] ); $manager->executeBulkWrite(NS, $bw, ['session' => $sessionB]); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { echo $e->hasErrorLabel('TransientTransactionError') ? "found a TransientTransactionError" : "did NOT get a TransientTransactionError", "\n"; } ?> ===DONE=== --EXPECTF-- found a TransientTransactionError ===DONE=== PK.h]tww!tests/decimal128-3-valid-129.phptnu[--TEST-- Decimal128: [basx034] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640015cd5b0700000000000000000000243000 {"d":{"$numberDecimal":"0.00000123456789"}} 1800000013640015cd5b0700000000000000000000243000 ===DONE===PK.h]I!tests/decimal128-3-valid-296.phptnu[--TEST-- Decimal128: [basx240] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000463000 {"d":{"$numberDecimal":"1.265E+6"}} 18000000136400f104000000000000000000000000463000 18000000136400f104000000000000000000000000463000 ===DONE===PK.h]4T(tests/bson-maxkey-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\MaxKey::jsonSerialize() with json_encode() --FILE-- new MongoDB\BSON\MaxKey]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$maxKey" : 1 } } {"foo":{"$maxKey":1}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\MaxKey)#%d (%d) { } } ===DONE=== PK.h]2Y!tests/decimal128-3-valid-218.phptnu[--TEST-- Decimal128: [basx349] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000283000 {"d":{"$numberDecimal":"1.0E-11"}} 180000001364000a00000000000000000000000000283000 180000001364000a00000000000000000000000000283000 ===DONE===PK.h])tests/code-valid-001.phptnu[--TEST-- Javascript Code: Empty string --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0d0000000d6100010000000000 {"a":{"$code":""}} 0d0000000d6100010000000000 ===DONE===PK.h] Ztests/bug1274-004.phptnu[--TEST-- PHPC-1274: Session destruct should not abort transaction from parent process (disableClientPersistence=true) --SKIPIF-- --FILE-- true]); /* Create collections as that can't be (automatically) done in a transaction */ $manager->executeCommand( DATABASE_NAME, new MongoDB\Driver\Command(['create' => COLLECTION_NAME]), ['writeConcern' => new MongoDB\Driver\WriteConcern('majority')] ); $session = $manager->startSession(); $session->startTransaction(['writeConcern' => new MongoDB\Driver\WriteConcern('majority')]); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $result = $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); printf("Parent inserted %d documents\n", $result->getInsertedCount()); $childPid = pcntl_fork(); if ($childPid === 0) { echo "Child exits\n"; exit; } if ($childPid > 0) { $waitPid = pcntl_waitpid($childPid, $status); if ($waitPid === $childPid) { echo "Parent waited for child to exit\n"; } $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 3]); $bulk->insert(['x' => 4]); $result = $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); printf("Parent inserted %d documents\n", $result->getInsertedCount()); $session->commitTransaction(); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); printf("Parent fully iterated cursor for %d documents\n", iterator_count($cursor)); } ?> ===DONE=== --EXPECT-- Parent inserted 2 documents Child exits Parent waited for child to exit Parent inserted 2 documents Parent fully iterated cursor for 4 documents ===DONE=== PK.h]_tests/manager-debug-002.phptnu[--TEST-- MongoDB\Driver\Manager: mongodb.debug=stderr (connection string and version) --INI-- mongodb.debug=stderr --FILE-- ===DONE=== --EXPECTF-- %A[%s] PHONGO: DEBUG > Connection string: '%s' [%s] PHONGO: DEBUG > Creating Manager, phongo-1.%d.%d%S[%s] - mongoc-1.%s(%s), libbson-1.%s(%s), php-%s %A===DONE===%A PK.h]?]]tests/double-valid-011.phptnu[--TEST-- Double type: Inf --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000016400000000000000f07f00 {"d":{"$numberDouble":"Infinity"}} {"d":{"$numberDouble":"Infinity"}} 10000000016400000000000000f07f00 {"d":{"$numberDouble":"Infinity"}} ===DONE===PK.h]Xtests/manager-ctor-008.phptnu[--TEST-- MongoDB\Driver\Manager::__construct() does not canonicalise options --FILE-- ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s %A [%s] PHONGO: DEBUG > Created client with hash: %s %A ===DONE=== PK.h]1!tests/decimal128-3-valid-035.phptnu[--TEST-- Decimal128: [basx131] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000363000 {"d":{"$numberDecimal":"0.00000"}} 180000001364000000000000000000000000000000363000 180000001364000000000000000000000000000000363000 ===DONE===PK.h]uk&tests/decimal128-7-parseError-073.phptnu[--TEST-- Decimal128: [basx537] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]) )tests/manager-executeQuery_error-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeQuery() with invalid options --FILE-- 3], ['projection' => ['y' => 1]]); echo throws(function() use ($manager, $query) { $manager->executeQuery(NS, $query, ['readPreference' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $query) { $manager->executeQuery(NS, $query, ['readPreference' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $query) { $manager->executeQuery(NS, $query, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $query) { $manager->executeQuery(NS, $query, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given ===DONE=== PK.h]tests/oid-valid-003.phptnu[--TEST-- ObjectId: Random --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1400000007610056e1fc72e0c917e9c471416100 {"a":{"$oid":"56e1fc72e0c917e9c4714161"}} 1400000007610056e1fc72e0c917e9c471416100 ===DONE===PK.h]p&tests/decimal128-4-parseError-004.phptnu[--TEST-- Decimal128: [basx567] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]MBL3tests/bson-utcdatetime-serialization_error-004.phptnu[--TEST-- MongoDB\BSON\UTCDateTime unserialization requires "milliseconds" string to parse as 64-bit integer (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "1234.5678" as 64-bit integer for MongoDB\BSON\UTCDateTime initialization ===DONE=== PK.h]&tests/decimal128-4-parseError-009.phptnu[--TEST-- Decimal128: [dqbas939] overflow results at different rounding modes (Overflow & Inexact & Rounded) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]F{!tests/decimal128-3-valid-166.phptnu[--TEST-- Decimal128: [basx177] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003a3000 {"d":{"$numberDecimal":"1.265"}} 18000000136400f1040000000000000000000000003a3000 18000000136400f1040000000000000000000000003a3000 ===DONE===PK.h]Y/ /tests/manager-executeReadCommand_error-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeReadCommand() with invalid options --SKIPIF-- --FILE-- 1]); echo throws(function() use ($manager, $command) { $manager->executeReadCommand(DATABASE_NAME, $command, ['readConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeReadCommand(DATABASE_NAME, $command, ['readConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeReadCommand(DATABASE_NAME, $command, ['readPreference' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeReadCommand(DATABASE_NAME, $command, ['readPreference' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeReadCommand(DATABASE_NAME, $command, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeReadCommand(DATABASE_NAME, $command, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given ===DONE=== PK.h])tests/bson-toCanonicalJSON_error-001.phptnu[--TEST-- MongoDB\BSON\toCanonicalExtendedJSON(): BSON decoding exceptions --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader OK: Got MongoDB\Driver\Exception\UnexpectedValueException Reading document did not exhaust input buffer ===DONE=== PK.h]G4W-tests/bson-int64-serialization_error-001.phptnu[--TEST-- MongoDB\BSON\Int64 unserialization requires "int" string field (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Int64 initialization requires "integer" string field ===DONE=== PK.h]S@,,tests/session-002.phptnu[--TEST-- MongoDB\Driver\Session spec test: $clusterTime in commands --SKIPIF-- --FILE-- lastSeenClusterTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [], 'cursor' => new stdClass(), ]); $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['session' => $session]); $manager->executeReadWriteCommand(DATABASE_NAME, $command, ['session' => $session]); printf("Session reports last seen \$clusterTime: %s\n", ($session->getClusterTime() == $this->lastSeenClusterTime) ? 'yes' : 'no'); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function find() { $this->lastSeenClusterTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); $manager->executeQuery(NS, $query, ['session' => $session]); printf("Session reports last seen \$clusterTime: %s\n", ($session->getClusterTime() == $this->lastSeenClusterTime) ? 'yes' : 'no'); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function insert() { $this->lastSeenClusterTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 2]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); printf("Session reports last seen \$clusterTime: %s\n", ($session->getClusterTime() == $this->lastSeenClusterTime) ? 'yes' : 'no'); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function ping() { $this->lastSeenClusterTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); printf("Session reports last seen \$clusterTime: %s\n", ($session->getClusterTime() == $this->lastSeenClusterTime) ? 'yes' : 'no'); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); $hasClusterTime = isset($command->{'$clusterTime'}); printf("%s command includes \$clusterTime: %s\n", $event->getCommandName(), $hasClusterTime ? 'yes' : 'no'); if ($hasClusterTime && $this->lastSeenClusterTime !== null) { printf("%s command uses last seen \$clusterTime: %s\n", $event->getCommandName(), ($command->{'$clusterTime'} == $this->lastSeenClusterTime) ? 'yes' : 'no'); } } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { $reply = $event->getReply(); $hasClusterTime = isset($reply->{'$clusterTime'}); printf("%s command reply includes \$clusterTime: %s\n", $event->getCommandName(), $hasClusterTime ? 'yes' : 'no'); if ($hasClusterTime) { $this->lastSeenClusterTime = $reply->{'$clusterTime'}; } } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } echo "\nTesting aggregate command\n"; (new Test)->aggregate(); echo "\nTesting find command\n"; (new Test)->find(); echo "\nTesting insert command\n"; (new Test)->insert(); echo "\nTesting ping command\n"; (new Test)->ping(); ?> ===DONE=== --EXPECT-- Testing aggregate command aggregate command includes $clusterTime: yes aggregate command reply includes $clusterTime: yes aggregate command includes $clusterTime: yes aggregate command uses last seen $clusterTime: yes aggregate command reply includes $clusterTime: yes Session reports last seen $clusterTime: yes Testing find command find command includes $clusterTime: yes find command reply includes $clusterTime: yes find command includes $clusterTime: yes find command uses last seen $clusterTime: yes find command reply includes $clusterTime: yes Session reports last seen $clusterTime: yes Testing insert command insert command includes $clusterTime: yes insert command reply includes $clusterTime: yes insert command includes $clusterTime: yes insert command uses last seen $clusterTime: yes insert command reply includes $clusterTime: yes Session reports last seen $clusterTime: yes Testing ping command ping command includes $clusterTime: yes ping command reply includes $clusterTime: yes ping command includes $clusterTime: yes ping command uses last seen $clusterTime: yes ping command reply includes $clusterTime: yes Session reports last seen $clusterTime: yes ===DONE=== PK.h])tests/bson-toCanonicalJSON_error-003.phptnu[--TEST-- MongoDB\BSON\toCanonicalExtendedJSON(): BSON decoding exceptions for bson_as_canonical_json() failure --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not convert BSON document to a JSON string OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not convert BSON document to a JSON string OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not convert BSON document to a JSON string ===DONE=== PK.h]'++*tests/manager-executeWriteCommand-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeWriteCommand() --SKIPIF-- --FILE-- insert(['a' => 1]); $manager->executeBulkWrite(NS, $bw); (new CommandObserver)->observe( function() use ($manager) { $command = new MongoDB\Driver\Command([ 'drop' => COLLECTION_NAME, ]); $manager->executeWriteCommand( DATABASE_NAME, $command, [ 'writeConcern' => new \MongoDB\Driver\WriteConcern(\MongoDB\Driver\WriteConcern::MAJORITY), ] ); }, function(stdClass $command) { echo "Write Concern: ", $command->writeConcern->w, "\n"; } ); ?> ===DONE=== --EXPECTF-- Write Concern: majority ===DONE=== PK.h]n"tests/serverApi-set_state-001.phptnu[--TEST-- MongoDB\Driver\ServerApi::__set_state() --FILE-- '1'], ['version' => '1', 'strict' => true], ['version' => '1', 'deprecationErrors' => true], ['version' => '1', 'strict' => false, 'deprecationErrors' => false], ['version' => '1', 'strict' => null, 'deprecationErrors' => null], ]; foreach ($tests as $fields) { var_export(MongoDB\Driver\ServerApi::__set_state($fields)); echo "\n\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\Driver\ServerApi::__set_state(array( 'version' => '1', 'strict' => NULL, 'deprecationErrors' => NULL, )) MongoDB\Driver\ServerApi::__set_state(array( 'version' => '1', 'strict' => true, 'deprecationErrors' => NULL, )) MongoDB\Driver\ServerApi::__set_state(array( 'version' => '1', 'strict' => NULL, 'deprecationErrors' => true, )) MongoDB\Driver\ServerApi::__set_state(array( 'version' => '1', 'strict' => false, 'deprecationErrors' => false, )) MongoDB\Driver\ServerApi::__set_state(array( 'version' => '1', 'strict' => NULL, 'deprecationErrors' => NULL, )) ===DONE=== PK.h]I3tests/manager-createClientEncryption-error-001.phptnu[--TEST-- MongoDB\Driver\Manager::createClientEncryption() fails if compiled without FLE --SKIPIF-- --FILE-- createClientEncryption([]); }, MongoDB\Driver\Exception\RuntimeException::class), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\RuntimeException Cannot configure clientEncryption object. Please recompile with support for libmongocrypt using the with-mongodb-client-side-encryption configure switch. ===DONE=== PK.h]TcYY!tests/decimal128-3-valid-153.phptnu[--TEST-- Decimal128: [basx002] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000403000 {"d":{"$numberDecimal":"1"}} 180000001364000100000000000000000000000000403000 ===DONE===PK.h]Fv;22!tests/decimal128-5-valid-009.phptnu[--TEST-- Decimal128: [decq083] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000000000 {"d":{"$numberDecimal":"1E-6176"}} 180000001364000100000000000000000000000000000000 180000001364000100000000000000000000000000000000 ===DONE===PK.h] tests/binary-parseError-001.phptnu[--TEST-- Binary type: $uuid wrong type --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]ތ鰓&tests/bson-javascript-compare-002.phptnu[--TEST-- MongoDB\BSON\Javascript comparisons (with scope) --FILE-- 1]) == new MongoDB\BSON\Javascript('function() { return 1; }', ['x' => 1])); var_dump(new MongoDB\BSON\Javascript('function() { return 1; }', ['x' => 1]) == new MongoDB\BSON\Javascript('function() { return 1; }', ['x' => 0])); var_dump(new MongoDB\BSON\Javascript('function() { return 1; }', ['x' => 1]) == new MongoDB\BSON\Javascript('function() { return 1; }', ['x' => 2])); ?> ===DONE=== --EXPECT-- bool(true) bool(true) bool(true) ===DONE=== PK.h] 33!tests/decimal128-2-valid-118.phptnu[--TEST-- Decimal128: [decq720] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004c00000000000000000000000000403000 {"d":{"$numberDecimal":"76"}} 180000001364004c00000000000000000000000000403000 ===DONE===PK.h]վ33!tests/decimal128-2-valid-110.phptnu[--TEST-- Decimal128: [decq712] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364003c00000000000000000000000000403000 {"d":{"$numberDecimal":"60"}} 180000001364003c00000000000000000000000000403000 ===DONE===PK.h]F ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]#tests/manager-ctor-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct() with default URI --FILE-- ===DONE=== --EXPECT-- ===DONE=== PK.h]bee&tests/serverApi-bsonserialize-001.phptnu[--TEST-- MongoDB\Driver\ServerApi::bsonSerialize() --FILE-- ===DONE=== --EXPECT-- { "version" : "1" } { "version" : "1", "strict" : true } { "version" : "1", "deprecationErrors" : true } { "version" : "1", "strict" : false, "deprecationErrors" : false } ===DONE=== PK.h]&tests/decimal128-7-parseError-065.phptnu[--TEST-- Decimal128: [basx521] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] &tests/decimal128-7-parseError-029.phptnu[--TEST-- Decimal128: [basx585] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]zYirr!tests/decimal128-2-valid-058.phptnu[--TEST-- Decimal128: [decq622] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000080f64ae1c7022d1500000000fe5f00 {"d":{"$numberDecimal":"1.00000000000000000000000E+6134"}} 18000000136400000080f64ae1c7022d1500000000fe5f00 ===DONE===PK.h]Y&&tests/top-decodeError-009.phptnu[--TEST-- Top-level document validity: Stated length less than byte count, with garbage after envelope --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]@tests/top-parseError-009.phptnu[--TEST-- Top-level document validity: Bad $numberInt (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]:Q$tests/bson-generate-document-id.phptnu[--TEST-- _id should only be generated for top-level document, not embedded docs --SKIPIF-- --FILE-- "bob", "address" => array( "street" => "Main St.", "city" => "New York", ), ); $bulk = new MongoDB\Driver\BulkWrite(); $user["_id"] = $bulk->insert($user); $result = $manager->executeBulkWrite(NS, $bulk); echo "Dumping inserted user document with injected _id:\n"; var_dump($user); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array("_id" => $user["_id"]))); echo "\nDumping fetched user document:\n"; $array = $cursor->toArray(); var_dump($array[0]); ?> ===DONE=== --EXPECTF-- Dumping inserted user document with injected _id: array(3) { ["username"]=> string(3) "bob" ["address"]=> array(2) { ["street"]=> string(8) "Main St." ["city"]=> string(8) "New York" } ["_id"]=> object(%s\ObjectId)#%d (%d) { ["oid"]=> string(24) "%s" } } Dumping fetched user document: object(stdClass)#%d (3) { ["_id"]=> object(%s\ObjectId)#%d (%d) { ["oid"]=> string(24) "%s" } ["username"]=> string(3) "bob" ["address"]=> object(stdClass)#%d (%d) { ["street"]=> string(8) "Main St." ["city"]=> string(8) "New York" } } ===DONE=== PK.h]!$66tests/regex-valid-009.phptnu[--TEST-- Regular Expression type: Regular expression as value of $regex query operator with $options --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 270000000b247265676578007061747465726e000002246f7074696f6e73000300000069780000 {"$regex":{"$regularExpression":{"pattern":"pattern","options":""}},"$options":"ix"} 270000000b247265676578007061747465726e000002246f7074696f6e73000300000069780000 ===DONE===PK.h]BEE)tests/session-advanceClusterTime-001.phptnu[--TEST-- MongoDB\Driver\Session::advanceClusterTime() --SKIPIF-- --FILE-- startSession(); $sessionB = $manager->startSession(); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $sessionA]); echo "Initial cluster time of session B:\n"; var_dump($sessionB->getClusterTime()); $sessionB->advanceClusterTime($sessionA->getClusterTime()); echo "\nCluster time after advancing session B:\n"; var_dump($sessionB->getClusterTime()); echo "\nSessions A and B have equivalent cluster times:\n"; var_dump($sessionA->getClusterTime() == $sessionB->getClusterTime()); ?> ===DONE=== --EXPECTF-- Initial cluster time of session B: NULL Cluster time after advancing session B: object(stdClass)#%d (%d) { ["clusterTime"]=> object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(%d) "%d" ["timestamp"]=> string(%d) "%d" } ["signature"]=> %a } Sessions A and B have equivalent cluster times: bool(true) ===DONE=== PK.h]B''tests/bug1839-007.phptnu[--TEST-- PHPC-1839: Referenced, out-of-scope, interned string in typeMap (PHP >= 8.1) --SKIPIF-- --FILE-- &$rootValue, 'document' => &$documentValue]; return $typemap; } $typemap = createTypemap(); $bson = MongoDB\BSON\fromPhp((object) []); echo "Before:\n"; debug_zval_dump($typemap); MongoDB\BSON\toPHP($bson, $typemap); echo "After:\n"; debug_zval_dump($typemap); ?> ===DONE=== --EXPECT-- Before: array(2) refcount(2){ ["root"]=> reference refcount(1) { string(5) "array" interned } ["document"]=> reference refcount(1) { string(5) "array" interned } } After: array(2) refcount(2){ ["root"]=> reference refcount(1) { string(5) "array" interned } ["document"]=> reference refcount(1) { string(5) "array" interned } } ===DONE=== PK.h]f  -tests/manager-executeBulkWrite_error-004.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() delete write error --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->delete(['field' => ['$unsupportedOperator' => true]], ['limit' => 1]); try { $manager->executeBulkWrite(NS, $bulk); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { printf("BulkWriteException: %s\n", $e->getMessage()); echo "\n===> WriteResult\n"; printWriteResult($e->getWriteResult()); } echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- BulkWriteException: unknown operator: $unsupportedOperator ===> WriteResult server: %s:%d insertedCount: 0 matchedCount: 0 modifiedCount: 0 upsertedCount: 0 deletedCount: 0 object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(38) "unknown operator: $unsupportedOperator" ["code"]=> int(2) ["index"]=> int(0) ["info"]=> NULL } writeError[0].message: unknown operator: $unsupportedOperator writeError[0].code: 2 ===> Collection array(1) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(1) ["x"]=> int(1) } } ===DONE=== PK.h]e77)tests/writeresult-getwriteerrors-002.phptnu[--TEST-- MongoDB\Driver\WriteResult::getWriteErrors() with unordered execution --SKIPIF-- --FILE-- false]); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $bulk->insert(['_id' => 4]); $bulk->insert(['_id' => 4]); try { $result = $manager->executeBulkWrite(NS, $bulk); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteErrors()); } ?> ===DONE=== --EXPECTF-- array(2) { [0]=> object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "%SE11000 duplicate key error %s: phongo.writeResult_writeresult_getwriteerrors_002%sdup key: { %S: 2 }" ["code"]=> int(11000) ["index"]=> int(2) ["info"]=> NULL } [1]=> object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "%SE11000 duplicate key error %s: phongo.writeResult_writeresult_getwriteerrors_002%sdup key: { %S: 4 }" ["code"]=> int(11000) ["index"]=> int(5) ["info"]=> NULL } } ===DONE=== PK.h]S$tests/readconcern-set_state-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern::__set_state() --FILE-- $level, ])); echo "\n\n"; } /* Test with level unset */ var_export(MongoDB\Driver\ReadConcern::__set_state([ ])); echo "\n\n"; ?> ===DONE=== --EXPECTF-- MongoDB\Driver\ReadConcern::__set_state(array( %w'level' => 'available', )) MongoDB\Driver\ReadConcern::__set_state(array( %w'level' => 'linearizable', )) MongoDB\Driver\ReadConcern::__set_state(array( %w'level' => 'local', )) MongoDB\Driver\ReadConcern::__set_state(array( %w'level' => 'majority', )) MongoDB\Driver\ReadConcern::__set_state(array( %w'level' => 'snapshot', )) MongoDB\Driver\ReadConcern::__set_state(array( )) ===DONE=== PK.h]IzaNNtests/string-valid-004.phptnu[--TEST-- String: two-byte UTF-8 (é) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000261000d000000c3a9c3a9c3a9c3a9c3a9c3a90000 {"a":"\u00e9\u00e9\u00e9\u00e9\u00e9\u00e9"} 190000000261000d000000c3a9c3a9c3a9c3a9c3a9c3a90000 ===DONE===PK.h]_\!tests/decimal128-1-valid-006.phptnu[--TEST-- Decimal128: Special - NaN with a payload --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001200000000000000000000000000007e00 {"d":{"$numberDecimal":"NaN"}} ===DONE===PK.h]D tests/ini-debug-phpinfo-001.phptnu[--TEST-- phpinfo() reports mongodb.debug (default) --FILE-- ===DONE=== --EXPECTF-- %a mongodb.debug => no value => no value %a ===DONE=== PK.h]Atests/cursor-tailable-003.phptnu[--TEST-- MongoDB\Driver\Cursor tailable iteration with awaitData and maxAwaitTimeMS options --SKIPIF-- --FILE-- executeCommand(DATABASE_NAME, new MongoDB\Driver\Command([ 'create' => COLLECTION_NAME, 'capped' => true, 'size' => 1048576, ])); $bulkWrite = new MongoDB\Driver\BulkWrite; $bulkWrite->insert(['_id' => 1]); $manager->executeBulkWrite(NS, $bulkWrite); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], [ 'tailable' => true, 'awaitData' => true, 'maxAwaitTimeMS' => 10, ])); $it = new IteratorIterator($cursor); $it->rewind(); printf("{_id: %d}\n", $it->current()->_id); $it->next(); $startTime = microtime(true); echo "Awaiting results...\n"; $it->next(); printf("Waited for %.6f seconds\n", microtime(true) - $startTime); // Sometimes the cursor will wait for 0.0099 seconds and sometimes it will wait for 0.01. ?> ===DONE=== --EXPECTF-- {_id: 1} Awaiting results... Waited for 0.0%d seconds ===DONE=== PK.h]QDtests/top-parseError-034.phptnu[--TEST-- Top-level document validity: Bad $minKey (boolean, not integer) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]~g&tests/decimal128-6-parseError-016.phptnu[--TEST-- Decimal128: 2 negative signs --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]z&tests/decimal128-6-parseError-013.phptnu[--TEST-- Decimal128: 2 negative signs --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]%b %tests/bulkwrite-update_error-005.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() with BSON encoding error (null bytes in keys) --FILE-- update(["\0" => 1], ['x' => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(["x\0" => 1], ['x' => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(["\0\0\0" => 1], ['x' => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ["\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ["x\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ["\0\0\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['y' => 1], ['collation' => ["\0" => 1]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['y' => 1], ['collation' => ["x\0" => 1]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ['y' => 1], ['collation' => ["\0\0\0" => 1]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "x". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "x". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "x". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". ===DONE=== PK.h]o›+tests/manager-ctor-serverApi-error-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): serverApi driver option (error) --FILE-- '1']); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "serverApi" driver option to be MongoDB\Driver\ServerApi, string given ===DONE=== PK.h]M}}!tests/decimal128-2-valid-047.phptnu[--TEST-- Decimal128: [decq074] Nmin and below --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000a5bc138938d44c64d31000000 {"d":{"$numberDecimal":"1.000000000000000000000000000000000E-6143"}} 18000000136400000000000a5bc138938d44c64d31000000 ===DONE===PK.h]g̖9  tests/write-0002.phptnu[--TEST-- MongoDB\Driver\BulkWrite: #002 Get the generated ID --SKIPIF-- --FILE-- "Hannes", "country" => "USA", "gender" => "male"); $hayley = array("name" => "Bayley", "country" => "USA", "gender" => "female"); $insertBulk = new \MongoDB\Driver\BulkWrite(['ordered' => true]); $hannes_id = $insertBulk->insert($hannes); $hayley_id = $insertBulk->insert($hayley); $w = 1; $wtimeout = 1000; $writeConcern = new \MongoDB\Driver\WriteConcern($w, $wtimeout); var_dump($insertBulk); $result = $manager->executeBulkWrite(NS, $insertBulk, $writeConcern); var_dump($insertBulk); assert($result instanceof \MongoDB\Driver\WriteResult); printf( "Inserted %d documents to %s\n", $result->getInsertedCount(), $result->getServer()->getHost() ); printf("hannes: %s\nhayley: %s\n", $hannes_id, $hayley_id); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> NULL ["collection"]=> NULL ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(false) ["server_id"]=> int(0) ["session"]=> NULL ["write_concern"]=> NULL } object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(15) "bulk_write_0002" ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(true) ["server_id"]=> int(%r[1-9]\d*%r) ["session"]=> NULL ["write_concern"]=> array(%d) { ["w"]=> int(1) ["wtimeout"]=> int(1000) } } Inserted 2 documents to %s hannes: %s hayley: %s ===DONE=== PK.h]"hYNN"tests/server-executeQuery-001.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() with filter and projection --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query(array()))->getServer(); // load fixtures for test $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 1, 'x' => 2, 'y' => 3)); $bulk->insert(array('_id' => 2, 'x' => 3, 'y' => 4)); $bulk->insert(array('_id' => 3, 'x' => 4, 'y' => 5)); $server->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query(array('x' => 3), array('projection' => array('y' => 1))); $cursor = $server->executeQuery(NS, $query); var_dump($cursor instanceof MongoDB\Driver\Cursor); var_dump($server == $cursor->getServer()); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- bool(true) bool(true) array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["y"]=> int(4) } } ===DONE=== PK.h]l;tests/bug1006-001.phptnu[--TEST-- PHPC-1006: Do not modify memory of Persistable::bsonSerialize() return value --FILE-- data = [ '__pclass' => 'baz', 'foo' => 'bar', ]; } function bsonSerialize() { return $this->data; } function bsonUnserialize(array $data) { } } $obj = new MyClass; var_dump($obj->data); hex_dump(fromPHP($obj)); var_dump($obj->data); ?> ===DONE=== --EXPECT-- array(2) { ["__pclass"]=> string(3) "baz" ["foo"]=> string(3) "bar" } 0 : 28 00 00 00 05 5f 5f 70 63 6c 61 73 73 00 07 00 [(....__pclass...] 10 : 00 00 80 4d 79 43 6c 61 73 73 02 66 6f 6f 00 04 [...MyClass.foo..] 20 : 00 00 00 62 61 72 00 00 [...bar..] array(2) { ["__pclass"]=> string(3) "baz" ["foo"]=> string(3) "bar" } ===DONE=== PK.h]:1HH.tests/commandFailedEvent-getServiceId-002.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandFailedEvent omits serviceId for non-load balanced topology --SKIPIF-- --FILE-- getCommandName()); var_dump($event->getServiceId()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { printf("commandFailed: %s\n", $event->getCommandName()); var_dump($event->getServiceId()); } } $manager = create_test_manager(); $manager->addSubscriber(new MySubscriber); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$unsupported' => 1]], ]); throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command); }, MongoDB\Driver\Exception\CommandException::class); ?> --EXPECTF-- commandStarted: aggregate NULL commandFailed: aggregate NULL OK: Got MongoDB\Driver\Exception\CommandException PK.h]޾$00(tests/bson-regex-get_properties-001.phptnu[--TEST-- MongoDB\BSON\Regex get_properties handler (get_object_vars) --FILE-- ===DONE=== --EXPECT-- array(2) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(1) "i" } ===DONE=== PK.h]P33!tests/decimal128-2-valid-113.phptnu[--TEST-- Decimal128: [decq715] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004700000000000000000000000000403000 {"d":{"$numberDecimal":"71"}} 180000001364004700000000000000000000000000403000 ===DONE===PK.h]Z{&tests/decimal128-7-parseError-076.phptnu[--TEST-- Decimal128: [basx539] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]{cctests/double-valid-012.phptnu[--TEST-- Double type: -Inf --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000016400000000000000f0ff00 {"d":{"$numberDouble":"-Infinity"}} {"d":{"$numberDouble":"-Infinity"}} 10000000016400000000000000f0ff00 {"d":{"$numberDouble":"-Infinity"}} ===DONE===PK.h]Y5  +tests/bson-dbpointer-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\DBPointer::jsonSerialize() return value --FILE-- dbref; var_dump($dbref->jsonSerialize()); ?> ===DONE=== --EXPECT-- array(1) { ["$dbPointer"]=> array(2) { ["$ref"]=> string(11) "phongo.test" ["$id"]=> array(1) { ["$oid"]=> string(24) "5a2e78accd485d55b4050000" } } } ===DONE=== PK.h],%!tests/decimal128-3-valid-064.phptnu[--TEST-- Decimal128: [basx637] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000004a3000 {"d":{"$numberDecimal":"0E+5"}} 1800000013640000000000000000000000000000004a3000 1800000013640000000000000000000000000000004a3000 ===DONE===PK.h] --FILE-- startSession(); $sessionA->endSession(); echo throws(function() use ($sessionA) { $sessionA->startTransaction(); }, 'MongoDB\Driver\Exception\LogicException'), "\n"; echo throws(function() use ($sessionA) { $sessionA->abortTransaction(); }, 'MongoDB\Driver\Exception\LogicException'), "\n"; /* The reason that startTransaction is in here twice is that this script can run without exception * if the endSession() call is taken out. */ echo throws(function() use ($sessionA) { $sessionA->startTransaction(); }, 'MongoDB\Driver\Exception\LogicException'), "\n"; echo throws(function() use ($sessionA) { $sessionA->commitTransaction(); }, 'MongoDB\Driver\Exception\LogicException'), "\n"; echo throws(function() use ($sessionA) { $sessionA->advanceOperationTime(new \MongoDB\BSON\Timestamp(1900123000, 1900123000)); }, 'MongoDB\Driver\Exception\LogicException'), "\n"; echo throws(function() use ($sessionA) { $sessionA->advanceClusterTime([]); }, 'MongoDB\Driver\Exception\LogicException'), "\n"; echo throws(function() use ($sessionA) { var_dump($sessionA->getClusterTime()); }, 'MongoDB\Driver\Exception\LogicException'), "\n"; echo throws(function() use ($sessionA) { var_dump($sessionA->getLogicalSessionId()); }, 'MongoDB\Driver\Exception\LogicException'), "\n"; echo throws(function() use ($sessionA) { var_dump($sessionA->getOperationTime()); }, 'MongoDB\Driver\Exception\LogicException'), "\n"; echo throws(function() use ($sessionA) { $sessionA->isInTransaction(); }, 'MongoDB\Driver\Exception\LogicException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\LogicException Cannot call 'startTransaction', as the session has already been ended. OK: Got MongoDB\Driver\Exception\LogicException Cannot call 'abortTransaction', as the session has already been ended. OK: Got MongoDB\Driver\Exception\LogicException Cannot call 'startTransaction', as the session has already been ended. OK: Got MongoDB\Driver\Exception\LogicException Cannot call 'commitTransaction', as the session has already been ended. OK: Got MongoDB\Driver\Exception\LogicException Cannot call 'advanceOperationTime', as the session has already been ended. OK: Got MongoDB\Driver\Exception\LogicException Cannot call 'advanceClusterTime', as the session has already been ended. OK: Got MongoDB\Driver\Exception\LogicException Cannot call 'getClusterTime', as the session has already been ended. OK: Got MongoDB\Driver\Exception\LogicException Cannot call 'getLogicalSessionId', as the session has already been ended. OK: Got MongoDB\Driver\Exception\LogicException Cannot call 'getOperationTime', as the session has already been ended. OK: Got MongoDB\Driver\Exception\LogicException Cannot call 'isInTransaction', as the session has already been ended. ===DONE=== PK.h]2"-!tests/decimal128-5-valid-012.phptnu[--TEST-- Decimal128: [decq100] underflows cannot be tested for simple copies, check edge cases (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffffff095bc138938d44c64d31000000 {"d":{"$numberDecimal":"9.99999999999999999999999999999999E-6144"}} 18000000136400ffffffff095bc138938d44c64d31000000 18000000136400ffffffff095bc138938d44c64d31000000 ===DONE===PK.h]8/$tests/bson-minkey-set_state-001.phptnu[--TEST-- MongoDB\BSON\MinKey::__set_state() --FILE-- ===DONE=== --EXPECT-- MongoDB\BSON\MinKey::__set_state(array( )) ===DONE=== PK.h]{zz!tests/decimal128-2-valid-054.phptnu[--TEST-- Decimal128: [decq614] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000e83c80d09f3c2e3b030000fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000000000E+6138"}} 18000000136400000000e83c80d09f3c2e3b030000fe5f00 ===DONE===PK.h]EK߇tests/bson-int64-debug-001.phptnu[--TEST-- MongoDB\BSON\Int64 debug output --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(19) "9223372036854775807" } object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(20) "-9223372036854775808" } object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(1) "0" } ===DONE=== PK.h]ztests/top-parseError-003.phptnu[--TEST-- Top-level document validity: Bad $regularExpression (pattern is number, not string) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]IcwRRtests/regex-valid-007.phptnu[--TEST-- Regular Expression type: Required escapes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 100000000b610061625c226162000000 {"a":{"$regularExpression":{"pattern":"ab\\\"ab","options":""}}} 100000000b610061625c226162000000 ===DONE===PK.h][FOO!tests/decimal128-2-valid-146.phptnu[--TEST-- Decimal128: [decq793] Miscellaneous (testers' queries, etc.) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640090940d0000000000000000000000403000 {"d":{"$numberDecimal":"890000"}} 1800000013640090940d0000000000000000000000403000 ===DONE===PK.h] Ltests/top-valid-003.phptnu[--TEST-- Top-level document validity: Dotted key in top-level document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1000000002612e620002000000630000 {"a.b":"c"} 1000000002612e620002000000630000 ===DONE===PK.h]  rr%tests/writeconcern-set_state-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern::__set_state() --FILE-- -3 ], [ 'w' => -2 ], // -2 is default [ 'w' => -1 ], [ 'w' => 0 ], [ 'w' => 1 ], [ 'w' => 'majority' ], [ 'w' => 'tag' ], [ 'w' => 1, 'j' => false ], [ 'w' => 1, 'wtimeout' => 1000 ], [ 'w' => 1, 'j' => true, 'wtimeout' => 1000 ], [ 'j' => true ], [ 'wtimeout' => 1000 ], // wtimeout accepts 64-bit integers as strings [ 'wtimeout' => '2147483648'], ]; foreach ($tests as $fields) { var_export(MongoDB\Driver\WriteConcern::__set_state($fields)); echo "\n\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 'majority', )) MongoDB\Driver\WriteConcern::__set_state(array( )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => -1, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 0, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 'majority', )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 'tag', )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, 'j' => false, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, 'wtimeout' => 1000, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, 'j' => true, 'wtimeout' => 1000, )) MongoDB\Driver\WriteConcern::__set_state(array( 'j' => true, )) MongoDB\Driver\WriteConcern::__set_state(array( 'wtimeout' => 1000, )) MongoDB\Driver\WriteConcern::__set_state(array( 'wtimeout' => %r2147483648|'2147483648'%r, )) ===DONE=== PK.h]9:!tests/decimal128-3-valid-201.phptnu[--TEST-- Decimal128: [basx397] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000343000 {"d":{"$numberDecimal":"0.000007"}} 180000001364000700000000000000000000000000343000 180000001364000700000000000000000000000000343000 ===DONE===PK.h]88tests/int64-valid-003.phptnu[--TEST-- Int64 type: -1 --XFAIL-- PHP encodes integers as 32-bit if range allows --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000126100ffffffffffffffff00 {"a":{"$numberLong":"-1"}} {"a":-1} 10000000126100ffffffffffffffff00 {"a":-1} ===DONE===PK.h]\Z*tests/readconcern-set_state_error-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern::__set_state() requires "level" string field --FILE-- 0]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadConcern initialization requires "level" string field ===DONE=== PK.h]ӃvɁ0tests/bson-objectid-serialization_error-004.phptnu[--TEST-- MongoDB\BSON\ObjectId unserialization requires valid hex string (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: 0123456789abcdefghijklmn OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: INVALID ===DONE=== PK.h]r tests/bug1274-006.phptnu[--TEST-- PHPC-1274: Implicit sessions are not reused from parent process (disableClientPersistence=true) --SKIPIF-- --FILE-- logNamespace = $logNamespace; $this->manager = $manager; $this->pid = getmypid(); } public function executeAndLogSessions(callable $callable) { $this->lsids = []; MongoDB\Driver\Monitoring\addSubscriber($this); call_user_func($callable); MongoDB\Driver\Monitoring\removeSubscriber($this); if (empty($this->lsids)) { return; } $bulk = new MongoDB\Driver\BulkWrite(); foreach ($this->lsids as $lsid) { $bulk->update(['lsid' => $lsid], ['$inc' => ['count' => 1]], ['upsert' => true]); } $this->manager->executeBulkWrite($this->logNamespace, $bulk); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); if (isset($command->lsid)) { $this->lsids[] = $command->lsid; } $commandName = $event->getCommandName(); $process = $this->pid === getmypid() ? 'Parent' : 'Child'; printf("%s executes %s\n", $process, $commandName); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(URI, [], ['disableClientPersistence' => true]); $logNamespace = NS . '_sessions'; $sessionLogger = new SessionLogger($manager, $logNamespace); /* This test uses executeBulkWrite() as it's the only execute method that does * not create a cursor. The original patch for PHPC-1274 covered those methods * that return a cursor but omitted executeBulkWrite(). */ $sessionLogger->executeAndLogSessions(function() use ($manager) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk); }); $childPid = pcntl_fork(); if ($childPid === 0) { $sessionLogger->executeAndLogSessions(function() use ($manager) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 2]); $manager->executeBulkWrite(NS, $bulk); }); echo "Child exits\n"; exit; } if ($childPid > 0) { $waitPid = pcntl_waitpid($childPid, $status); if ($waitPid === $childPid) { echo "Parent waited for child to exit\n"; } $query = new MongoDB\Driver\Query([]); $cursor = $manager->executeQuery($logNamespace, $query); printf("Sessions used: %d\n", iterator_count($cursor)); } ?> ===DONE=== --EXPECT-- Parent executes insert Child executes insert Child exits Parent waited for child to exit Sessions used: 2 ===DONE=== PK.h]n<<<tests/readconcern-001.phptnu[--TEST-- ReadConcern: MongoDB\Driver\Manager::executeQuery() with readConcern option (find command) --SKIPIF-- --FILE-- insert(['_id' => 1, 'x' => 1]); $bulk->insert(['_id' => 2, 'x' => 2]); $manager->executeBulkWrite(NS, $bulk, $wc); $rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL); $query = new MongoDB\Driver\Query(['x' => 2], ['readConcern' => $rc]); $cursor = $manager->executeQuery(NS, $query); var_dump(iterator_to_array($cursor)); $rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY); $query = new MongoDB\Driver\Query(['x' => 2], ['readConcern' => $rc]); $cursor = $manager->executeQuery(NS, $query); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- array(1) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(2) ["x"]=> int(2) } } array(1) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(2) ["x"]=> int(2) } } ===DONE=== PK.h]dդ%tests/standalone-x509-error-0001.phptnu[--TEST-- X509 connection should not reuse previous stream after an auth failure --XFAIL-- parse_url() tests must be reimplemented (PHPC-1177) --SKIPIF-- --FILE-- true, 'ca_file' => SSL_DIR . '/ca.pem', 'pem_file' => SSL_DIR . '/client.pem', ]; // Wrong username for X509 authentication $parsed = parse_url(URI); $dsn = sprintf('mongodb://username@%s:%d/?ssl=true&authMechanism=MONGODB-X509', $parsed['host'], $parsed['port']); // Both should fail with auth failure, without reusing the previous stream for ($i = 0; $i < 2; $i++) { echo throws(function() use ($dsn, $driverOptions) { $manager = create_test_manager($dsn, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); var_dump($cursor->toArray()[0]); }, 'MongoDB\Driver\Exception\AuthenticationException', 'executeCommand'), "\n"; } ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\AuthenticationException thrown from executeCommand auth failed OK: Got MongoDB\Driver\Exception\AuthenticationException thrown from executeCommand auth failed ===DONE=== PK.h]+tests/session-debug-001.phptnu[--TEST-- MongoDB\Driver\Session debug output (before an operation) --SKIPIF-- --FILE-- startSession(); var_dump($session); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Session)#%d (%d) { ["logicalSessionId"]=> array(1) { ["id"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" ["type"]=> int(4) } } ["clusterTime"]=> NULL ["causalConsistency"]=> bool(true) ["snapshot"]=> bool(false) ["operationTime"]=> NULL ["server"]=> NULL ["inTransaction"]=> bool(false) ["transactionState"]=> string(4) "none" ["transactionOptions"]=> NULL } ===DONE=== PK.h]Vp2tests/bson-javascript-serialization_error-005.phptnu[--TEST-- MongoDB\BSON\Javascript unserialization expects optional scope to be array or object (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected scope to be array or object, string given ===DONE=== PK.h]1 ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected scope to be array or object, string given ===DONE=== PK.h]'C&tests/decimal128-6-parseError-008.phptnu[--TEST-- Decimal128: 2 decimal places --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]GA/tests/writeconcern-serialization_error-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern unserialization errors (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot enable journaling when using w = 0 ===DONE=== PK.h]!I;;.tests/bson-decimal128-set_state_error-002.phptnu[--TEST-- MongoDB\BSON\Decimal128::__set_state() requires valid decimal string --SKIPIF-- --FILE-- 'INVALID']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing Decimal128 string: INVALID ===DONE=== PK.h]rR_!tests/binary-decodeError-005.phptnu[--TEST-- Binary type: subtype 0x02 length negative one --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h] **tests/bug0166.phptnu[--TEST-- Disable serialization of objects --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- bool(false) OK: Got Exception ===DONE=== PK.h]q*JJtests/bug0913-001.phptnu[--TEST-- PHPC-913: Child process should not re-use mongoc_client_t objects from parent --SKIPIF-- --FILE-- 1]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); $uri = $cursor->toArray()[0]->you; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['pid' => getmypid(), 'uri' => $uri]); $manager->executeBulkWrite(NS, $bulk); } $manager = create_test_manager(); logMyURI($manager); $parentPid = getmypid(); $childPid = pcntl_fork(); if ($childPid === 0) { $manager = create_test_manager(); logMyURI($manager); /* Due to PHPC-912, we cannot allow the child process to terminate before * the parent is done using its client, lest it destroy the mongoc_client_t * object and shutdown its socket(s). Sleep for 250ms to allow the parent * time to query for our logged URI. */ usleep(250000); exit; } if ($childPid) { /* Sleep for 100ms to allow the child time to log its URI. Ideally, we would * wait for the child to finish, but PHPC-912 prevents us from doing so. */ usleep(100000); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); $results = $cursor->toArray(); printf("%d connections were logged\n", count($results)); printf("PIDs differ: %s\n", $results[0]->pid !== $results[1]->pid ? 'yes' : 'no'); printf("URIs differ: %s\n", $results[0]->uri !== $results[1]->uri ? 'yes' : 'no'); $waitPid = pcntl_waitpid($childPid, $status); if ($waitPid > 0) { printf("Parent(%d) waited for child(%d) to exit\n", $parentPid, $waitPid); } } ?> ===DONE=== --EXPECTF-- 2 connections were logged PIDs differ: yes URIs differ: yes Parent(%d) waited for child(%d) to exit ===DONE=== PK.h]=(tests/readpreference-ctor_error-002.phptnu[--TEST-- MongoDB\Driver\ReadPreference construction (invalid tagSets) --FILE-- 'one']]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { new MongoDB\Driver\ReadPreference("primary", [['tag' => 'one']]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY, ['invalid']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, ['invalid']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; // Ensure that tagSets is validated before maxStalenessSeconds option echo throws(function() { new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, ['invalid'], ['maxStalenessSeconds' => -2]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException tagSets may not be used with primary mode OK: Got MongoDB\Driver\Exception\InvalidArgumentException tagSets may not be used with primary mode OK: Got MongoDB\Driver\Exception\InvalidArgumentException tagSets must be an array of zero or more documents OK: Got MongoDB\Driver\Exception\InvalidArgumentException tagSets must be an array of zero or more documents OK: Got MongoDB\Driver\Exception\InvalidArgumentException tagSets must be an array of zero or more documents ===DONE=== PK.h]YZ4tests/manager-ctor-disableClientPersistence-006.phptnu[--TEST-- MongoDB\Driver\Manager with disableClientPersistence=true referenced by ClientEncryption (implicit keyVaultClient) --SKIPIF-- --FILE-- true]); ini_set('mongodb.debug', ''); echo "Creating clientEncryption\n"; $clientEncryption = $manager->createClientEncryption([ 'keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary(str_repeat('0', 96), 0)]], ]); echo "Unsetting manager\n"; ini_set('mongodb.debug', 'stderr'); unset($manager); ini_set('mongodb.debug', ''); echo "Unsetting clientEncryption\n"; ini_set('mongodb.debug', 'stderr'); unset($clientEncryption); ini_set('mongodb.debug', ''); ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client Creating clientEncryption Unsetting manager Unsetting clientEncryption%A [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A ===DONE=== PK.h].tests/bug1701-001.phptnu[--TEST-- PHPC-1701: prep_authmechanismproperties may leak if Manager ctor errors --FILE-- 'username', 'authMechanism' => 'GSSAPI', 'authMechanismProperties' => ['canonicalize_host_name' => true]], ['context' => stream_context_create([])] ); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Stream-Context resource does not contain "ssl" options array ===DONE=== PK.h]Ujj!tests/decimal128-2-valid-156.phptnu[--TEST-- Decimal128: [decq020] Normality --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f2af967ed05c82de3297ff6fde3c403000 {"d":{"$numberDecimal":"1234567890123456789012345678901234"}} 18000000136400f2af967ed05c82de3297ff6fde3c403000 ===DONE===PK.h]nuh!tests/decimal128-3-valid-290.phptnu[--TEST-- Decimal128: [basx238] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000423000 {"d":{"$numberDecimal":"1.265E+4"}} 18000000136400f104000000000000000000000000423000 18000000136400f104000000000000000000000000423000 ===DONE===PK.h]AR&tests/decimal128-7-parseError-075.phptnu[--TEST-- Decimal128: [basx538] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]9  tests/binary-valid-003.phptnu[--TEST-- Binary type: subtype 0x00 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0f0000000578000200000000ffff00 {"x":{"$binary":{"base64":"\/\/8=","subType":"00"}}} 0f0000000578000200000000ffff00 ===DONE===PK.h]z?77 tests/compression_error-002.phptnu[--TEST-- MongoDB\Driver\Manager: Connecting with invalid compressor values --SKIPIF-- --FILE-- "foo\xFEbar"] ); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "compressors": %s ===DONE=== PK.h] N!tests/decimal128-1-valid-056.phptnu[--TEST-- Decimal128: Exact rounding --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000a5bc138938d44c64d31cc3700 {"d":{"$numberDecimal":"1.000000000000000000000000000000000E+999"}} 18000000136400000000000a5bc138938d44c64d31cc3700 18000000136400000000000a5bc138938d44c64d31cc3700 ===DONE===PK.h](/sstests/bson-encode-003.phptnu[--TEST-- BSON encoding: Encoding objects into BSON representation --FILE-- "class", "data" ); } function bsonUnserialize(array $data) { $this->props = $data; } } class MyClass2 implements MongoDB\BSON\Persistable { function bsonSerialize() { return array( 1, 2, 3, ); } function bsonUnserialize(array $data) { $this->props = $data; } } $tests = array( array("stuff" => new MyClass), array("stuff" => new MyClass2), array("stuff" => array(new MyClass, new MyClass2)), ); foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", toJSON($s), "\n"; hex_dump($s); $ret = toPHP($s); var_dump($ret); } ?> ===DONE=== --EXPECTF-- Test#0 { "stuff" : { "__pclass" : { "$binary" : "TXlDbGFzcw==", "$type" : "80" }, "random" : "class", "0" : "data" } } 0 : 45 00 00 00 03 73 74 75 66 66 00 39 00 00 00 05 [E....stuff.9....] 10 : 5f 5f 70 63 6c 61 73 73 00 07 00 00 00 80 4d 79 [__pclass......My] 20 : 43 6c 61 73 73 02 72 61 6e 64 6f 6d 00 06 00 00 [Class.random....] 30 : 00 63 6c 61 73 73 00 02 30 00 05 00 00 00 64 61 [.class..0.....da] 40 : 74 61 00 00 00 [ta...] object(stdClass)#%d (1) { ["stuff"]=> object(MyClass)#%d (1) { ["props"]=> array(3) { ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(7) "MyClass" ["type"]=> int(128) } ["random"]=> string(5) "class" [0]=> string(4) "data" } } } Test#1 { "stuff" : { "__pclass" : { "$binary" : "TXlDbGFzczI=", "$type" : "80" }, "0" : 1, "1" : 2, "2" : 3 } } 0 : 3d 00 00 00 03 73 74 75 66 66 00 31 00 00 00 05 [=....stuff.1....] 10 : 5f 5f 70 63 6c 61 73 73 00 08 00 00 00 80 4d 79 [__pclass......My] 20 : 43 6c 61 73 73 32 10 30 00 01 00 00 00 10 31 00 [Class2.0......1.] 30 : 02 00 00 00 10 32 00 03 00 00 00 00 00 [.....2.......] object(stdClass)#%d (1) { ["stuff"]=> object(MyClass2)#%d (1) { ["props"]=> array(4) { ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(8) "MyClass2" ["type"]=> int(128) } [0]=> int(1) [1]=> int(2) [2]=> int(3) } } } Test#2 { "stuff" : [ { "__pclass" : { "$binary" : "TXlDbGFzcw==", "$type" : "80" }, "random" : "class", "0" : "data" }, { "__pclass" : { "$binary" : "TXlDbGFzczI=", "$type" : "80" }, "0" : 1, "1" : 2, "2" : 3 } ] } 0 : 81 00 00 00 04 73 74 75 66 66 00 75 00 00 00 03 [.....stuff.u....] 10 : 30 00 39 00 00 00 05 5f 5f 70 63 6c 61 73 73 00 [0.9....__pclass.] 20 : 07 00 00 00 80 4d 79 43 6c 61 73 73 02 72 61 6e [.....MyClass.ran] 30 : 64 6f 6d 00 06 00 00 00 63 6c 61 73 73 00 02 30 [dom.....class..0] 40 : 00 05 00 00 00 64 61 74 61 00 00 03 31 00 31 00 [.....data...1.1.] 50 : 00 00 05 5f 5f 70 63 6c 61 73 73 00 08 00 00 00 [...__pclass.....] 60 : 80 4d 79 43 6c 61 73 73 32 10 30 00 01 00 00 00 [.MyClass2.0.....] 70 : 10 31 00 02 00 00 00 10 32 00 03 00 00 00 00 00 [.1......2.......] 80 : 00 [.] object(stdClass)#%d (1) { ["stuff"]=> array(2) { [0]=> object(MyClass)#%d (1) { ["props"]=> array(3) { ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(7) "MyClass" ["type"]=> int(128) } ["random"]=> string(5) "class" [0]=> string(4) "data" } } [1]=> object(MyClass2)#%d (1) { ["props"]=> array(4) { ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (2) { ["data"]=> string(8) "MyClass2" ["type"]=> int(128) } [0]=> int(1) [1]=> int(2) [2]=> int(3) } } } } ===DONE=== PK.h] ktests/code-decodeError-003.phptnu[--TEST-- Javascript Code: bad code string length: eats terminator --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]ۥ'tests/code_w_scope-decodeError-001.phptnu[--TEST-- Javascript Code with Scope: field length zero --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]Om33!tests/decimal128-3-valid-121.phptnu[--TEST-- Decimal128: [basx144] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000523000 {"d":{"$numberDecimal":"0E+9"}} 180000001364000000000000000000000000000000523000 ===DONE===PK.h]EPP!tests/decimal128-2-valid-075.phptnu[--TEST-- Decimal128: [decq656] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640040420f0000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.000000E+6117"}} 1800000013640040420f0000000000000000000000fe5f00 ===DONE===PK.h],+tests/writeconcern-set_state_error-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern::__set_state() requires correct data types and values --FILE-- -4]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\WriteConcern::__set_state(['w' => M_PI]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\WriteConcern::__set_state(['wtimeout' => -1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\WriteConcern::__set_state(['wtimeout' => 'failure']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\WriteConcern::__set_state(['wtimeout' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\WriteConcern::__set_state(['j' => 'failure']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\WriteConcern initialization requires "w" integer field to be >= -3 OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\WriteConcern initialization requires "w" field to be integer or string OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\WriteConcern initialization requires "wtimeout" integer field to be >= 0 OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "failure" as 64-bit value for MongoDB\Driver\WriteConcern initialization OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\WriteConcern initialization requires "wtimeout" field to be integer or string OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\WriteConcern initialization requires "j" field to be boolean ===DONE=== PK.h]cK -tests/readpreference-set_state_error-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference::__set_state() requires correct data types and values --FILE-- 'furthest']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ReadPreference::__set_state(['mode' => M_PI]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ReadPreference::__set_state(['mode' => 'secondary', 'tags' => -1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ReadPreference::__set_state(['mode' => 'secondary', 'tags' => [ 42 ] ]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ReadPreference::__set_state(['mode' => 'primary', 'tags' => [['dc' => 'ny']]]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ReadPreference::__set_state(['mode' => 'secondary', 'maxStalenessSeconds' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ReadPreference::__set_state(['mode' => 'primary', 'maxStalenessSeconds' => 100]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ReadPreference::__set_state(['mode' => 'secondary', 'hedge' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\Driver\ReadPreference::__set_state(['mode' => 'primary', 'hedge' => []]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires specific values for "mode" string field OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "mode" field to be string OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "tags" field to be array OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "tags" array field to have zero or more documents OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "tags" array field to not be present with "primary" mode OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "maxStalenessSeconds" integer field to be >= 90 OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "maxStalenessSeconds" field to not be present with "primary" mode OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "hedge" field to be an array or object OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "hedge" field to not be present with "primary" mode ===DONE=== PK.h]6__!tests/decimal128-3-valid-240.phptnu[--TEST-- Decimal128: [basx008] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640065000000000000000000000000003e3000 {"d":{"$numberDecimal":"10.1"}} 1800000013640065000000000000000000000000003e3000 ===DONE===PK.h]Q_tests/cursorinterface-003.phptnu[--TEST-- MongoDB\Driver\CursorInterface does not extend Iterator --FILE-- ===DONE=== --EXPECT-- bool(false) ===DONE=== PK.h]\ tests/session-debug-002.phptnu[--TEST-- MongoDB\Driver\Session debug output (after an operation) --SKIPIF-- --FILE-- startSession(); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); var_dump($session); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Session)#%d (%d) { ["logicalSessionId"]=> array(1) { ["id"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" ["type"]=> int(4) } } ["clusterTime"]=> array(2) { ["clusterTime"]=> object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(%d) "%d" ["timestamp"]=> string(%d) "%d" } ["signature"]=> %a } ["causalConsistency"]=> bool(true) ["snapshot"]=> bool(false) ["operationTime"]=> object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(%d) "%d" ["timestamp"]=> string(%d) "%d" } ["server"]=> NULL ["inTransaction"]=> bool(false) ["transactionState"]=> string(4) "none" ["transactionOptions"]=> NULL } ===DONE=== PK.h]a 'tests/bson-int64-serialization-001.phptnu[--TEST-- MongoDB\BSON\Int64 serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(19) "9223372036854775807" } string(78) "C:18:"MongoDB\BSON\Int64":47:{a:1:{s:7:"integer";s:19:"9223372036854775807";}}" object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(19) "9223372036854775807" } object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(20) "-9223372036854775808" } string(79) "C:18:"MongoDB\BSON\Int64":48:{a:1:{s:7:"integer";s:20:"-9223372036854775808";}}" object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(20) "-9223372036854775808" } object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(1) "0" } string(59) "C:18:"MongoDB\BSON\Int64":28:{a:1:{s:7:"integer";s:1:"0";}}" object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(1) "0" } ===DONE=== PK.h]F11!tests/decimal128-3-valid-100.phptnu[--TEST-- Decimal128: [basx062] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400185c0ace00000000000000000000383000 {"d":{"$numberDecimal":"345678.5432"}} 18000000136400185c0ace00000000000000000000383000 18000000136400185c0ace00000000000000000000383000 ===DONE===PK.h]yV^4tests/top-parseError-016.phptnu[--TEST-- Top-level document validity: Bad $binary (binary is number, not string) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]jMll1tests/manager-ctor-read_preference-error-004.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid read preference (maxStalenessSeconds range) --SKIPIF-- --FILE-- 'secondary', 'maxStalenessSeconds' => 2147483648]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected maxStalenessSeconds to be <= 2147483647, 2147483648 given ===DONE=== PK.h]Ϯ)tests/server-executeWriteCommand-001.phptnu[--TEST-- MongoDB\Driver\Server::executeWriteCommand() --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); $bw = new MongoDB\Driver\BulkWrite(); $bw->insert(['a' => 1]); $manager->executeBulkWrite(NS, $bw); (new CommandObserver)->observe( function() use ($server) { $command = new MongoDB\Driver\Command([ 'drop' => COLLECTION_NAME, ]); $server->executeWriteCommand( DATABASE_NAME, $command, [ 'writeConcern' => new \MongoDB\Driver\WriteConcern(\MongoDB\Driver\WriteConcern::MAJORITY), ] ); }, function(stdClass $command) { echo "Write Concern: ", $command->writeConcern->w, "\n"; } ); ?> ===DONE=== --EXPECTF-- Write Concern: majority ===DONE=== PK.h]F=tests/top-decodeError-007.phptnu[--TEST-- Top-level document validity: Byte count is zero (with non-zero input length) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]ltests/bug1598-002.phptnu[--TEST-- PHPC-1598: WriteConcern get_gc should delegate to zend_std_get_properties --FILE-- wc = new MongoDB\Driver\WriteConcern('string'); $a->wc->a = $a; printf("Collected cycles: %d\n", gc_collect_cycles()); unset($a); printf("Collected cycles: %d\n", gc_collect_cycles()); ?> ===DONE=== --EXPECT-- Collected cycles: 0 Collected cycles: 2 ===DONE=== PK.h]Wd..tests/bug1839-006.phptnu[--TEST-- PHPC-1839: Referenced, local, non-interned string in typeMap (PHP >= 8.1) --SKIPIF-- --FILE-- &$rootValue, 'document' => &$documentValue]; $bson = MongoDB\BSON\fromPhp((object) []); echo "Before:\n"; debug_zval_dump($typemap); MongoDB\BSON\toPHP($bson, $typemap); echo "After:\n"; debug_zval_dump($typemap); ?> ===DONE=== --EXPECT-- Before: array(2) refcount(2){ ["root"]=> reference refcount(2) { string(5) "array" refcount(1) } ["document"]=> reference refcount(2) { string(5) "array" refcount(1) } } After: array(2) refcount(2){ ["root"]=> reference refcount(2) { string(5) "array" refcount(1) } ["document"]=> reference refcount(2) { string(5) "array" refcount(1) } } ===DONE=== PK.h]M^]@@!tests/decimal128-2-valid-006.phptnu[--TEST-- Decimal128: [decq152] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400393000000000000000000000000040b000 {"d":{"$numberDecimal":"-12345"}} 18000000136400393000000000000000000000000040b000 ===DONE===PK.h]d[܃(tests/bson-binary-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\Binary::jsonSerialize() with json_encode() --FILE-- new MongoDB\BSON\Binary('gargleblaster', 24)]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$binary" : "Z2FyZ2xlYmxhc3Rlcg==", "$type" : "18" } } {"foo":{"$binary":"Z2FyZ2xlYmxhc3Rlcg==","$type":"18"}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(13) "gargleblaster" ["type"]=> int(24) } } ===DONE=== PK.h]O/tests/standalone-ssl-verify_cert-error-002.phptnu[--TEST-- Connect to MongoDB with SSL and cert verification error (context options) --SKIPIF-- --FILE-- stream_context_create([ 'ssl' => [ // libmongoc does not allow the hostname to be overridden as "server" 'allow_invalid_hostname' => true, 'allow_self_signed' => false, // "weak_cert_validation" alias ], ]), ]; echo throws(function() use ($driverOptions) { $manager = create_test_manager(URI, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); var_dump($cursor->toArray()[0]); }, MongoDB\Driver\Exception\ConnectionException::class, 'executeCommand'), "\n"; ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_invalid_hostname" driver option is deprecated. Please use the "tlsAllowInvalidHostnames" URI option instead.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_self_signed" context driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead.%s OK: Got MongoDB\Driver\Exception\ConnectionException thrown from executeCommand %sTLS handshake failed%s ===DONE=== PK.h]2tests/retryable-writes-005.phptnu[--TEST-- Retryable writes: non-write command methods do not include transaction IDs --SKIPIF-- --FILE-- getCommand(); $hasTransactionId = isset($command->lsid) && isset($command->txnNumber); printf("%s command includes transaction ID: %s\n", $event->getCommandName(), $hasTransactionId ? 'yes' : 'no'); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $observer = new TransactionIdObserver; MongoDB\Driver\Monitoring\addSubscriber($observer); $manager = create_test_manager(); $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['x' => 1], 'update' => ['$inc' => ['x' => 1]], ]); echo "Testing Manager::executeCommand()\n"; $manager->executeCommand(DATABASE_NAME, $command); echo "\nTesting Manager::executeReadCommand()\n"; $manager->executeReadCommand(DATABASE_NAME, $command); echo "\nTesting Manager::executeReadWriteCommand()\n"; $manager->executeReadWriteCommand(DATABASE_NAME, $command); echo "\nTesting Manager::executeWriteCommand()\n"; $manager->executeWriteCommand(DATABASE_NAME, $command); MongoDB\Driver\Monitoring\removeSubscriber($observer); ?> ===DONE=== --EXPECT-- Testing Manager::executeCommand() findAndModify command includes transaction ID: no Testing Manager::executeReadCommand() findAndModify command includes transaction ID: no Testing Manager::executeReadWriteCommand() findAndModify command includes transaction ID: yes Testing Manager::executeWriteCommand() findAndModify command includes transaction ID: yes ===DONE=== PK.h]6tests/array-valid-001.phptnu[--TEST-- Array: Empty --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0d000000046100050000000000 {"a":[]} 0d000000046100050000000000 ===DONE===PK.h]!tests/causal-consistency-002.phptnu[--TEST-- Causal consistency: first read in session does not include afterClusterTime --SKIPIF-- --FILE-- observe( function() { $manager = create_test_manager(); $session = $manager->startSession(); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); }, function(stdClass $command) { $hasAfterClusterTime = isset($command->readConcern->afterClusterTime); printf("Read includes afterClusterTime: %s\n", ($hasAfterClusterTime ? 'yes' : 'no')); } ); ?> ===DONE=== --EXPECT-- Read includes afterClusterTime: no ===DONE=== PK.h][E77tests/string-valid-005.phptnu[--TEST-- String: three-byte UTF-8 (☆) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000261000d000000e29886e29886e29886e298860000 {"a":"\u2606\u2606\u2606\u2606"} 190000000261000d000000e29886e29886e29886e298860000 ===DONE===PK.h]M󥚛!tests/code_w_scope-valid-003.phptnu[--TEST-- Javascript Code with Scope: Empty code string, non-empty scope --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1d0000000f61001500000001000000000c000000107800010000000000 {"a":{"$code":"","$scope":{"x":{"$numberInt":"1"}}}} 1d0000000f61001500000001000000000c000000107800010000000000 ===DONE===PK.h]I55!tests/decimal128-2-valid-139.phptnu[--TEST-- Decimal128: [decq731] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400e303000000000000000000000000403000 {"d":{"$numberDecimal":"995"}} 18000000136400e303000000000000000000000000403000 ===DONE===PK.h]L(tests/readpreference-getTagSets-002.phptnu[--TEST-- MongoDB\Driver\ReadPreference::getTagSets() with string mode --FILE-- 'ny'], []], [['dc' => 'ny'], ['dc' => 'sf', 'use' => 'reporting'], []], ]; foreach ($tests as $test) { $rp = new MongoDB\Driver\ReadPreference("secondaryPreferred", $test); var_dump($rp->getTagSets()); } ?> ===DONE=== --EXPECT-- array(0) { } array(0) { } array(2) { [0]=> array(1) { ["dc"]=> string(2) "ny" } [1]=> array(0) { } } array(3) { [0]=> array(1) { ["dc"]=> string(2) "ny" } [1]=> array(2) { ["dc"]=> string(2) "sf" ["use"]=> string(9) "reporting" } [2]=> array(0) { } } ===DONE=== PK.h](tests/server-executeReadCommand-001.phptnu[--TEST-- MongoDB\Driver\Server::executeReadCommand() --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY)); (new CommandObserver)->observe( function() use ($server) { $command = new MongoDB\Driver\Command( [ 'aggregate' => NS, 'pipeline' => [], 'cursor' => new stdClass(), ] ); $server->executeReadCommand( DATABASE_NAME, $command, [ 'readPreference' => new \MongoDB\Driver\ReadPreference(\MongoDB\Driver\ReadPreference::RP_SECONDARY), 'readConcern' => new \MongoDB\Driver\ReadConcern(\MongoDB\Driver\ReadConcern::MAJORITY), ] ); }, function(stdClass $command) { echo "Read Preference: ", $command->{'$readPreference'}->mode, "\n"; echo "Read Concern: ", $command->readConcern->level, "\n"; } ); ?> ===DONE=== --EXPECTF-- Read Preference: secondary Read Concern: majority ===DONE=== PK.h]E<-tests/bson-timestamp-set_state_error-003.phptnu[--TEST-- MongoDB\BSON\Timestamp::__set_state() requires 64-bit integers to be positive unsigned 32-bit integers --SKIPIF-- --FILE-- 4294967296, 'timestamp' => 5678]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['increment' => 1234, 'timestamp' => 4294967296]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, 4294967296 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, 4294967296 given ===DONE=== PK.h]n~OO tests/writeconcern-ctor-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern construction --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> int(2000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(7) "tagname" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(6) "string" ["wtimeout"]=> int(3000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(6) "string" ["j"]=> bool(true) ["wtimeout"]=> int(4000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(6) "string" ["j"]=> bool(false) ["wtimeout"]=> int(5000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(6) "string" ["wtimeout"]=> int(6000) } ===DONE=== PK.h]2*tests/bson-timestamp-getTimestamp-001.phptnu[--TEST-- MongoDB\BSON\Timestamp::getTimestamp() --FILE-- getTimestamp()); echo "\n"; } ?> ===DONE=== --EXPECTF-- Test [1234:5678] int(5678) Test [2147483647:0] int(0) Test [0:2147483647] int(2147483647) ===DONE=== PK.h]T&tests/decimal128-4-parseError-007.phptnu[--TEST-- Decimal128: [basx562] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]ٵtests/double-valid-010.phptnu[--TEST-- Double type: NaN with payload --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000016400120000000000f87f00 {"d":{"$numberDouble":"NaN"}} {"d":{"$numberDouble":"NaN"}} {"d":{"$numberDouble":"NaN"}} ===DONE===PK.h]ҡ}tests/double-valid-007.phptnu[--TEST-- Double type: 0.0 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000016400000000000000000000 {"d":{"$numberDouble":"0"}} {"d":0} 10000000016400000000000000000000 {"d":0} ===DONE===PK.h])*tests/writeresult-getmatchedcount-002.phptnu[--TEST-- MongoDB\Driver\WriteResult::getMatchedCount() with unacknowledged write --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(0)); var_dump($result->getMatchedCount()); ?> ===DONE=== --EXPECT-- NULL ===DONE=== PK.h]lc!tests/decimal128-5-valid-067.phptnu[--TEST-- Decimal128: [decq665] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.0E+6112"}} 180000001364000a00000000000000000000000000fe5f00 180000001364000a00000000000000000000000000fe5f00 ===DONE===PK.h]r(tests/top-parseError-025.phptnu[--TEST-- Top-level document validity: Bad $timestamp (type is number, not doc) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]? dd!tests/decimal128-2-valid-065.phptnu[--TEST-- Decimal128: [decq636] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000c16ff2862300000000000000fe5f00 {"d":{"$numberDecimal":"1.0000000000000000E+6127"}} 180000001364000000c16ff2862300000000000000fe5f00 ===DONE===PK.h]7Wtests/bulkwrite-delete-001.phptnu[--TEST-- MongoDB\Driver\BulkWrite::delete() should always encode __pclass for Persistable objects --SKIPIF-- --FILE-- id = $id; $this->child = $child; } public function bsonSerialize() { return [ '_id' => $this->id, 'child' => $this->child, ]; } public function bsonUnserialize(array $data) { $this->id = $data['_id']; $this->child = $data['child']; } } $manager = create_test_manager(); $document = new MyClass('foo', new MyClass('bar', new MyClass('baz'))); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert($document); $result = $manager->executeBulkWrite(NS, $bulk); printf("Inserted %d document(s)\n", $result->getInsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); var_dump($cursor->toArray()); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->delete($document); $result = $manager->executeBulkWrite(NS, $bulk); printf("Deleted %d document(s)\n", $result->getDeletedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- Inserted 1 document(s) array(1) { [0]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "foo" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "bar" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "baz" ["child":"MyClass":private]=> NULL } } } } Deleted 1 document(s) array(0) { } ===DONE=== PK.h]/!tests/decimal128-3-valid-254.phptnu[--TEST-- Decimal128: [basx199] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000403000 {"d":{"$numberDecimal":"1265"}} 18000000136400f104000000000000000000000000403000 18000000136400f104000000000000000000000000403000 ===DONE===PK.h]|QQ!tests/decimal128-2-valid-027.phptnu[--TEST-- Decimal128: [decq014] derivative canonical plain strings --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ee0200000000000000000000000034b000 {"d":{"$numberDecimal":"-0.000750"}} 18000000136400ee0200000000000000000000000034b000 ===DONE===PK.h]h  $tests/dbpointer-decodeError-003.phptnu[--TEST-- DBPointer type (deprecated): String not null terminated --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]MṬ,tests/server-executeBulkWrite_error-001.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() with empty BulkWrite --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); echo throws(function() use ($server) { $server->executeBulkWrite(NS, new MongoDB\Driver\BulkWrite); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot do an empty bulk write ===DONE=== PK.h]Y <<!tests/decimal128-2-valid-143.phptnu[--TEST-- Decimal128: [decq053] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400d204000000000000000000000000403000 {"d":{"$numberDecimal":"1234"}} 18000000136400d204000000000000000000000000403000 ===DONE===PK.h]βtests/session-debug-007.phptnu[--TEST-- MongoDB\Driver\Session debug output (snapshot=true) --SKIPIF-- --FILE-- startSession(['snapshot' => true]); var_dump($session); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Session)#%d (%d) { ["logicalSessionId"]=> array(1) { ["id"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" ["type"]=> int(4) } } ["clusterTime"]=> NULL ["causalConsistency"]=> bool(false) ["snapshot"]=> bool(true) ["operationTime"]=> NULL ["server"]=> NULL ["inTransaction"]=> bool(false) ["transactionState"]=> string(4) "none" ["transactionOptions"]=> NULL } ===DONE=== PK.h]R)&tests/decimal128-6-parseError-002.phptnu[--TEST-- Decimal128: Exponent at the beginning --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]gci  tests/server-debug.phptnu[--TEST-- MongoDB\Driver\Server debug output --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query(array()))->getServer(); var_dump($server); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Server)#%d (%d) { ["host"]=> string(%d) "%s" ["port"]=> int(%d) ["type"]=> int(%d) ["is_primary"]=> bool(%s) ["is_secondary"]=> bool(%s) ["is_arbiter"]=> bool(false) ["is_hidden"]=> bool(false) ["is_passive"]=> bool(false)%A ["last_hello_response"]=> array(%d) { %a } ["round_trip_time"]=> %r(NULL|int\(\d+\))%r } ===DONE=== PK.h]Ǐ+tests/readpreference-serialization-002.phptnu[--TEST-- MongoDB\Driver\ReadPreference serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- 'ny']]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, [['dc' => 'ny'], ['dc' => 'sf', 'use' => 'reporting'], []]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => 1000]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['hedge' => ['enabled' => true]]), ]; foreach ($tests as $test) { var_dump($test); echo $s = serialize($test), "\n"; var_dump(unserialize($s)); echo "\n"; } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } O:29:"MongoDB\Driver\ReadPreference":1:{s:4:"mode";s:7:"primary";} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } O:29:"MongoDB\Driver\ReadPreference":1:{s:4:"mode";s:16:"primaryPreferred";} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } O:29:"MongoDB\Driver\ReadPreference":1:{s:4:"mode";s:9:"secondary";} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } O:29:"MongoDB\Driver\ReadPreference":1:{s:4:"mode";s:18:"secondaryPreferred";} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "nearest" } O:29:"MongoDB\Driver\ReadPreference":1:{s:4:"mode";s:7:"nearest";} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "nearest" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } O:29:"MongoDB\Driver\ReadPreference":1:{s:4:"mode";s:9:"secondary";} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } } } O:29:"MongoDB\Driver\ReadPreference":2:{s:4:"mode";s:9:"secondary";s:4:"tags";a:1:{i:0;O:8:"stdClass":1:{s:2:"dc";s:2:"ny";}}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(3) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } [1]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "sf" ["use"]=> string(9) "reporting" } [2]=> object(stdClass)#%d (%d) { } } } O:29:"MongoDB\Driver\ReadPreference":2:{s:4:"mode";s:9:"secondary";s:4:"tags";a:3:{i:0;O:8:"stdClass":1:{s:2:"dc";s:2:"ny";}i:1;O:8:"stdClass":2:{s:2:"dc";s:2:"sf";s:3:"use";s:9:"reporting";}i:2;O:8:"stdClass":0:{}}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(3) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } [1]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "sf" ["use"]=> string(9) "reporting" } [2]=> object(stdClass)#%d (%d) { } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1000) } O:29:"MongoDB\Driver\ReadPreference":2:{s:4:"mode";s:9:"secondary";s:19:"maxStalenessSeconds";i:1000;} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1000) } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["hedge"]=> object(stdClass)#%d (%d) { ["enabled"]=> bool(true) } } O:29:"MongoDB\Driver\ReadPreference":2:{s:4:"mode";s:9:"secondary";s:5:"hedge";O:8:"stdClass":1:{s:7:"enabled";b:1;}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["hedge"]=> object(stdClass)#%d (%d) { ["enabled"]=> bool(true) } } ===DONE=== PK.h]33!tests/decimal128-2-valid-116.phptnu[--TEST-- Decimal128: [decq718] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004a00000000000000000000000000403000 {"d":{"$numberDecimal":"74"}} 180000001364004a00000000000000000000000000403000 ===DONE===PK.h]?&tests/decimal128-7-parseError-069.phptnu[--TEST-- Decimal128: [basx507] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]ئtests/typemap-004.phptnu[--TEST-- MongoDB\Driver\Cursor::setTypeMap(): Setting fieldPath typemaps for compound types with string keys --SKIPIF-- --FILE-- 1, 'array' => [1, 2, 3], 'object' => ['string' => 'keys', 'for' => 'ever'] ]; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert($document); $manager->executeBulkWrite(NS, $bulk); function fetch($manager, $typemap = []) { $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); if ($typemap) { $cursor->setTypeMap($typemap); } return $cursor->toArray(); } echo "Default\n"; $documents = fetch($manager); var_dump($documents[0] instanceof stdClass); var_dump(is_array($documents[0]->array)); var_dump($documents[0]->object instanceof stdClass); echo "\nSetting 'object' path to 'MyArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'object' => "MyArrayObject" ]]); var_dump($documents[0] instanceof stdClass); var_dump(is_array($documents[0]->array)); var_dump($documents[0]->object instanceof MyArrayObject); echo "\nSetting 'object' and 'array' path to 'MyArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'object' => "MyArrayObject", 'array' => "MyArrayObject", ]]); var_dump($documents[0] instanceof stdClass); var_dump($documents[0]->array instanceof MyArrayObject); var_dump($documents[0]->object instanceof MyArrayObject); ?> ===DONE=== --EXPECT-- Default bool(true) bool(true) bool(true) Setting 'object' path to 'MyArrayObject' bool(true) bool(true) bool(true) Setting 'object' and 'array' path to 'MyArrayObject' bool(true) bool(true) bool(true) ===DONE=== PK.h] qJbb!tests/decimal128-2-valid-153.phptnu[--TEST-- Decimal128: [decq830] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000001000000000000000000403000 {"d":{"$numberDecimal":"4294967296"}} 180000001364000000000001000000000000000000403000 ===DONE===PK.h]jtests/symbol-valid-005.phptnu[--TEST-- Symbol: three-byte UTF-8 (☆) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000e61000d000000e29886e29886e29886e298860000 {"a":{"$symbol":"\u2606\u2606\u2606\u2606"}} 190000000e61000d000000e29886e29886e29886e298860000 ===DONE===PK.h]{!tests/decimal128-3-valid-056.phptnu[--TEST-- Decimal128: [basx136] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000343000 {"d":{"$numberDecimal":"0.000000"}} 180000001364000000000000000000000000000000343000 180000001364000000000000000000000000000000343000 ===DONE===PK.h]N4;;&tests/cursor-IteratorIterator-001.phptnu[--TEST-- MongoDB\Driver\Cursor query result iteration through IteratorIterator --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 1)); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array("x" => 1))); foreach (new IteratorIterator($cursor) as $document) { var_dump($document); } ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(1) } object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(1) } ===DONE=== PK.h]Zyy!tests/decimal128-1-valid-035.phptnu[--TEST-- Decimal128: Scientific - Largest --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffffff638e8d37c087adbe09edff5f00 {"d":{"$numberDecimal":"9.999999999999999999999999999999999E+6144"}} 18000000136400ffffffff638e8d37c087adbe09edff5f00 ===DONE===PK.h]  tests/manager-debug-003.phptnu[--TEST-- MongoDB\Driver\Manager: mongodb.debug=stderr (date format) --INI-- mongodb.debug=stderr --FILE-- ===DONE=== --EXPECTF-- [%r(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}\+00:00)%r]%A ===DONE===%A PK.h]  !tests/decimal128-3-valid-228.phptnu[--TEST-- Decimal128: [basx315] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000004a3000 {"d":{"$numberDecimal":"1.0E+6"}} 180000001364000a000000000000000000000000004a3000 180000001364000a000000000000000000000000004a3000 ===DONE===PK.h]Œtests/cursor-toArray-002.phptnu[--TEST-- MongoDB\Driver\Cursor::toArray() respects type map --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => array(1, 2, 3))); $bulk->insert(array('_id' => 2, 'x' => array(4, 5, 6))); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array('x' => 1))); $cursor->setTypeMap(array("array" => "MyArrayObject")); $documents = $cursor->toArray(); var_dump($documents[0]->x instanceof MyArrayObject); ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]Ftests/typemap-006.phptnu[--TEST-- MongoDB\Driver\Cursor::setTypeMap(): Setting fieldPath typemaps for compound types with wildcard keys --SKIPIF-- --FILE-- 1, 'array' => [0 => [ 4, 5, 6 ], 1 => [ 7, 8, 9 ]], 'object' => ['one' => [ 4, 5, 6 ], 'two' => [ 7, 8, 9 ]], ]; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert($document); $manager->executeBulkWrite(NS, $bulk); function fetch($manager, $typemap = []) { $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); if ($typemap) { $cursor->setTypeMap($typemap); } $documents = $cursor->toArray(); return $documents; } echo "\nSetting 'array.$' path to 'MyWildcardArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'array.$' => "MyWildcardArrayObject" ]]); var_dump($documents[0] instanceof stdClass); var_dump(is_array($documents[0]->array)); var_dump($documents[0]->array[0] instanceof MyWildcardArrayObject); var_dump($documents[0]->array[1] instanceof MyWildcardArrayObject); echo "\nSetting 'array.1' to 'MyArrayObject' and 'array.$' path to 'MyWildcardArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'array.1' => "MyArrayObject", 'array.$' => "MyWildcardArrayObject" ]]); var_dump($documents[0] instanceof stdClass); var_dump(is_array($documents[0]->array)); var_dump($documents[0]->array[0] instanceof MyWildcardArrayObject); var_dump($documents[0]->array[1] instanceof MyArrayObject); echo "\nSetting 'array.$' to 'MyWildcardArrayObject' and 'array.1' path to 'MyArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'array.$' => "MyWildcardArrayObject", 'array.1' => "MyArrayObject" ]]); var_dump($documents[0] instanceof stdClass); var_dump(is_array($documents[0]->array)); var_dump($documents[0]->array[0] instanceof MyWildcardArrayObject); var_dump($documents[0]->array[1] instanceof MyWildcardArrayObject); echo "\nSetting 'object.$' path to 'MyWildcardArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'object.$' => "MyWildcardArrayObject" ]]); var_dump($documents[0] instanceof stdClass); var_dump(is_object($documents[0]->object)); var_dump($documents[0]->object->one instanceof MyWildcardArrayObject); var_dump($documents[0]->object->two instanceof MyWildcardArrayObject); echo "\nSetting 'object.two' to 'MyArrayObject' and 'object.$' path to 'MyWildcardArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'object.two' => "MyArrayObject", 'object.$' => "MyWildcardArrayObject" ]]); var_dump($documents[0] instanceof stdClass); var_dump(is_object($documents[0]->object)); var_dump($documents[0]->object->one instanceof MyWildcardArrayObject); var_dump($documents[0]->object->two instanceof MyArrayObject); echo "\nSetting 'object.$' to 'MyWildcardArrayObject' and 'object.one' path to 'MyArrayObject'\n"; $documents = fetch($manager, ["fieldPaths" => [ 'object.$' => "MyWildcardArrayObject", 'object.one' => "MyArrayObject" ]]); var_dump($documents[0] instanceof stdClass); var_dump(is_object($documents[0]->object)); var_dump($documents[0]->object->one instanceof MyWildcardArrayObject); var_dump($documents[0]->object->two instanceof MyWildcardArrayObject); ?> ===DONE=== --EXPECT-- Setting 'array.$' path to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'array.1' to 'MyArrayObject' and 'array.$' path to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'array.$' to 'MyWildcardArrayObject' and 'array.1' path to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'object.$' path to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'object.two' to 'MyArrayObject' and 'object.$' path to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'object.$' to 'MyWildcardArrayObject' and 'object.one' path to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]EM&tests/manager-getwriteconcern-001.phptnu[--TEST-- MongoDB\Driver\Manager::getWriteConcern() --FILE-- 1, 'journal' => true)), array(null, array('w' => 'majority', 'journal' => true)), array('mongodb://127.0.0.1/?w=majority&journal=true', array('w' => 1, 'journal' => false)), array('mongodb://127.0.0.1/?wtimeoutms=1000', array()), array(null, array('wtimeoutms' => 1000)), array('mongodb://127.0.0.1/?w=2', array('wtimeoutms' => 1000)), array('mongodb://127.0.0.1/?w=majority', array('wtimeoutms' => 1000)), array('mongodb://127.0.0.1/?w=customTagSet', array('wtimeoutms' => 1000)), ); foreach ($tests as $i => $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getWriteConcern()); $manager->getWriteConcern(); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(true) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" ["j"]=> bool(true) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(false) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(12) "customTagSet" ["wtimeout"]=> int(1000) } ===DONE=== PK.h]NrOO&tests/cursor-setTypeMap_error-004.phptnu[--TEST-- Cursor::setTypeMap(): invalid fieldPaths keys --SKIPIF-- --FILE-- 'MyDocument'], ['.foo' => 'MyDocument'], ['...' => 'MyDocument'], ['foo.' => 'MyDocument'], ['foo..bar' => 'MyDocument'], ]; $manager = create_test_manager(); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); foreach ($fieldPaths as $fieldPath) { $typeMap = ['fieldPaths' => $fieldPath]; printf("Test typeMap: %s\n", json_encode($typeMap)); echo throws(function() use ($cursor, $typeMap) { $cursor->setTypeMap($typeMap); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo "\n"; } ?> ===DONE=== --EXPECT-- Test typeMap: {"fieldPaths":{"":"MyDocument"}} OK: Got MongoDB\Driver\Exception\InvalidArgumentException The 'fieldPaths' element may not be an empty string Test typeMap: {"fieldPaths":{".foo":"MyDocument"}} OK: Got MongoDB\Driver\Exception\InvalidArgumentException A 'fieldPaths' key may not start with a '.' Test typeMap: {"fieldPaths":{"...":"MyDocument"}} OK: Got MongoDB\Driver\Exception\InvalidArgumentException A 'fieldPaths' key may not start with a '.' Test typeMap: {"fieldPaths":{"foo.":"MyDocument"}} OK: Got MongoDB\Driver\Exception\InvalidArgumentException A 'fieldPaths' key may not end with a '.' Test typeMap: {"fieldPaths":{"foo..bar":"MyDocument"}} OK: Got MongoDB\Driver\Exception\InvalidArgumentException A 'fieldPaths' key may not have an empty segment ===DONE=== PK.h]jr/11&tests/bson-objectid-set_state-001.phptnu[--TEST-- MongoDB\BSON\ObjectId::__set_state() --FILE-- '576c25db6118fd406e6e6471', ])); echo "\n"; ?> ===DONE=== --EXPECTF-- MongoDB\BSON\ObjectId::__set_state(array( %w'oid' => '576c25db6118fd406e6e6471', )) ===DONE=== PK.h]I~!tests/decimal128-3-valid-256.phptnu[--TEST-- Decimal128: [basx200] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000423000 {"d":{"$numberDecimal":"1.265E+4"}} 18000000136400f104000000000000000000000000423000 18000000136400f104000000000000000000000000423000 ===DONE===PK.h]fRR/tests/writeresult-getwriteconcernerror-001.phptnu[--TEST-- MongoDB\Driver\WriteResult::getWriteConcernError() --SKIPIF-- --FILE-- insert(['x' => 1]); try { /* We assume that the replica set does not have 12 nodes */ $result = $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(12)); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteConcernError()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcernError)#%d (%d) { ["message"]=> string(29) "Not enough data-bearing nodes" ["code"]=> int(100) ["info"]=> %a } ===DONE=== PK.h]~Q4tests/manager-ctor-disableClientPersistence-011.phptnu[--TEST-- MongoDB\Driver\Manager with disableClientPersistence=true referenced by APM subscriber freed in RSHUTDOWN --SKIPIF-- --FILE-- getCommandName()); $this->events[] = $event; } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $subscriber = new MySubscriber; ini_set('mongodb.debug', 'stderr'); $manager = create_test_manager(URI, [], ['disableClientPersistence' => true]); ini_set('mongodb.debug', ''); MongoDB\Driver\Monitoring\addSubscriber($subscriber); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command); ini_set('mongodb.debug', 'stderr'); echo "Unsetting manager\n"; unset($manager); echo "Unsetting subscriber\n"; unset($subscriber); /* Since the subscriber has not been removed, the remaining internal reference to * it will be freed during RSHUTDOWN. */ ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client Command started: ping Unsetting manager Unsetting subscriber ===DONE===%A [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A PK.h]O tests/bug1050-001.phptnu[--TEST-- PHPC-1050: Command cursor should not invoke getMore at execution --SKIPIF-- --FILE-- getCommandName() !== 'aggregate' && $event->getCommandName() !== 'getMore') { return; } printf("Executing command: %s\n", $event->getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { if ($event->getCommandName() !== 'aggregate' && $event->getCommandName() !== 'getMore') { return; } printf("Executing command took %0.6f seconds\n", $event->getDurationMicros() / 1000000); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(); $cmd = new MongoDB\Driver\Command( [ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$changeStream' => (object) []], ], 'cursor' => (object) [], ], [ 'maxAwaitTimeMS' => 500, ] ); MongoDB\Driver\Monitoring\addSubscriber(new CommandLogger); $cursor = $manager->executeReadCommand(DATABASE_NAME, $cmd); $it = new IteratorIterator($cursor); printf("Current position is valid: %s\n\n", $it->valid() ? 'yes' : 'no'); echo "Rewinding cursor\n"; $it->rewind(); printf("Current position is valid: %s\n\n", $it->valid() ? 'yes' : 'no'); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk); echo "Advancing cursor\n"; $it->next(); printf("Current position is valid: %s\n\n", $it->valid() ? 'yes' : 'no'); $document = $it->current(); if (isset($document)) { printf("Operation type: %s\n", $document->operationType); var_dump($document->fullDocument); } ?> ===DONE=== --EXPECTF-- Executing command: aggregate Executing command took 0.%d seconds Current position is valid: no Rewinding cursor Executing command: getMore Executing command took 0.%r(4|5)%r%d seconds Current position is valid: no Advancing cursor Executing command: getMore Executing command took 0.%d seconds Current position is valid: yes Operation type: insert object(stdClass)#%d (%d) { ["_id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } ["x"]=> int(1) } ===DONE=== PK.h]f tests/bson-binary_error-003.phptnu[--TEST-- MongoDB\BSON\Binary constructor requires unsigned 8-bit integer for type --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected type to be an unsigned 8-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected type to be an unsigned 8-bit integer, 256 given ===DONE=== PK.h]hs tests/bson-binary_error-002.phptnu[--TEST-- MongoDB\BSON\Binary cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyBinary %s final class %SMongoDB\BSON\Binary%S in %s on line %d PK.h]1"33tests/code-valid-003.phptnu[--TEST-- Javascript Code: Multi-character --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000d61000d0000006162616261626162616261620000 {"a":{"$code":"abababababab"}} 190000000d61000d0000006162616261626162616261620000 ===DONE===PK.h]nfUtests/cursor-getmore-002.phptnu[--TEST-- MongoDB\Driver\Cursor query result iteration with batchSize requiring getmore with non-full batches --SKIPIF-- --FILE-- insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array(), array('batchSize' => 2))); foreach ($cursor as $i => $document) { printf("%d => {_id: %d}\n", $i, $document->_id); } ?> ===DONE=== --EXPECT-- Inserted: 5 0 => {_id: 0} 1 => {_id: 1} 2 => {_id: 2} 3 => {_id: 3} 4 => {_id: 4} ===DONE=== PK.h]I}  !tests/decimal128-3-valid-187.phptnu[--TEST-- Decimal128: [basx361] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000583000 {"d":{"$numberDecimal":"7E+12"}} 180000001364000700000000000000000000000000583000 180000001364000700000000000000000000000000583000 ===DONE===PK.h]pb#tests/document-decodeError-002.phptnu[--TEST-- Document type (sub-documents): Subdocument length too short: leaks terminator --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]r1w&tests/decimal128-7-parseError-072.phptnu[--TEST-- Decimal128: [basx536] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]"iv66!tests/decimal128-2-valid-081.phptnu[--TEST-- Decimal128: [decq060] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000403000 {"d":{"$numberDecimal":"1"}} 180000001364000100000000000000000000000000403000 ===DONE===PK.h]܇tests/bug0940-001.phptnu[--TEST-- PHPC-940: php_phongo_free_ssl_opt() attempts to free interned strings --SKIPIF-- --FILE-- false])); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "ca_file" driver option is deprecated. Please use the "tlsCAFile" URI option instead.%s object(MongoDB\Driver\Manager)#%d (%d) { ["uri"]=> string(20) "mongodb://127.0.0.1/" ["cluster"]=> array(0) { } } ===DONE=== PK.h]3&X$$$tests/server-executeCommand-001.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query(array()))->getServer(); $command = new MongoDB\Driver\Command(array('ping' => 1)); $result = $server->executeCommand(DATABASE_NAME, $command); var_dump($result instanceof MongoDB\Driver\Cursor); var_dump($result); echo "\nDumping response document:\n"; var_dump(current($result->toArray())); var_dump($server == $result->getServer()); ?> ===DONE=== --EXPECTF-- bool(true) object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> NULL ["query"]=> NULL ["command"]=> object(MongoDB\Driver\Command)#%d (%d) { ["command"]=> object(stdClass)#%d (%d) { ["ping"]=> int(1) } } ["readPreference"]=> NULL ["session"]=> %a ["isDead"]=> bool(false) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } Dumping response document: object(stdClass)#%d (%d) { ["ok"]=> float(1)%A } bool(true) ===DONE=== PK.h]Fg  #tests/bson-timestamp_error-005.phptnu[--TEST-- MongoDB\BSON\Timestamp constructor requires strings to parse as 64-bit integers --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "1.23" as 64-bit integer increment for MongoDB\BSON\Timestamp initialization OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "5.67" as 64-bit integer timestamp for MongoDB\BSON\Timestamp initialization ===DONE=== PK.h]l'tests/bson-toRelaxedJSON_error-001.phptnu[--TEST-- MongoDB\BSON\toRelaxedExtendedJSON(): BSON decoding exceptions --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader OK: Got MongoDB\Driver\Exception\UnexpectedValueException Reading document did not exhaust input buffer ===DONE=== PK.h]d>22'tests/bson-regex-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\Regex::jsonSerialize() return value (without flags) --FILE-- jsonSerialize()); ?> ===DONE=== --EXPECT-- array(2) { ["$regex"]=> string(7) "pattern" ["$options"]=> string(0) "" } ===DONE=== PK.h]@!tests/decimal128-3-valid-077.phptnu[--TEST-- Decimal128: [basx660] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003e3000 {"d":{"$numberDecimal":"0.0"}} 1800000013640000000000000000000000000000003e3000 1800000013640000000000000000000000000000003e3000 ===DONE===PK.h]gYc)tests/bson-toCanonicalJSON_error-002.phptnu[--TEST-- MongoDB\BSON\toCanonicalExtendedJSON(): BSON decoding exceptions for malformed documents --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader ===DONE=== PK.h]]:!tests/decimal128-3-valid-288.phptnu[--TEST-- Decimal128: [basx237] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000403000 {"d":{"$numberDecimal":"1265"}} 18000000136400f104000000000000000000000000403000 18000000136400f104000000000000000000000000403000 ===DONE===PK.h]K9 9 (tests/server-executeReadCommand-002.phptnu[--TEST-- MongoDB\Driver\Server::executeReadCommand() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $servers = $manager->getServers(); $selectedServer = array_pop($servers); $wrongServer = array_pop($servers); var_dump($selectedServer != $wrongServer); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$group' => ['_id' => 1]]], 'cursor' => (object) [] ]); $selectedServer->executeReadCommand(DATABASE_NAME, $command, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); echo throws(function () use ($wrongServer, $session) { $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$group' => ['_id' => 1]]], 'cursor' => (object) [] ]); $wrongServer->executeReadCommand(DATABASE_NAME, $command, ['session' => $session]); }, \MongoDB\Driver\Exception\RuntimeException::class), "\n"; $session->commitTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) OK: Got MongoDB\Driver\Exception\RuntimeException Requested server id does not matched pinned server id bool(true) bool(false) ===DONE=== PK.h]-u.tests/top-decodeError-011.phptnu[--TEST-- Top-level document validity: Stated length less than byte count, with valid envelope --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h] R!tests/decimal128-3-valid-051.phptnu[--TEST-- Decimal128: [basx672] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000383000 {"d":{"$numberDecimal":"0.0000"}} 180000001364000000000000000000000000000000383000 180000001364000000000000000000000000000000383000 ===DONE===PK.h]*!tests/decimal128-3-valid-190.phptnu[--TEST-- Decimal128: [basx383] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000423000 {"d":{"$numberDecimal":"7E+1"}} 180000001364000700000000000000000000000000423000 180000001364000700000000000000000000000000423000 ===DONE===PK.h]8ߝ2tests/bson-decimal128-serialization_error-001.phptnu[--TEST-- MongoDB\BSON\Decimal128 unserialization requires "dec" string field (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Decimal128 initialization requires "dec" string field ===DONE=== PK.h]`  tests/int32-decodeError-001.phptnu[--TEST-- Int32 type: Bad int32 field length --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]͊tests/bug0720.phptnu[--TEST-- PHPC-720: Do not persist SSL streams to avoid SSL reinitialization errors --SKIPIF-- --FILE-- true, 'ca_file' => SSL_DIR . '/ca.pem', ]; $manager = create_test_manager(URI, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); printf("ping: %d\n", $cursor->toArray()[0]->ok); unset($manager, $cursor); $manager = create_test_manager(URI, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); printf("ping: %d\n", $cursor->toArray()[0]->ok); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_invalid_hostname" driver option is deprecated. Please use the "tlsAllowInvalidHostnames" URI option instead.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "ca_file" driver option is deprecated. Please use the "tlsCAFile" URI option instead.%s ping: 1 ping: 1 ===DONE=== PK.h]- ||%tests/bulkwrite-update_error-006.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() collation option requires MongoDB 3.4 --SKIPIF-- =', '3.4'); ?> --FILE-- update( ['name' => 'foo'], ['$inc' => ['size' => 1]], ['collation' => ['locale' => 'en_US']] ); echo throws(function() use ($manager, $bulk) { $manager->executeBulkWrite(DATABASE_NAME . '.' . COLLECTION_NAME, $bulk); }, 'MongoDB\Driver\Exception\BulkWriteException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\BulkWriteException Bulk write failed due to previous MongoDB\Driver\Exception\RuntimeException: The selected server does not support collation ===DONE=== PK.h](tests/readpreference-getTagSets-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference::getTagSets() --FILE-- 'ny'], []], [['dc' => 'ny'], ['dc' => 'sf', 'use' => 'reporting'], []], ]; foreach ($tests as $test) { $rp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY_PREFERRED, $test); var_dump($rp->getTagSets()); } ?> ===DONE=== --EXPECT-- array(0) { } array(0) { } array(2) { [0]=> array(1) { ["dc"]=> string(2) "ny" } [1]=> array(0) { } } array(3) { [0]=> array(1) { ["dc"]=> string(2) "ny" } [1]=> array(2) { ["dc"]=> string(2) "sf" ["use"]=> string(9) "reporting" } [2]=> array(0) { } } ===DONE=== PK.h]d!tests/decimal128-4-valid-002.phptnu[--TEST-- Decimal128: [basx045] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640003000000000000000000000000003a3000 {"d":{"$numberDecimal":"0.003"}} 1800000013640003000000000000000000000000003a3000 1800000013640003000000000000000000000000003a3000 ===DONE===PK.h]!tests/decimal128-3-valid-270.phptnu[--TEST-- Decimal128: [basx168] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006400000000000000000000000000f43000 {"d":{"$numberDecimal":"1.00E+92"}} 180000001364006400000000000000000000000000f43000 180000001364006400000000000000000000000000f43000 ===DONE===PK.h]Bֶ %tests/writeconcern-isdefault-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern::isDefault() --FILE-- getWriteConcern(), // Cannot test "w=-3" since libmongoc URI parsing expects integers >= -1 // Cannot test "w=-2" since libmongoc URI parsing expects integers >= -1, and throws an error otherwise (new MongoDB\Driver\Manager('mongodb://127.0.0.1/?w=-1'))->getWriteConcern(), (new MongoDB\Driver\Manager('mongodb://127.0.0.1/?w=0'))->getWriteConcern(), (new MongoDB\Driver\Manager('mongodb://127.0.0.1/?w=1'))->getWriteConcern(), (new MongoDB\Driver\Manager('mongodb://127.0.0.1/?w=2'))->getWriteConcern(), (new MongoDB\Driver\Manager('mongodb://127.0.0.1/?w=tag'))->getWriteConcern(), (new MongoDB\Driver\Manager('mongodb://127.0.0.1/?w=majority'))->getWriteConcern(), // Cannot test ['w' => null] since an integer or string type is expected (PHPC-887) // Cannot test ['w' => -3] or ['w' => -2] since php_phongo_apply_wc_options_to_uri() expects integers >= -1 (new MongoDB\Driver\Manager(null, ['w' => -1]))->getWriteConcern(), (new MongoDB\Driver\Manager(null, ['w' => 0]))->getWriteConcern(), (new MongoDB\Driver\Manager(null, ['w' => 1]))->getWriteConcern(), (new MongoDB\Driver\Manager(null, ['w' => 2]))->getWriteConcern(), (new MongoDB\Driver\Manager(null, ['w' => 'tag']))->getWriteConcern(), (new MongoDB\Driver\Manager(null, ['w' => 'majority']))->getWriteConcern(), (new MongoDB\Driver\Manager)->getWriteConcern(), ]; foreach ($tests as $wc) { var_dump($wc->isDefault()); } ?> ===DONE=== --EXPECT-- bool(false) bool(true) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(true) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(true) ===DONE=== PK.h]q |'tests/manager-executeBulkWrite-007.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() update one document with no upsert --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->update( array('_id' => 1), array('$set' => array('x' => 2)), array('multi' => false, 'upsert' => false) ); $result = $manager->executeBulkWrite(NS, $bulk); echo "\n===> WriteResult\n"; printWriteResult($result); echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- ===> WriteResult server: %s:%d insertedCount: 0 matchedCount: 1 modifiedCount: 1 upsertedCount: 0 deletedCount: 0 ===> Collection array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(2) } } ===DONE=== PK.h]#&X&tests/decimal128-4-parseError-012.phptnu[--TEST-- Decimal128: [dqbsr533] negatives (Rounded & Inexact) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]J5'tests/code_w_scope-decodeError-011.phptnu[--TEST-- Javascript Code with Scope: bad scope doc (field has bad string length) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]d!@tests/bson-int64_error-001.phptnu[--TEST-- MongoDB\BSON\Int64 cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyInt64 %s final class %SMongoDB\BSON\Int64%S in %s on line %d PK.h]P  $tests/bson-objectid-compare-001.phptnu[--TEST-- MongoDB\BSON\ObjectId comparisons --FILE-- new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4603')); var_dump(new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4603') < new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4604')); var_dump(new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4603') > new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4602')); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) bool(true) ===DONE=== PK.h]d#'tests/manager-ctor-auth_source-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): authSource option --FILE-- '$external']], ]; foreach ($tests as $test) { list($uri, $options) = $test; /* Note: the Manager's debug information does not include the auth mechanism * so we are merely testing that no exception is thrown. */ $manager = new MongoDB\Driver\Manager($uri, $options); } ?> ===DONE=== --EXPECT-- ===DONE=== PK.h])/!tests/decimal128-3-valid-055.phptnu[--TEST-- Decimal128: [basx673] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000363000 {"d":{"$numberDecimal":"0.00000"}} 180000001364000000000000000000000000000000363000 180000001364000000000000000000000000000000363000 ===DONE===PK.h]~oz  +tests/writeresult-getupsertedcount-002.phptnu[--TEST-- MongoDB\Driver\WriteResult::getUpsertedCount() with unacknowledged write --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(0)); var_dump($result->getUpsertedCount()); ?> ===DONE=== --EXPECT-- NULL ===DONE=== PK.h]ڪ|ZZ-tests/manager-createClientEncryption-001.phptnu[--TEST-- MongoDB\Driver\Manager::createClientEncryption() --SKIPIF-- --FILE-- createClientEncryption(['keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary($key, 0)]]]); ?> ===DONE=== --EXPECT-- ===DONE=== PK.h],tests/bson-regex_error-002.phptnu[--TEST-- MongoDB\BSON\Regex cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyRegex %s final class %SMongoDB\BSON\Regex%S in %s on line %d PK.h]O00!tests/causal-consistency-011.phptnu[--TEST-- Causal consistency: $clusterTime is not sent in commands to unsupported deployments --SKIPIF-- --FILE-- observe( function() { $manager = create_test_manager(); $session = $manager->startSession(); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); $manager->executeQuery(NS, $query, ['session' => $session]); }, function(stdClass $command) { $hasClusterTime = isset($command->{'$clusterTime'}); printf("Command includes \$clusterTime: %s\n", ($hasClusterTime ? 'yes' : 'no')); } ); ?> ===DONE=== --EXPECT-- Command includes $clusterTime: no Command includes $clusterTime: no ===DONE=== PK.h]=R!tests/decimal128-3-valid-261.phptnu[--TEST-- Decimal128: [basx044] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400fc040000000000000000000000003c3000 {"d":{"$numberDecimal":"12.76"}} 18000000136400fc040000000000000000000000003c3000 18000000136400fc040000000000000000000000003c3000 ===DONE===PK.h]  tests/top-decodeError-004.phptnu[--TEST-- Top-level document validity: One object, sized correctly, with a spot for an EOO, but the EOO is 0x01 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]@Ī&tests/decimal128-6-parseError-014.phptnu[--TEST-- Decimal128: End in negative sign --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]=xx1tests/bson-timestamp-serialization_error-001.phptnu[--TEST-- MongoDB\BSON\Timestamp unserialization requires "increment" and "timestamp" integer fields (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields ===DONE=== PK.h]̜55!tests/decimal128-2-valid-032.phptnu[--TEST-- Decimal128: [decq427] negative zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003cb000 {"d":{"$numberDecimal":"-0.00"}} 1800000013640000000000000000000000000000003cb000 ===DONE===PK.h]mmtests/bson-symbol-001.phptnu[--TEST-- MongoDB\BSON\Symbol #001 --FILE-- $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $testagain = toPHP($s); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- Test#0 { "symbol" : "test" } string(21) "{ "symbol" : "test" }" string(21) "{ "symbol" : "test" }" bool(true) ===DONE=== PK.h]F!tests/decimal128-3-valid-142.phptnu[--TEST-- Decimal128: [basx255] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000343000 {"d":{"$numberDecimal":"0.001265"}} 18000000136400f104000000000000000000000000343000 18000000136400f104000000000000000000000000343000 ===DONE===PK.h]0,tests/manager-ctor-duplicate-option-004.phptnu[--TEST-- MongoDB\Driver\Manager::__construct() with duplicate read preference tags --FILE-- 'secondary', 'readPreferenceTags' => [['dc' => 'ny']], 'readpreferencetags' => [['dc' => 'ca']]]); var_dump($manager->getReadPreference()->getTagSets()); ?> ===DONE=== --EXPECT-- array(1) { [0]=> array(1) { ["dc"]=> string(2) "ca" } } ===DONE=== PK.h]M4CKK!tests/decimal128-2-valid-025.phptnu[--TEST-- Decimal128: [decq010] derivative canonical plain strings --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ee020000000000000000000000003ab000 {"d":{"$numberDecimal":"-0.750"}} 18000000136400ee020000000000000000000000003ab000 ===DONE===PK.h]Wtests/code-decodeError-005.phptnu[--TEST-- Javascript Code: code string is not null-terminated --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]g!tests/decimal128-3-valid-274.phptnu[--TEST-- Decimal128: [basx216] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003c3000 {"d":{"$numberDecimal":"12.65"}} 18000000136400f1040000000000000000000000003c3000 18000000136400f1040000000000000000000000003c3000 ===DONE===PK.h]~R&tests/decimal128-6-parseError-025.phptnu[--TEST-- Decimal128: Invalid --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]Kܠ&tests/decimal128-7-parseError-049.phptnu[--TEST-- Decimal128: [basx547] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]atests/cursor-session-003.phptnu[--TEST-- MongoDB\Driver\Cursor debug output for command cursor includes explicit session --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$match' => new stdClass]], 'cursor' => ['batchSize' => 2], ]); $session = $manager->startSession(); $cursor = $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); $iterator = new IteratorIterator($cursor); $iterator->rewind(); $iterator->next(); printf("Cursor ID is zero: %s\n", (string) $cursor->getId() === '0' ? 'yes' : 'no'); var_dump($cursor); $iterator->next(); /* Per PHPC-1161, the Cursor will free a reference to the Session as soon as it * is exhausted. While this is primarily done to ensure implicit sessions for * command cursors are returned to the pool ASAP, it also applies to explicit * sessions. */ printf("\nCursor ID is zero: %s\n", (string) $cursor->getId() === '0' ? 'yes' : 'no'); var_dump($cursor); ?> ===DONE=== --EXPECTF-- Cursor ID is zero: no object(MongoDB\Driver\Cursor)#%d (%d) { %a ["session"]=> object(MongoDB\Driver\Session)#%d (%d) { %a } %a } Cursor ID is zero: yes object(MongoDB\Driver\Cursor)#%d (%d) { %a ["session"]=> NULL %a } ===DONE=== PK.h]4ӣtests/top-valid-002.phptnu[--TEST-- Top-level document validity: Dollar as key in top-level document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0e00000002240002000000610000 {"$":"a"} 0e00000002240002000000610000 ===DONE===PK.h]4,,1tests/manager-ctor-auto_encryption-error-003.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid option types --SKIPIF-- --FILE-- 'string'], [ 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary('', 0)]], 'schemaMap' => 'string', ], [ 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary('', 0)]], 'keyVaultClient' => 'string', ], ]; foreach ($tests as $test) { echo throws(function() use ($test) { $autoEncryptionOptions = ['keyVaultNamespace' => 'admin.dataKeys']; $manager = create_test_manager(null, [], ['autoEncryption' => $autoEncryptionOptions + $test]); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n\n"; } ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "kmsProviders" encryption option to be an array or object OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "schemaMap" encryption option to be an array or object OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "keyVaultClient" encryption option to be MongoDB\Driver\Manager, string given ===DONE=== PK.h]'V'tests/session-getOperationTime-001.phptnu[--TEST-- MongoDB\Driver\Session::getOperationTime() --SKIPIF-- --FILE-- startSession(); echo "Initial operation time:\n"; var_dump($session->getOperationTime()); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); echo "\nOperation time after command:\n"; var_dump($session->getOperationTime()); ?> ===DONE=== --EXPECTF-- Initial operation time: NULL Operation time after command: object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(%d) "%d" ["timestamp"]=> string(%d) "%d" } ===DONE=== PK.h]Z!tests/string-decodeError-001.phptnu[--TEST-- String: bad string length: 0 (but no 0x00 either) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]Ttests/bson-encode-002.phptnu[--TEST-- BSON encoding: Encoding objects into BSON representation --FILE-- "class", "data"); } public function bsonUnserialize(array $data) { echo __METHOD__, "() was called with data:\n"; var_dump($data); } } class NumericArray implements MongoDB\BSON\Serializable, MongoDB\BSON\Unserializable { public function bsonSerialize() { return array(1, 2, 3); } public function bsonUnserialize(array $data) { echo __METHOD__, "() was called with data:\n"; var_dump($data); } } echo "Testing top-level AssociativeArray:\n"; $bson = fromPHP(new AssociativeArray); echo toJSON($bson), "\n"; echo "Encoded BSON:\n"; hex_dump($bson); $value = toPHP($bson, array("root" => 'AssociativeArray')); echo "Decoded BSON:\n"; var_dump($value); echo "\nTesting embedded AssociativeArray:\n"; $bson = fromPHP(array('embed' => new AssociativeArray)); echo toJSON($bson), "\n"; echo "Encoded BSON:\n"; hex_dump($bson); $value = toPHP($bson, array("document" => 'AssociativeArray')); echo "Decoded BSON:\n"; var_dump($value); echo "\nTesting top-level NumericArray:\n"; $bson = fromPHP(new NumericArray); echo toJSON($bson), "\n"; echo "Encoded BSON:\n"; hex_dump($bson); $value = toPHP($bson, array("root" => 'NumericArray')); echo "Decoded BSON:\n"; var_dump($value); echo "\nTesting embedded NumericArray:\n"; $bson = fromPHP(array('embed' => new NumericArray)); echo toJSON($bson), "\n"; echo "Encoded BSON:\n"; hex_dump($bson); $value = toPHP($bson, array("array" => 'NumericArray')); echo "Decoded BSON:\n"; var_dump($value); ?> ===DONE=== --EXPECTF-- Testing top-level AssociativeArray: { "random" : "class", "0" : "data" } Encoded BSON: 0 : 23 00 00 00 02 72 61 6e 64 6f 6d 00 06 00 00 00 [#....random.....] 10 : 63 6c 61 73 73 00 02 30 00 05 00 00 00 64 61 74 [class..0.....dat] 20 : 61 00 00 [a..] AssociativeArray::bsonUnserialize() was called with data: array(2) { ["random"]=> string(5) "class" [0]=> string(4) "data" } Decoded BSON: object(AssociativeArray)#%d (0) { } Testing embedded AssociativeArray: { "embed" : { "random" : "class", "0" : "data" } } Encoded BSON: 0 : 2f 00 00 00 03 65 6d 62 65 64 00 23 00 00 00 02 [/....embed.#....] 10 : 72 61 6e 64 6f 6d 00 06 00 00 00 63 6c 61 73 73 [random.....class] 20 : 00 02 30 00 05 00 00 00 64 61 74 61 00 00 00 [..0.....data...] AssociativeArray::bsonUnserialize() was called with data: array(2) { ["random"]=> string(5) "class" [0]=> string(4) "data" } Decoded BSON: object(stdClass)#%d (1) { ["embed"]=> object(AssociativeArray)#%d (0) { } } Testing top-level NumericArray: { "0" : 1, "1" : 2, "2" : 3 } Encoded BSON: 0 : 1a 00 00 00 10 30 00 01 00 00 00 10 31 00 02 00 [.....0......1...] 10 : 00 00 10 32 00 03 00 00 00 00 [...2......] NumericArray::bsonUnserialize() was called with data: array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } Decoded BSON: object(NumericArray)#%d (0) { } Testing embedded NumericArray: { "embed" : [ 1, 2, 3 ] } Encoded BSON: 0 : 26 00 00 00 04 65 6d 62 65 64 00 1a 00 00 00 10 [&....embed......] 10 : 30 00 01 00 00 00 10 31 00 02 00 00 00 10 32 00 [0......1......2.] 20 : 03 00 00 00 00 00 [......] NumericArray::bsonUnserialize() was called with data: array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } Decoded BSON: object(stdClass)#%d (1) { ["embed"]=> object(NumericArray)#%d (0) { } } ===DONE=== PK.h]$-$tests/bson-decimal128_error-002.phptnu[--TEST-- MongoDB\BSON\Decimal128 cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyDecimal128 %s final class %SMongoDB\BSON\Decimal128%S in %s on line %d PK.h]?__!tests/decimal128-3-valid-243.phptnu[--TEST-- Decimal128: [basx011] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006a000000000000000000000000003e3000 {"d":{"$numberDecimal":"10.6"}} 180000001364006a000000000000000000000000003e3000 ===DONE===PK.h]q"tests/bulkwrite-countable-001.phptnu[--TEST-- MongoDB\Driver\BulkWrite implements Countable --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]D(k((!tests/decimal128-3-valid-073.phptnu[--TEST-- Decimal128: [basx609] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003e3000 {"d":{"$numberDecimal":"0.0"}} 1800000013640000000000000000000000000000003e3000 ===DONE===PK.h]00-tests/server-executeReadWriteCommand-001.phptnu[--TEST-- MongoDB\Driver\Server::executeReadWriteCommand() --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); (new CommandObserver)->observe( function() use ($server) { $command = new MongoDB\Driver\Command( [ 'findAndModify' => NS, 'update' => [ '$set' => [ 'foo' => 'bar' ] ], ] ); $server->executeReadWriteCommand( DATABASE_NAME, $command, [ 'readConcern' => new \MongoDB\Driver\ReadConcern(\MongoDB\Driver\ReadConcern::LOCAL), 'writeConcern' => new \MongoDB\Driver\WriteConcern(\MongoDB\Driver\WriteConcern::MAJORITY), ] ); }, function(stdClass $command) { echo "Read Concern: ", $command->readConcern->level, "\n"; echo "Write Concern: ", $command->writeConcern->w, "\n"; } ); ?> ===DONE=== --EXPECTF-- Read Concern: local Write Concern: majority ===DONE=== PK.h]6u$BB!tests/decimal128-2-valid-009.phptnu[--TEST-- Decimal128: [decq164] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640039300000000000000000000000003cb000 {"d":{"$numberDecimal":"-123.45"}} 1800000013640039300000000000000000000000003cb000 ===DONE===PK.h](%"yLL"tests/bson-minkey-compare-001.phptnu[--TEST-- MongoDB\BSON\MinKey comparisons --FILE-- new MongoDB\BSON\MinKey); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) bool(false) ===DONE=== PK.h]x1tests/bson-timestamp-serialization_error-008.phptnu[--TEST-- MongoDB\BSON\Timestamp unserialization requires strings to parse as 64-bit integers (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "1.23" as 64-bit integer increment for MongoDB\BSON\Timestamp initialization OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "5.67" as 64-bit integer timestamp for MongoDB\BSON\Timestamp initialization ===DONE=== PK.h]lz!tests/decimal128-3-valid-171.phptnu[--TEST-- Decimal128: [basx175] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000363000 {"d":{"$numberDecimal":"0.01265"}} 18000000136400f104000000000000000000000000363000 18000000136400f104000000000000000000000000363000 ===DONE===PK.h]~ggtests/bson-fromPHP-001.phptnu[--TEST-- MongoDB\BSON\fromPHP(): bsonSerialize() allows array and stdClass --FILE-- data = $data; } public function bsonSerialize() { return $this->data; } } $tests = array( array(1, 2, 3), array('foo' => 'bar'), (object) array(1, 2, 3), (object) array('foo' => 'bar'), ); echo "Testing top-level objects\n"; foreach ($tests as $test) { try { echo toJson(fromPHP(new MyDocument($test))), "\n"; } catch (MongoDB\Driver\Exception\UnexpectedValueException $e) { echo $e->getMessage(), "\n"; } } echo "\nTesting nested objects\n"; foreach ($tests as $test) { try { echo toJson(fromPHP(new MyDocument(array('nested' => new MyDocument($test))))), "\n"; } catch (MongoDB\Driver\Exception\UnexpectedValueException $e) { echo $e->getMessage(), "\n"; } } ?> ===DONE=== --EXPECT-- Testing top-level objects { "0" : 1, "1" : 2, "2" : 3 } { "foo" : "bar" } { "0" : 1, "1" : 2, "2" : 3 } { "foo" : "bar" } Testing nested objects { "nested" : [ 1, 2, 3 ] } { "nested" : { "foo" : "bar" } } { "nested" : { "0" : 1, "1" : 2, "2" : 3 } } { "nested" : { "foo" : "bar" } } ===DONE=== PK.h]wl tests/bson-symbol_error-001.phptnu[--TEST-- MongoDB\BSON\Symbol cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MySymbol %s final class %SMongoDB\BSON\Symbol%S in %s on line %d PK.h]KXS2.tests/bson-symbol-serialization_error-002.phptnu[--TEST-- MongoDB\BSON\Symbol unserialization does not allow code to contain null bytes (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Symbol cannot contain null bytes ===DONE=== PK.h]ۻPEtests/top-parseError-012.phptnu[--TEST-- Top-level document validity: Bad $numberDouble (number, not string) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]Co|.tests/commandFailedEvent-getServiceId-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandFailedEvent includes serviceId for load balanced topology --SKIPIF-- --FILE-- getCommandName()); $this->commandStartedServiceId = $event->getServiceId(); var_dump($this->commandStartedServiceId); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { printf("commandFailed: %s\n", $event->getCommandName()); printf("same serviceId as last commandStarted: %s\n", $event->getServiceId() == $this->commandStartedServiceId ? 'yes' : 'no'); var_dump($event->getServiceId()); } } $manager = create_test_manager(); $manager->addSubscriber(new MySubscriber); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$unsupported' => 1]], ]); throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command); }, MongoDB\Driver\Exception\CommandException::class); ?> --EXPECTF-- commandStarted: aggregate object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } commandFailed: aggregate same serviceId as last commandStarted: yes object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } OK: Got MongoDB\Driver\Exception\CommandException PK.h]nn-tests/bson-javascript-get_properties-001.phptnu[--TEST-- MongoDB\BSON\Javascript get_properties handler (get_object_vars) --FILE-- 42]), ]; foreach ($tests as $test) { var_dump(get_object_vars($test)); } ?> ===DONE=== --EXPECTF-- array(2) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> NULL } array(2) { ["code"]=> string(30) "function foo() { return bar; }" ["scope"]=> object(stdClass)#%d (%d) { ["bar"]=> int(42) } } ===DONE=== PK.h]OO&tests/cursor-IteratorIterator-004.phptnu[--TEST-- MongoDB\Driver\Cursor iteration beyond last document (OP_QUERY) --SKIPIF-- =', '3.1'); ?> --FILE-- insert(['_id' => 1]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array(), array('batchSize' => 2))); $iterator = new IteratorIterator($cursor); $iterator->rewind(); var_dump($iterator->current()); $iterator->next(); var_dump($iterator->current()); // libmongoc throws on superfluous iteration of OP_QUERY cursor (CDRIVER-1234) echo throws(function() use ($iterator) { $iterator->next(); }, 'MongoDB\Driver\Exception\RuntimeException'), "\n"; ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["_id"]=> int(1) } NULL OK: Got MongoDB\Driver\Exception\RuntimeException Cannot advance a completed or failed cursor. ===DONE=== PK.h]1)Ahh!tests/decimal128-1-valid-033.phptnu[--TEST-- Decimal128: Scientific - Full --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffffffffffffffffffffffffff403000 {"d":{"$numberDecimal":"5192296858534827628530496329220095"}} 18000000136400ffffffffffffffffffffffffffff403000 ===DONE===PK.h],=tests/bug1015.phptnu[--TEST-- PHPC-1015: Initial DNS Seedlist test --SKIPIF-- --FILE-- selectServer( new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_NEAREST ) ); $servers = $m->getServers(); foreach ( $servers as $server ) { echo $server->getHost(), ':', $server->getPort(), "\n"; } ?> ===DONE=== --EXPECTF-- %d.%d.%d.%d:27017 %d.%d.%d.%d:27018 %d.%d.%d.%d:27019 ===DONE=== PK.h]wP@*tests/monitoring-removeSubscriber-002.phptnu[--TEST-- MongoDB\Driver\Monitoring\removeSubscriber(): Removing one of multiple subscribers --SKIPIF-- --FILE-- instanceName = $instanceName; } public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event ) { echo "- ({$this->instanceName}) - started: ", $event->getCommandName(), "\n"; } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $query = new MongoDB\Driver\Query( [] ); $subscriber1 = new MySubscriber( "ONE" ); $subscriber2 = new MySubscriber( "TWO" ); echo "Before addSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber1 ); echo "After addSubscriber (ONE)\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber2 ); echo "After addSubscriber (TWO)\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\removeSubscriber( $subscriber2 ); echo "After removeSubscriber (TWO)\n"; $cursor = $m->executeQuery( "demo.test", $query ); ?> --EXPECT-- Before addSubscriber After addSubscriber (ONE) - (ONE) - started: find After addSubscriber (TWO) - (ONE) - started: find - (TWO) - started: find After removeSubscriber (TWO) - (ONE) - started: find PK.h]*VxDtests/bug1151-002.phptnu[--TEST-- PHPC-1151: Segfault if session unset before first getMore (aggregate) --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [], 'cursor' => ['batchSize' => 2], ]); $session = $manager->startSession(); $cursor = $manager->executeReadCommand(DATABASE_NAME, $command, ['session' => $session]); foreach ($cursor as $document) { unset($session); echo $document->_id, "\n"; } ?> ===DONE=== --EXPECT-- 1 2 3 ===DONE=== PK.h]V֋%tests/bulkwrite-insert_error-002.phptnu[--TEST-- MongoDB\Driver\BulkWrite::insert() with BSON encoding error (invalid UTF-8 string) --FILE-- insert(['x' => "\xc3\x28"]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "x": %s ===DONE=== PK.h] %&tests/decimal128-7-parseError-020.phptnu[--TEST-- Decimal128: [basx549] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] ~/O!tests/decimal128-3-valid-223.phptnu[--TEST-- Decimal128: [basx329] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000003c3000 {"d":{"$numberDecimal":"0.10"}} 180000001364000a000000000000000000000000003c3000 180000001364000a000000000000000000000000003c3000 ===DONE===PK.h] PP&tests/manager-set-uri-options-001.phptnu[--TEST-- MongoDB\Driver\Manager: Logging into MongoDB using credentials from $options --SKIPIF-- --FILE-- $url["user"], "password" => $url["pass"], ) + $args; $manager = create_test_manager($dsn, $options); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(array("my" => "value")); $inserted = $manager->executeBulkWrite(NS, $bulk)->getInsertedCount(); printf("Inserted: %d\n", $inserted); $options["username"] = "not-found-user"; $manager = create_test_manager($dsn, $options); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(array("my" => "value")); echo throws(function() use ($manager, $bulk) { $inserted = $manager->executeBulkWrite(NS, $bulk)->getInsertedCount(); printf("Incorrectly inserted: %d\n", $inserted); }, 'MongoDB\Driver\Exception\BulkWriteException'), "\n"; ?> ===DONE=== --EXPECTF-- Inserted: 1 OK: Got MongoDB\Driver\Exception\BulkWriteException Bulk write failed due to previous MongoDB\Driver\Exception\AuthenticationException: Authentication failed. ===DONE=== PK.h]'j``)tests/manager-executeReadCommand-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeReadCommand() --SKIPIF-- --FILE-- observe( function() use ($manager) { $command = new MongoDB\Driver\Command( [ 'aggregate' => NS, 'pipeline' => [], 'cursor' => new stdClass(), ] ); $manager->executeReadCommand( DATABASE_NAME, $command, [ 'readPreference' => new \MongoDB\Driver\ReadPreference(\MongoDB\Driver\ReadPreference::RP_SECONDARY), 'readConcern' => new \MongoDB\Driver\ReadConcern(\MongoDB\Driver\ReadConcern::MAJORITY), ] ); }, function(stdClass $command) { echo "Read Preference: ", $command->{'$readPreference'}->mode, "\n"; echo "Read Concern: ", $command->readConcern->level, "\n"; } ); ?> ===DONE=== --EXPECTF-- Read Preference: secondary Read Concern: majority ===DONE=== PK.h]uw1  'tests/manager-executeBulkWrite-004.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() delete multiple documents --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 1)); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->delete(array('x' => 1), array('limit' => 0)); $result = $manager->executeBulkWrite(NS, $bulk); echo "\n===> WriteResult\n"; printWriteResult($result); echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- ===> WriteResult server: %s:%d insertedCount: 0 matchedCount: 0 modifiedCount: 0 upsertedCount: 0 deletedCount: 2 ===> Collection array(0) { } ===DONE=== PK.h]Mt//!tests/decimal128-2-valid-089.phptnu[--TEST-- Decimal128: [decq441] exponent lengths --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000403000 {"d":{"$numberDecimal":"7"}} 180000001364000700000000000000000000000000403000 ===DONE===PK.h]e9(tests/readpreference-ctor_error-006.phptnu[--TEST-- MongoDB\Driver\ReadPreference construction (invalid type for mode) --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected mode to be integer or string, %r(double|float)%r given ===DONE=== PK.h]ٓtests/manager-as-singleton.phptnu[--TEST-- PHPC-431: Segfault when using Manager through singleton class --SKIPIF-- --FILE-- Database = $Manager; } public static function getInstance() { if (static::$Instance == null) { static::$Instance = new Database(); } return static::$Instance; } public function query($scheme, $query) { return $this->Database->executeQuery($scheme, $query, new ReadPreference(ReadPreference::RP_PRIMARY)); } } class App { public function run() { $db = Database::getInstance(); $query = new Query(array()); $cursor = $db->query(DATABASE_NAME . ".scheme_info", $query); foreach ($cursor as $document) { echo $document->value; } $query = new Query(array()); $cursor = $db->query(DATABASE_NAME . ".domain", $query); foreach ($cursor as $document) { echo $document->hostname; } } } $App = new App(); $App->run(); echo "All done\n"; ?> ===DONE=== --EXPECT-- All done ===DONE=== PK.h]33!tests/decimal128-3-valid-179.phptnu[--TEST-- Decimal128: [basx157] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000400000000000000000000000000523000 {"d":{"$numberDecimal":"4E+9"}} 180000001364000400000000000000000000000000523000 ===DONE===PK.h]!Z"",tests/serverApi-serialization_error-002.phptnu[--TEST-- MongoDB\Driver\ServerApi unserialization errors (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "version" field to be string OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "strict" field to be bool or null OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "deprecationErrors" field to be bool or null ===DONE=== PK.h]N&tests/writeconcern-getjournal-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern::getJournal() --FILE-- getJournal()); } // Test with default value $wc = new MongoDB\Driver\WriteConcern(1, 0); var_dump($wc->getJournal()); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(true) bool(false) NULL NULL ===DONE=== PK.h]~#tests/manager-executeQuery-006.phptnu[--TEST-- MongoDB\Driver\Manager::executeQuery() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); $pinnedServer = $session->getServer(); var_dump($pinnedServer instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); $session->commitTransaction(); var_dump($session->getServer() == $pinnedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(false) bool(false) bool(true) bool(true) bool(false) ===DONE=== PK.h])M!tests/decimal128-3-valid-219.phptnu[--TEST-- Decimal128: [basx351] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000263000 {"d":{"$numberDecimal":"1.0E-12"}} 180000001364000a00000000000000000000000000263000 180000001364000a00000000000000000000000000263000 ===DONE===PK.h]͉99tests/bug0528.phptnu[--TEST-- PHPC-528: Cannot append reference to BSON --FILE-- &$embedded]; $bson = fromPHP($data); echo toJson(fromPHP($data)), "\n"; ?> ===DONE=== --EXPECT-- { "embedded" : [ "foo" ] } ===DONE=== PK.h],F tests/query-ctor-003.phptnu[--TEST-- MongoDB\Driver\Query construction with modifier options --FILE-- 1], [ 'modifiers' => [ '$comment' => 'foo', '$max' => ['y' => 100], '$maxScan' => 50, '$maxTimeMS' => 1000, '$min' => ['y' => 1], '$orderby' => ['y' => -1], '$returnKey' => false, '$showDiskLoc' => false, '$snapshot' => false, ], ] )); var_dump(new MongoDB\Driver\Query( ['x' => 1], ['modifiers' => ['$explain' => true]] )); var_dump(new MongoDB\Driver\Query( ['x' => 1], ['modifiers' => ['$hint' => 'y_1']] )); var_dump(new MongoDB\Driver\Query( ['x' => 1], ['modifiers' => ['$hint' => ['y' => 1]]] )); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Query::__construct(): The "$maxScan" option is deprecated and will be removed in a future release in %s on line %d Deprecated: MongoDB\Driver\Query::__construct(): The "$snapshot" option is deprecated and will be removed in a future release in %s on line %d object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["comment"]=> string(3) "foo" ["max"]=> object(stdClass)#%d (%d) { ["y"]=> int(100) } ["maxScan"]=> int(50) ["maxTimeMS"]=> int(1000) ["min"]=> object(stdClass)#%d (%d) { ["y"]=> int(1) } ["returnKey"]=> bool(false) ["showRecordId"]=> bool(false) ["sort"]=> object(stdClass)#%d (%d) { ["y"]=> int(-1) } ["snapshot"]=> bool(false) } ["readConcern"]=> NULL } object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["explain"]=> bool(true) } ["readConcern"]=> NULL } object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["hint"]=> string(3) "y_1" } ["readConcern"]=> NULL } object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["hint"]=> object(stdClass)#%d (%d) { ["y"]=> int(1) } } ["readConcern"]=> NULL } ===DONE=== PK.h]v  ,tests/bson-javascript-serialization-001.phptnu[--TEST-- MongoDB\BSON\Javascript serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- 42]], ['function foo() { return id; }', ['id' => new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4603')]], ]; foreach ($tests as $test) { list($code, $scope) = $test; var_dump($js = new MongoDB\BSON\Javascript($code, $scope)); var_dump($s = serialize($js)); var_dump(unserialize($s)); echo "\n"; } ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> NULL } string(108) "C:23:"MongoDB\BSON\Javascript":72:{a:2:{s:4:"code";s:33:"function foo(bar) { return bar; }";s:5:"scope";N;}}" object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> NULL } object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> object(stdClass)#%d (%d) { } } string(125) "C:23:"MongoDB\BSON\Javascript":89:{a:2:{s:4:"code";s:33:"function foo(bar) { return bar; }";s:5:"scope";O:8:"stdClass":0:{}}}" object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> object(stdClass)#%d (%d) { } } object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(30) "function foo() { return foo; }" ["scope"]=> object(stdClass)#%d (%d) { ["foo"]=> int(42) } } string(138) "C:23:"MongoDB\BSON\Javascript":101:{a:2:{s:4:"code";s:30:"function foo() { return foo; }";s:5:"scope";O:8:"stdClass":1:{s:3:"foo";i:42;}}}" object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(30) "function foo() { return foo; }" ["scope"]=> object(stdClass)#%d (%d) { ["foo"]=> int(42) } } object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(29) "function foo() { return id; }" ["scope"]=> object(stdClass)#%d (%d) { ["id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } } } string(213) "C:23:"MongoDB\BSON\Javascript":176:{a:2:{s:4:"code";s:29:"function foo() { return id; }";s:5:"scope";O:8:"stdClass":1:{s:2:"id";C:21:"MongoDB\BSON\ObjectId":48:{a:1:{s:3:"oid";s:24:"53e2a1c40640fd72175d4603";}}}}}" object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(29) "function foo() { return id; }" ["scope"]=> object(stdClass)#%d (%d) { ["id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } } } ===DONE=== PK.h]w!tests/decimal128-3-valid-193.phptnu[--TEST-- Decimal128: [basx389] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000003c3000 {"d":{"$numberDecimal":"0.07"}} 1800000013640007000000000000000000000000003c3000 1800000013640007000000000000000000000000003c3000 ===DONE===PK.h]X>tests/bson-dbpointer-002.phptnu[--TEST-- MongoDB\BSON\DBPointer debug handler --FILE-- dbref); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\DBPointer)#1 (2) { ["ref"]=> string(11) "phongo.test" ["id"]=> string(24) "5a2e78accd485d55b405ac12" } ===DONE=== PK.h]Iz??tests/manager-wakeup.phptnu[--TEST-- MongoDB\Driver\Manager: Manager cannot be woken up --SKIPIF-- =', '7.99'); ?> --FILE-- __wakeup(); }, MongoDB\Driver\Exception\RuntimeException::class), "\n"; echo throws(function() use ($manager) { $manager->__wakeup(1, 2); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\RuntimeException MongoDB\Driver objects cannot be serialized OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Manager::__wakeup() expects exactly 0 %r(argument|parameter)%rs, 2 given ===DONE=== PK.h]AkS  (tests/readconcern-serialization-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadConcern)#%d (%d) { } bool(true) C:26:"MongoDB\Driver\ReadConcern":0:{} object(MongoDB\Driver\ReadConcern)#%d (%d) { } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(12) "linearizable" } bool(true) C:26:"MongoDB\Driver\ReadConcern":38:{a:1:{s:5:"level";s:12:"linearizable";}} object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(12) "linearizable" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(5) "local" } bool(true) C:26:"MongoDB\Driver\ReadConcern":30:{a:1:{s:5:"level";s:5:"local";}} object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(5) "local" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "majority" } bool(true) C:26:"MongoDB\Driver\ReadConcern":33:{a:1:{s:5:"level";s:8:"majority";}} object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "majority" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(9) "available" } bool(true) C:26:"MongoDB\Driver\ReadConcern":34:{a:1:{s:5:"level";s:9:"available";}} object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(9) "available" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "snapshot" } bool(true) C:26:"MongoDB\Driver\ReadConcern":33:{a:1:{s:5:"level";s:8:"snapshot";}} object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "snapshot" } ===DONE=== PK.h],> #tests/document-decodeError-001.phptnu[--TEST-- Document type (sub-documents): Subdocument length too long: eats outer terminator --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]433!tests/decimal128-2-valid-101.phptnu[--TEST-- Decimal128: [decq703] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001300000000000000000000000000403000 {"d":{"$numberDecimal":"19"}} 180000001364001300000000000000000000000000403000 ===DONE===PK.h]$H&tests/decimal128-7-parseError-001.phptnu[--TEST-- Decimal128: [basx572] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]f!tests/decimal128-3-valid-206.phptnu[--TEST-- Decimal128: [basx367] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000523000 {"d":{"$numberDecimal":"7E+9"}} 180000001364000700000000000000000000000000523000 180000001364000700000000000000000000000000523000 ===DONE===PK.h]zWaa!tests/decimal128-3-valid-133.phptnu[--TEST-- Decimal128: [basx015] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364007b000000000000000000000000003a3000 {"d":{"$numberDecimal":"0.123"}} 180000001364007b000000000000000000000000003a3000 ===DONE===PK.h]dDE E tests/cursor-rewind-001.phptnu[--TEST-- MongoDB\Driver\Cursor cannot rewind after starting iteration --SKIPIF-- --FILE-- name = (string) $name; } public function dump() { $key = parent::key(); $current = parent::current(); $position = is_int($key) ? (string) $key : 'null'; $document = is_object($current) ? sprintf("{_id: %d}", $current->_id) : 'null'; printf("%s: %s => %s\n", $this->name, $position, $document); } } $manager = create_test_manager(); $bulkWrite = new MongoDB\Driver\BulkWrite; for ($i = 0; $i < 5; $i++) { $bulkWrite->insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); $a = new MyIteratorIterator($cursor, 'A'); echo "\nRewinding sets the current element:\n"; $a->rewind(); $a->dump(); echo "\nRewinding again is OK since we haven't advanced:\n"; $a->rewind(); $a->dump(); echo "\nAdvancing populates the next element:\n"; $a->next(); $a->dump(); echo "\nRewinding after advancing is not OK:\n"; try { $a->rewind(); echo "FAILED: rewind should throw if iteration has started\n"; } catch (MongoDB\Driver\Exception\LogicException $e) { printf("LogicException: %s\n", $e->getMessage()); } echo "\nAdvancing through remaining elements:\n"; $a->next(); $a->dump(); $a->next(); $a->dump(); $a->next(); $a->dump(); echo "\nAdvancing beyond the last element:\n"; $a->next(); $a->dump(); ?> ===DONE=== --EXPECT-- Inserted: 5 Rewinding sets the current element: A: 0 => {_id: 0} Rewinding again is OK since we haven't advanced: A: 0 => {_id: 0} Advancing populates the next element: A: 1 => {_id: 1} Rewinding after advancing is not OK: LogicException: Cursors cannot rewind after starting iteration Advancing through remaining elements: A: 2 => {_id: 2} A: 3 => {_id: 3} A: 4 => {_id: 4} Advancing beyond the last element: A: null => null ===DONE=== PK.h]p&tests/decimal128-6-parseError-006.phptnu[--TEST-- Decimal128: 2 decimal places --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]̀G\\+tests/manager-executeCommand_error-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() should not issue warning before exception --FILE-- 1]); // Invalid host cannot be resolved $manager = create_test_manager('mongodb://example.invalid:27017', ['serverSelectionTimeoutMS' => 1]); echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command); }, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n"; // Valid host refuses connection $manager = create_test_manager('mongodb://localhost:54321', ['serverSelectionTimeoutMS' => 1]); echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command); }, 'MongoDB\Driver\Exception\ConnectionTimeoutException'), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s ===DONE=== PK.h]%+tests/manager-ctor-driver-metadata-001.phptnu[--TEST-- MongoDB\Driver\Manager: Pass custom handshake data --DESCRIPTION-- This test matches spaces at the end of the handshake data it appends. The only way to see final output is by checking against the binary socket communication: [2021-02-17T13:57:57.155166+00:00] socket: TRACE > 00100: 66 6f 72 6d 00 76 00 00 00 50 48 50 20 37 2e 34 f o r m . v . . . P H P 7 . 4 [2021-02-17T13:57:57.155182+00:00] socket: TRACE > 00110: 2e 31 35 20 2f 20 6d 69 6e 65 20 63 66 67 3d 30 . 1 5 / m i n e c f g = 0 Since matching this is not trivial, we're happy matching the trailing space at the end of each handshake data item. --INI-- mongodb.debug=stderr --FILE-- ['name' => 'test', 'version' => '0.1', 'platform' => 'mine']]); $manager = new MongoDB\Driver\Manager(null, [], ['driver' => ['name' => 'test']]); ?> ===DONE=== --EXPECTF-- %A[%s] PHONGO: DEBUG > Setting driver handshake data: { name: 'ext-mongodb:PHP / test ', version: '%s / 0.1 ', platform: 'PHP %s / mine ' } %A[%s] PHONGO: DEBUG > Setting driver handshake data: { name: 'ext-mongodb:PHP / test ', version: '%s ', platform: 'PHP %s ' } %A===DONE===%A PK.h]Gs*tests/bson-binary-set_state_error-003.phptnu[--TEST-- MongoDB\BSON\Binary::__set_state() requires 16-byte data length for UUID types --FILE-- '0123456789abcde', 'type' => MongoDB\BSON\Binary::TYPE_OLD_UUID]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Binary::__set_state(['data' => '0123456789abcdefg', 'type' => MongoDB\BSON\Binary::TYPE_OLD_UUID]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Binary::__set_state(['data' => '0123456789abcde', 'type' => MongoDB\BSON\Binary::TYPE_UUID]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Binary::__set_state(['data' => '0123456789abcdefg', 'type' => MongoDB\BSON\Binary::TYPE_UUID]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 15 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 17 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 15 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 17 given ===DONE=== PK.h]M ߆!tests/decimal128-2-valid-086.phptnu[--TEST-- Decimal128: [decq036] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000807f1bcf85b27059c8a43cfe5f00 {"d":{"$numberDecimal":"1.230000000000000000000000000000000E+6144"}} 18000000136400000000807f1bcf85b27059c8a43cfe5f00 ===DONE===PK.h]XFYY!tests/decimal128-5-valid-036.phptnu[--TEST-- Decimal128: [decq603] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000081efac855b416d2dee04fe5f00 {"d":{"$numberDecimal":"1.00000000000000000000000000000000E+6143"}} 180000001364000000000081efac855b416d2dee04fe5f00 180000001364000000000081efac855b416d2dee04fe5f00 ===DONE===PK.h]:yy1tests/readpreference-serialization_error-002.phptnu[--TEST-- MongoDB\Driver\ReadPreference unserialization errors (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires specific values for "mode" string field OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "mode" field to be string ===DONE=== PK.h]P55!tests/decimal128-2-valid-037.phptnu[--TEST-- Decimal128: [decq426] negative zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003cb000 {"d":{"$numberDecimal":"-0.00"}} 1800000013640000000000000000000000000000003cb000 ===DONE===PK.h]/II!tests/decimal128-2-valid-130.phptnu[--TEST-- Decimal128: [decq743] DPD: one of each of the huffman groups --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006d03000000000000000000000000403000 {"d":{"$numberDecimal":"877"}} 180000001364006d03000000000000000000000000403000 ===DONE===PK.h]L,tests/serverApi-serialization_error-001.phptnu[--TEST-- MongoDB\Driver\ServerApi unserialization errors (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "version" field to be string OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "strict" field to be bool or null OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "deprecationErrors" field to be bool or null ===DONE=== PK.h]5@@'tests/monitoring-addSubscriber-004.phptnu[--TEST-- MongoDB\Driver\Monitoring\addSubscriber(): Adding three subscribers --SKIPIF-- --FILE-- instanceName = $instanceName; } public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event ) { echo "- ({$this->instanceName}) - started: ", $event->getCommandName(), "\n"; } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $query = new MongoDB\Driver\Query( [] ); $subscriber1 = new MySubscriber( "ONE" ); $subscriber2 = new MySubscriber( "TWO" ); $subscriber3 = new MySubscriber( "THR" ); echo "Before addSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber1 ); echo "After addSubscriber (ONE)\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber2 ); echo "After addSubscriber (TWO)\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber3 ); echo "After addSubscriber (THR)\n"; $cursor = $m->executeQuery( "demo.test", $query ); ?> --EXPECT-- Before addSubscriber After addSubscriber (ONE) - (ONE) - started: find After addSubscriber (TWO) - (ONE) - started: find - (TWO) - started: find After addSubscriber (THR) - (ONE) - started: find - (TWO) - started: find - (THR) - started: find PK.h])vtests/bulkwrite-debug-001.phptnu[--TEST-- MongoDB\Driver\BulkWrite debug output before execution --FILE-- true], ['ordered' => false], ['bypassDocumentValidation' => true], ['bypassDocumentValidation' => false], ]; foreach ($tests as $options) { var_dump(new MongoDB\Driver\BulkWrite($options)); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> NULL ["collection"]=> NULL ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(false) ["server_id"]=> int(0) ["session"]=> NULL ["write_concern"]=> NULL } object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> NULL ["collection"]=> NULL ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(false) ["server_id"]=> int(0) ["session"]=> NULL ["write_concern"]=> NULL } object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> NULL ["collection"]=> NULL ["ordered"]=> bool(false) ["bypassDocumentValidation"]=> NULL ["executed"]=> bool(false) ["server_id"]=> int(0) ["session"]=> NULL ["write_concern"]=> NULL } object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> NULL ["collection"]=> NULL ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> bool(true) ["executed"]=> bool(false) ["server_id"]=> int(0) ["session"]=> NULL ["write_concern"]=> NULL } object(MongoDB\Driver\BulkWrite)#%d (%d) { ["database"]=> NULL ["collection"]=> NULL ["ordered"]=> bool(true) ["bypassDocumentValidation"]=> bool(false) ["executed"]=> bool(false) ["server_id"]=> int(0) ["session"]=> NULL ["write_concern"]=> NULL } ===DONE=== PK.h]==!tests/decimal128-1-valid-025.phptnu[--TEST-- Decimal128: Scientific - Negative Tiny --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000008000 {"d":{"$numberDecimal":"-1E-6176"}} 180000001364000100000000000000000000000000008000 ===DONE===PK.h]ixUU.tests/bson-utcdatetime-get_properties-002.phptnu[--TEST-- MongoDB\BSON\UTCDateTime get_properties handler (foreach) --FILE-- $value) { var_dump($key); var_dump($value); } ?> ===DONE=== --EXPECT-- string(12) "milliseconds" string(13) "1416445411987" ===DONE=== PK.h]~f::!tests/decimal128-3-valid-094.phptnu[--TEST-- Decimal128: [basx648] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000004e3000 {"d":{"$numberDecimal":"0E+7"}} 1800000013640000000000000000000000000000004e3000 1800000013640000000000000000000000000000004e3000 ===DONE===PK.h]k'tests/manager-executeBulkWrite-005.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() insert one document --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $result = $manager->executeBulkWrite(NS, $bulk); echo "\n===> WriteResult\n"; printWriteResult($result); echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- ===> WriteResult server: %s:%d insertedCount: 1 matchedCount: 0 modifiedCount: 0 upsertedCount: 0 deletedCount: 0 ===> Collection array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(1) } } ===DONE=== PK.h]^H&tests/decimal128-7-parseError-019.phptnu[--TEST-- Decimal128: [basx525] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]e"  'tests/manager-executeBulkWrite-010.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() update multiple documents with upsert --SKIPIF-- --FILE-- update( array('_id' => 1), array('$set' => array('x' => 1)), array('multi' => true, 'upsert' => true) ); $result = $manager->executeBulkWrite(NS, $bulk); echo "\n===> WriteResult\n"; printWriteResult($result); echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- ===> WriteResult server: %s:%d insertedCount: 0 matchedCount: 0 modifiedCount: 0 upsertedCount: 1 deletedCount: 0 upsertedId[0]: int(1) ===> Collection array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(1) } } ===DONE=== PK.h] ESS$tests/readconcern-isdefault-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern::isDefault() --FILE-- getReadConcern(), (new MongoDB\Driver\Manager('mongodb://127.0.0.1/?readconcernlevel='))->getReadConcern(), (new MongoDB\Driver\Manager(null, ['readconcernlevel' => 'local']))->getReadConcern(), (new MongoDB\Driver\Manager(null, ['readconcernlevel' => '']))->getReadConcern(), // Cannot test ['readconcernlevel' => null] since a string type is expected (PHPC-887) (new MongoDB\Driver\Manager)->getReadConcern(), ]; foreach ($tests as $rc) { var_dump($rc->isDefault()); } ?> ===DONE=== --EXPECT-- bool(true) bool(true) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(true) ===DONE=== PK.h]`ՀPtests/bson-timestamp-005.phptnu[--TEST-- MongoDB\BSON\Timestamp constructor requires positive unsigned 32-bit integers (as string) --FILE-- ===DONE=== --EXPECTF-- Test [2147483647:0] object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "2147483647" ["timestamp"]=> string(1) "0" } Test [0:2147483647] object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "2147483647" } Test [4294967295:0] object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "4294967295" ["timestamp"]=> string(1) "0" } Test [0:4294967295] object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "4294967295" } ===DONE=== PK.h]KI&tests/bson-javascript-compare-001.phptnu[--TEST-- MongoDB\BSON\Javascript comparisons (without scope) --FILE-- new MongoDB\BSON\Javascript('function() { return 0; }')); ?> ===DONE=== --EXPECT-- bool(true) bool(true) bool(true) ===DONE=== PK.h]ҥ^!tests/symbol-decodeError-005.phptnu[--TEST-- Symbol: symbol is not null-terminated --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]dOtests/manager-var-dump-001.phptnu[--TEST-- MongoDB\Driver\Manager debug output --SKIPIF-- --FILE-- insert(array("my" => "value")); $retval = $manager->executeBulkWrite(NS, $bulk); var_dump($manager); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Manager)#%d (%d) { ["uri"]=> string(%d) "mongodb://%s" ["cluster"]=> array(0) { } } object(MongoDB\Driver\Manager)#%d (%d) { ["uri"]=> string(%d) "mongodb://%s" ["cluster"]=> array(1) { [0]=> array(10) { ["host"]=> string(%d) "%s" ["port"]=> int(%d) ["type"]=> int(1) ["is_primary"]=> bool(false) ["is_secondary"]=> bool(false) ["is_arbiter"]=> bool(false) ["is_hidden"]=> bool(false) ["is_passive"]=> bool(false) ["last_hello_response"]=> array(%d) { %a } ["round_trip_time"]=> int(%d) } } } ===DONE=== PK.h]X\&tests/cursor-IteratorIterator-002.phptnu[--TEST-- MongoDB\Driver\Cursor command result iteration through IteratorIterator --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 1)); $manager->executeBulkWrite(NS, $bulk); $command = new MongoDB\Driver\Command(array( 'aggregate' => COLLECTION_NAME, 'pipeline' => array( array('$match' => array('x' => 1)), ), 'cursor' => new stdClass, )); $cursor = $manager->executeCommand(DATABASE_NAME, $command); foreach (new IteratorIterator($cursor) as $document) { var_dump($document); } ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(1) } object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(1) } ===DONE=== PK.h]™9jj&tests/bson-dbpointer-tostring-001.phptnu[--TEST-- MongoDB\BSON\DBPointer::__toString() --FILE-- dbref; var_dump((string) $dbref); ?> ===DONE=== --EXPECT-- string(38) "[phongo.test/5a2e78accd485d55b4050000]" ===DONE=== PK.h]r!R//+tests/bson-timestamp-serialization-004.phptnu[--TEST-- MongoDB\BSON\Timestamp serialization (__serialize and __unserialize) (64-bit) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "4294967295" ["timestamp"]=> string(1) "0" } string(92) "O:22:"MongoDB\BSON\Timestamp":2:{s:9:"increment";s:10:"4294967295";s:9:"timestamp";s:1:"0";}" object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "4294967295" ["timestamp"]=> string(1) "0" } object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "4294967295" } string(92) "O:22:"MongoDB\BSON\Timestamp":2:{s:9:"increment";s:1:"0";s:9:"timestamp";s:10:"4294967295";}" object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "4294967295" } ===DONE=== PK.h]יpbb!tests/decimal128-2-valid-154.phptnu[--TEST-- Decimal128: [decq831] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000001000000000000000000403000 {"d":{"$numberDecimal":"4294967297"}} 180000001364000100000001000000000000000000403000 ===DONE===PK.h]#b%[[*tests/bson-utcdatetime-todatetime-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime::toDateTime() --INI-- date.timezone=America/Los_Angeles --FILE-- toDateTime(); var_dump($datetime->format(DATE_RSS)); ?> ===DONE=== --EXPECT-- string(31) "Thu, 20 Nov 2014 01:03:31 +0000" ===DONE=== PK.h]bXX!tests/decimal128-2-valid-136.phptnu[--TEST-- Decimal128: [decq770] DPD all-highs cases (includes the 24 redundant codes) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400dc03000000000000000000000000403000 {"d":{"$numberDecimal":"988"}} 18000000136400dc03000000000000000000000000403000 ===DONE===PK.h]Ԁ[+ +tests/manager-executeCommand_error-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() with invalid options (MONGOC_CMD_RAW) --SKIPIF-- --FILE-- 1]); echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command, ['readConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command, ['readConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command, ['readPreference' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command, ['readPreference' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command, ['writeConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command, ['writeConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given ===DONE=== PK.h]O!tests/decimal128-1-valid-054.phptnu[--TEST-- Decimal128: Rounded Subnormal number --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000000000 {"d":{"$numberDecimal":"1E-6176"}} 180000001364000100000000000000000000000000000000 180000001364000100000000000000000000000000000000 ===DONE===PK.h],g!tests/decimal128-2-valid-088.phptnu[--TEST-- Decimal128: [decq034] Nmax and similar --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f2af967ed05c82de3297ff6fde3cfe5f00 {"d":{"$numberDecimal":"1.234567890123456789012345678901234E+6144"}} 18000000136400f2af967ed05c82de3297ff6fde3cfe5f00 ===DONE===PK.h]S&tests/decimal128-7-parseError-024.phptnu[--TEST-- Decimal128: [basx582] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]bj ~ ~ )tests/server-executeWriteCommand-002.phptnu[--TEST-- MongoDB\Driver\Server::executeWriteCommand() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $servers = $manager->getServers(); $selectedServer = array_pop($servers); $wrongServer = array_pop($servers); var_dump($selectedServer != $wrongServer); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['_id' => 'foo'], 'upsert' => true, 'new' => true, 'update' => ['x' => 1] ]); $selectedServer->executeWriteCommand(DATABASE_NAME, $command, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); echo throws(function () use ($wrongServer, $session) { $command = new MongoDB\Driver\Command([ 'findAndModify' => COLLECTION_NAME, 'query' => ['_id' => 'foo'], 'upsert' => true, 'new' => true, 'update' => ['x' => 1] ]); $wrongServer->executeWriteCommand(DATABASE_NAME, $command, ['session' => $session]); }, \MongoDB\Driver\Exception\RuntimeException::class), "\n"; $session->commitTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) OK: Got MongoDB\Driver\Exception\RuntimeException Requested server id does not matched pinned server id bool(true) bool(false) ===DONE=== PK.h]]?:II!tests/decimal128-5-valid-006.phptnu[--TEST-- Decimal128: [decq080] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000000000 {"d":{"$numberDecimal":"1.0E-6175"}} 180000001364000a00000000000000000000000000000000 ===DONE===PK.h]* tests/readconcern-constants.phptnu[--TEST-- MongoDB\Driver\ReadConcern constants --FILE-- ===DONE=== --EXPECTF-- string(12) "linearizable" string(5) "local" string(8) "majority" string(9) "available" string(8) "snapshot" ===DONE=== PK.h]#tests/datetime-decodeError-001.phptnu[--TEST-- DateTime: datetime field truncated --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]uHqq-tests/bson-regex-serialization_error-002.phptnu[--TEST-- MongoDB\BSON\Regex unserialization does not allow pattern or flags to contain null bytes (Serializable interface) --DESCRIPTION-- BSON Corpus spec prose test #1 --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Pattern cannot contain null bytes OK: Got MongoDB\Driver\Exception\InvalidArgumentException Flags cannot contain null bytes ===DONE=== PK.h]!tests/decimal128-3-valid-105.phptnu[--TEST-- Decimal128: [basx685] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]W**!tests/decimal128-2-valid-038.phptnu[--TEST-- Decimal128: [decq410] zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000463000 {"d":{"$numberDecimal":"0E+3"}} 180000001364000000000000000000000000000000463000 ===DONE===PK.h]7&tests/server-executeBulkWrite-003.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() with legacy write concern (replica set primary) --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); $writeConcerns = array(0, 1, 2, MongoDB\Driver\WriteConcern::MAJORITY); foreach ($writeConcerns as $wc) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array('wc' => $wc)); $result = $server->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern($wc)); var_dump($result->isAcknowledged()); var_dump($result->getInsertedCount()); } ?> ===DONE=== --EXPECT-- bool(false) NULL bool(true) int(1) bool(true) int(1) bool(true) int(1) ===DONE=== PK.h]4=}}!tests/decimal128-2-valid-085.phptnu[--TEST-- Decimal128: [decq076] Nmin and below --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400010000000a5bc138938d44c64d31000000 {"d":{"$numberDecimal":"1.000000000000000000000000000000001E-6143"}} 18000000136400010000000a5bc138938d44c64d31000000 ===DONE===PK.h]M,,!tests/decimal128-3-valid-042.phptnu[--TEST-- Decimal128: [basx615] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003cb000 {"d":{"$numberDecimal":"-0.00"}} 1800000013640000000000000000000000000000003cb000 ===DONE===PK.h] !tests/decimal128-3-valid-081.phptnu[--TEST-- Decimal128: [basx642] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000423000 {"d":{"$numberDecimal":"0E+1"}} 180000001364000000000000000000000000000000423000 180000001364000000000000000000000000000000423000 ===DONE===PK.h]22/tests/bulkwriteexception-haserrorlabel-001.phptnu[--TEST-- MongoDB\Driver\Exception\BulkWriteException::hasErrorLabel() --FILE-- getProperty('errorLabels'); $resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('foo')); var_dump($exception->hasErrorLabel('bar')); ?> ===DONE=== --EXPECT-- bool(true) bool(false) ===DONE=== PK.h]$HH!tests/cursorid-set_state-001.phptnu[--TEST-- MongoDB\Driver\CursorId::__set_state() --FILE-- '7250031947823432848', ])); echo "\n"; ?> ===DONE=== --EXPECTF-- MongoDB\Driver\CursorId::__set_state(array( 'id' => %r(7250031947823432848|'7250031947823432848')%r, )) ===DONE=== PK.h]Q&tests/decimal128-6-parseError-029.phptnu[--TEST-- Decimal128: Invalid --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]_$$#tests/document-decodeError-003.phptnu[--TEST-- Document type (sub-documents): Invalid subdocument: bad string length in field --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]Q9tests/top-parseError-038.phptnu[--TEST-- Top-level document validity: Bad $maxKey (wrong integer) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]M!tests/decimal128-1-valid-002.phptnu[--TEST-- Decimal128: Special - Negative NaN --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000000fc00 {"d":{"$numberDecimal":"NaN"}} ===DONE===PK.h]伻YY!tests/decimal128-3-valid-101.phptnu[--TEST-- Decimal128: [basx001] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 ===DONE===PK.h]!tests/decimal128-1-valid-049.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - -infinity --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000000f800 {"d":{"$numberDecimal":"-Infinity"}} 18000000136400000000000000000000000000000000f800 18000000136400000000000000000000000000000000f800 ===DONE===PK.h]Hdd!tests/decimal128-2-valid-005.phptnu[--TEST-- Decimal128: [decq820] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400feffff7f0000000000000000000040b000 {"d":{"$numberDecimal":"-2147483646"}} 18000000136400feffff7f0000000000000000000040b000 ===DONE===PK.h]lԻ>>!tests/code_w_scope-valid-001.phptnu[--TEST-- Javascript Code with Scope: Empty code string, empty scope --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 160000000f61000e0000000100000000050000000000 {"a":{"$code":"","$scope":{}}} 160000000f61000e0000000100000000050000000000 ===DONE===PK.h]k!tests/decimal128-3-valid-213.phptnu[--TEST-- Decimal128: [basx305] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000543000 {"d":{"$numberDecimal":"1.0E+11"}} 180000001364000a00000000000000000000000000543000 180000001364000a00000000000000000000000000543000 ===DONE===PK.h]CG,tests/transaction-integration_error-001.phptnu[--TEST-- MongoDB\Driver\Session: Setting per-op readConcern or writeConcern in transaction (executeCommand) --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); /* Do the transaction */ $session = $manager->startSession(); $session->startTransaction( [ 'readConcern' => new \MongoDB\Driver\ReadConcern( "snapshot" ), 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); echo throws(function() use ($manager, $session) { $cmd = new \MongoDB\Driver\Command( [ 'update' => COLLECTION_NAME, 'updates' => [ [ 'q' => [ 'employee' => 3 ], 'u' => [ '$set' => [ 'status' => 'Inactive' ] ] ] ] ] ); $manager->executeCommand( DATABASE_NAME, $cmd, [ 'session' => $session, 'readConcern' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ) ] ); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() use ($manager, $session) { $cmd = new \MongoDB\Driver\Command( [ 'update' => COLLECTION_NAME, 'updates' => [ [ 'q' => [ 'employee' => 3 ], 'u' => [ '$set' => [ 'status' => 'Inactive' ] ] ] ] ] ); $manager->executeCommand( DATABASE_NAME, $cmd, [ 'session' => $session, 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot set read concern after starting transaction OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot set write concern after starting transaction ===DONE=== PK.h]#8tests/top-decodeError-008.phptnu[--TEST-- Top-level document validity: Stated length exceeds byte count, with truncated document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]JR!tests/decimal128-3-valid-119.phptnu[--TEST-- Decimal128: [basx138] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000523000 {"d":{"$numberDecimal":"0E+9"}} 180000001364000000000000000000000000000000523000 180000001364000000000000000000000000000000523000 ===DONE===PK.h];G&tests/decimal128-7-parseError-037.phptnu[--TEST-- Decimal128: [basx544] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]s}88tests/bson-toPHP-007.phptnu[--TEST-- MongoDB\BSON\toPHP(): fieldPath typemaps without server --FILE-- 1, 'object' => [ 'parent1' => [ 'child1' => [ 1, 2, 3 ], 'child2' => [ 4, 5, 6 ], ], 'parent2' => [ 'child1' => [ 7, 8, 9 ], 'child2' => [ 10, 11, 12 ], ], ], ] ); function fetch($bson, $typeMap = []) { for ($i = 0; $i < 25000; $i++) { $documents = [ \MongoDB\BSON\toPHP($bson, $typeMap) ]; } return $documents; } echo "\nSetting 'object.$.child1' path to 'MyWildCardArrayObject'\n"; $documents = fetch($bson, ["fieldPaths" => [ 'object.$.child1' => "MyWildCardArrayObject" ]]); var_dump($documents[0]->object->parent1 instanceof stdClass); var_dump($documents[0]->object->parent1->child1 instanceof MyWildCardArrayObject); var_dump(is_array($documents[0]->object->parent1->child2)); var_dump($documents[0]->object->parent2 instanceof stdClass); var_dump($documents[0]->object->parent2->child1 instanceof MyWildCardArrayObject); var_dump(is_array($documents[0]->object->parent2->child2)); echo "\nSetting 'object.parent1.$' path to 'MyWildCardArrayObject' and 'object.parent2.child1' to 'MyArrayObject'\n"; $documents = fetch($bson, ["fieldPaths" => [ 'object.parent1.$' => "MyWildCardArrayObject", 'object.parent2.child1' => "MyArrayObject", ]]); var_dump($documents[0]->object->parent1 instanceof stdClass); var_dump($documents[0]->object->parent1->child1 instanceof MyWildCardArrayObject); var_dump($documents[0]->object->parent1->child2 instanceof MyWildCardArrayObject); var_dump($documents[0]->object->parent2 instanceof stdClass); var_dump($documents[0]->object->parent2->child1 instanceof MyArrayObject); var_dump(is_array($documents[0]->object->parent2->child2)); echo "\nSetting 'object.parent1.$' path to 'MyWildCardArrayObject' and 'object.$.$' to 'MyArrayObject'\n"; $documents = fetch($bson, ["fieldPaths" => [ 'object.parent1.$' => "MyWildCardArrayObject", 'object.$.$' => "MyArrayObject", ]]); var_dump($documents[0]->object->parent1 instanceof stdClass); var_dump($documents[0]->object->parent1->child1 instanceof MyWildCardArrayObject); var_dump($documents[0]->object->parent1->child2 instanceof MyWildCardArrayObject); var_dump($documents[0]->object->parent2 instanceof stdClass); var_dump($documents[0]->object->parent2->child1 instanceof MyArrayObject); var_dump($documents[0]->object->parent2->child2 instanceof MyArrayObject); echo "\nSetting 'object.parent1.$' path to 'MyWildCardArrayObject' and 'object.$.child2' to 'MyArrayObject'\n"; $documents = fetch($bson, ["fieldPaths" => [ 'object.parent1.child1' => "MyWildCardArrayObject", 'object.$.child2' => "MyArrayObject", ]]); var_dump($documents[0]->object->parent1 instanceof stdClass); var_dump($documents[0]->object->parent1->child1 instanceof MyWildCardArrayObject); var_dump($documents[0]->object->parent1->child2 instanceof MyArrayObject); var_dump($documents[0]->object->parent2 instanceof stdClass); var_dump(is_array($documents[0]->object->parent2->child1)); var_dump($documents[0]->object->parent2->child2 instanceof MyArrayObject); ?> ===DONE=== --EXPECT-- Setting 'object.$.child1' path to 'MyWildCardArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.$' path to 'MyWildCardArrayObject' and 'object.parent2.child1' to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.$' path to 'MyWildCardArrayObject' and 'object.$.$' to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Setting 'object.parent1.$' path to 'MyWildCardArrayObject' and 'object.$.child2' to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]3^^&tests/cursor-NoRewindIterator-001.phptnu[--TEST-- MongoDB\Driver\Cursor query result iteration through NoRewindIterator --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 1)); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array("x" => 1))); /* IteratorIterator requires either rewind() or next() to be called at least * once to populate its current.data pointer, which valid() checks. Since next() * would skip the first element and NoRewindIterator::rewind() is a NOP, we must * explicitly call IteratorIterator::rewind() before composing it. */ $iteratorIterator = new IteratorIterator($cursor); $iteratorIterator->rewind(); $noRewindIterator = new NoRewindIterator($iteratorIterator); foreach ($noRewindIterator as $document) { var_dump($document); } /* NoRewindIterator::rewind() is a NOP, so attempting to iterate a second time * or calling rewind() directly accomplishes nothing. That said, it does avoid * the exception one would otherwise get invoking the rewind handler after * iteration has started. */ foreach ($noRewindIterator as $document) { var_dump($document); } $noRewindIterator->rewind(); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(1) } object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(1) } ===DONE=== PK.h]3>1tests/bson-dbpointer-serialization_error-003.phptnu[--TEST-- MongoDB\BSON\DBPointer unserialization requires "ref" and "id" string fields (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\DBPointer initialization requires "ref" and "id" string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\DBPointer initialization requires "ref" and "id" string fields ===DONE=== PK.h] 4qtests/bson-int64-003.phptnu[--TEST-- MongoDB\BSON\Int64 encoded as 64-bit integer in BSON --FILE-- unserialize('C:18:"MongoDB\BSON\Int64":47:{a:1:{s:7:"integer";s:19:"9223372036854775807";}}')], ['int64' => unserialize('C:18:"MongoDB\BSON\Int64":48:{a:1:{s:7:"integer";s:20:"-9223372036854775808";}}')], ['int64' => unserialize('C:18:"MongoDB\BSON\Int64":38:{a:1:{s:7:"integer";s:10:"2147483648";}}')], ['int64' => unserialize('C:18:"MongoDB\BSON\Int64":39:{a:1:{s:7:"integer";s:11:"-2147483649";}}')], ['int64' => unserialize('C:18:"MongoDB\BSON\Int64":28:{a:1:{s:7:"integer";s:1:"0";}}')], ]; foreach($tests as $test) { $bson = fromPHP($test); hex_dump($bson); echo "\n"; } ?> ===DONE=== --EXPECT-- 0 : 14 00 00 00 12 69 6e 74 36 34 00 ff ff ff ff ff [.....int64......] 10 : ff ff 7f 00 [....] 0 : 14 00 00 00 12 69 6e 74 36 34 00 00 00 00 00 00 [.....int64......] 10 : 00 00 80 00 [....] 0 : 14 00 00 00 12 69 6e 74 36 34 00 00 00 00 80 00 [.....int64......] 10 : 00 00 00 00 [....] 0 : 14 00 00 00 12 69 6e 74 36 34 00 ff ff ff 7f ff [.....int64......] 10 : ff ff ff 00 [....] 0 : 14 00 00 00 12 69 6e 74 36 34 00 00 00 00 00 00 [.....int64......] 10 : 00 00 00 00 [....] ===DONE=== PK.h],&tests/bson-javascript-getCode-001.phptnu[--TEST-- MongoDB\BSON\Javascript::getCode() --FILE-- 42]], ['function foo() { return id; }', ['id' => new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4603')]], ]; foreach ($tests as $test) { list($code, $scope) = $test; $js = new MongoDB\BSON\Javascript($code, $scope); var_dump($js->getCode()); } ?> ===DONE=== --EXPECT-- string(33) "function foo(bar) { return bar; }" string(33) "function foo(bar) { return bar; }" string(30) "function foo() { return foo; }" string(29) "function foo() { return id; }" ===DONE=== PK.h]x&tests/decimal128-4-parseError-006.phptnu[--TEST-- Decimal128: [basx590] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]'N99!tests/decimal128-5-valid-017.phptnu[--TEST-- Decimal128: [decq179] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000008000 {"d":{"$numberDecimal":"-1.0E-6175"}} 180000001364000a00000000000000000000000000008000 180000001364000a00000000000000000000000000008000 ===DONE===PK.h]WB!tests/decimal128-5-valid-016.phptnu[--TEST-- Decimal128: [decq178] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000081efac855b416d2dee04008000 {"d":{"$numberDecimal":"-1.00000000000000000000000000000000E-6144"}} 180000001364000000000081efac855b416d2dee04008000 ===DONE===PK.h]Ytests/manager-ctor-007.phptnu[--TEST-- MongoDB\Driver\Manager::__construct() reuses cached mongoc client --FILE-- ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s %A [%s] PHONGO: DEBUG > Found client for hash: %s %A ===DONE=== PK.h]ktests/array-valid-005.phptnu[--TEST-- Array: Multi Element Array with duplicate indexes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate BSON -> Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($degenerateBson))), "\n"; // Degenerate BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($degenerateBson)), "\n"; ?> ===DONE=== --EXPECT-- 1b000000046100130000001030000a000000103100140000000000 {"a":[{"$numberInt":"10"},{"$numberInt":"20"}]} 1b000000046100130000001030000a000000103100140000000000 1b000000046100130000001030000a000000103100140000000000 {"a":[{"$numberInt":"10"},{"$numberInt":"20"}]} ===DONE===PK.h])a`OOtests/bug0334-001.phptnu[--TEST-- PHPC-334: Injected __pclass should override a __pclass key in bsonSerialize() return value --FILE-- "baz", "foo" => "bar", ); } function bsonUnserialize(array $data) { } } $bson = fromPHP(new MyClass); $php = toPHP($bson, array('root' => 'array')); var_dump($php['__pclass']->getData()); ?> ===DONE=== --EXPECT-- string(7) "MyClass" ===DONE=== PK.h]B?44!tests/decimal128-3-valid-019.phptnu[--TEST-- Decimal128: [basx619] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000034b000 {"d":{"$numberDecimal":"-0.000000"}} 18000000136400000000000000000000000000000034b000 ===DONE===PK.h]'lq!tests/decimal128-3-valid-033.phptnu[--TEST-- Decimal128: [basx130] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000383000 {"d":{"$numberDecimal":"0.0000"}} 180000001364000000000000000000000000000000383000 180000001364000000000000000000000000000000383000 ===DONE===PK.h]qzz(tests/readpreference-ctor_error-004.phptnu[--TEST-- MongoDB\Driver\ReadPreference construction (invalid maxStalenessSeconds range) --SKIPIF-- --FILE-- 2147483648]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected maxStalenessSeconds to be <= 2147483647, 2147483648 given ===DONE=== PK.h]'d^*tests/manager-ctor-auth_mechanism-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): authMechanismProperties option --FILE-- 'username', 'authMechanism' => 'GSSAPI', 'authMechanismProperties' => ['CANONICALIZE_HOST_NAME' => 'true', 'SERVICE_NAME' => 'foo', 'SERVICE_REALM' => 'bar']]], // Options are case-insensitive ['mongodb://username@127.0.0.1/?authMechanism=GSSAPI&authMechanismProperties=canonicalize_host_name:TRUE,service_name:foo,service_realm:bar', []], [null, ['username' => 'username', 'authMechanism' => 'GSSAPI', 'authMechanismProperties' => ['canonicalize_host_name' => 'TRUE', 'service_name' => 'foo', 'service_realm' => 'bar']]], // Boolean true "CANONICALIZE_HOST_NAME" value is converted to "true" [null, ['username' => 'username', 'authMechanism' => 'GSSAPI', 'authMechanismProperties' => ['canonicalize_host_name' => true]]], ]; foreach ($tests as $test) { list($uri, $options) = $test; /* Note: the Manager's debug information does not include the auth mechanism * so we are merely testing that no exception is thrown and that option * processing does not leak memory. */ $manager = new MongoDB\Driver\Manager($uri, $options); } ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]?H<&tests/decimal128-7-parseError-060.phptnu[--TEST-- Decimal128: [basx550] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]!tests/decimal128-3-valid-085.phptnu[--TEST-- Decimal128: [basx663] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000383000 {"d":{"$numberDecimal":"0.0000"}} 180000001364000000000000000000000000000000383000 180000001364000000000000000000000000000000383000 ===DONE===PK.h];;!tests/decimal128-3-valid-177.phptnu[--TEST-- Decimal128: [basx172] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000002a3000 {"d":{"$numberDecimal":"1.265E-8"}} 18000000136400f1040000000000000000000000002a3000 ===DONE===PK.h]Ak  !tests/decimal128-3-valid-276.phptnu[--TEST-- Decimal128: [basx211] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000163000 {"d":{"$numberDecimal":"1.265E-18"}} 18000000136400f104000000000000000000000000163000 18000000136400f104000000000000000000000000163000 ===DONE===PK.h]|ftests/top-parseError-006.phptnu[--TEST-- Top-level document validity: Bad $oid (number, not string) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]k!tests/decimal128-3-valid-097.phptnu[--TEST-- Decimal128: [basx161] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000002e3000 {"d":{"$numberDecimal":"0E-9"}} 1800000013640000000000000000000000000000002e3000 1800000013640000000000000000000000000000002e3000 ===DONE===PK.h]k"!tests/decimal128-3-valid-279.phptnu[--TEST-- Decimal128: [basx219] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000423000 {"d":{"$numberDecimal":"1.265E+4"}} 18000000136400f104000000000000000000000000423000 18000000136400f104000000000000000000000000423000 ===DONE===PK.h]n  &tests/cursor-IteratorIterator-003.phptnu[--TEST-- MongoDB\Driver\Cursor iteration beyond last document (find command) --SKIPIF-- --FILE-- insert(['_id' => 1]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); $iterator = new IteratorIterator($cursor); $iterator->rewind(); var_dump($iterator->current()); $iterator->next(); var_dump($iterator->current()); // libmongoc throws on superfluous iteration of find command cursor (CDRIVER-1234) echo throws(function() use ($iterator) { $iterator->next(); }, 'MongoDB\Driver\Exception\RuntimeException'), "\n"; ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["_id"]=> int(1) } NULL OK: Got MongoDB\Driver\Exception\RuntimeException Cannot advance a completed or failed cursor. ===DONE=== PK.h])|22"tests/bson-objectid_error-001.phptnu[--TEST-- MongoDB\BSON\ObjectId constructor type validation --SKIPIF-- =', '7.99'); ?> --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException %SMongoDB\BSON\ObjectId::__construct()%sstring, %r(object|stdClass)%r given ===DONE=== PK.h]鉤S%%3tests/manager-createClientEncryption-error-002.phptnu[--TEST-- MongoDB\Driver\Manager::createClientEncryption() with invalid option types --SKIPIF-- --FILE-- 'string'], [ 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary('', 0)]], 'keyVaultClient' => 'string', ], ]; foreach ($tests as $test) { echo throws(function () use ($test) { $manager = create_test_manager(); $clientEncryption = $manager->createClientEncryption(['keyVaultNamespace' => 'default.keys'] + $test); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n\n"; } ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "kmsProviders" encryption option to be an array or object OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "keyVaultClient" encryption option to be MongoDB\Driver\Manager, string given ===DONE=== PK.h]ER'tests/writeconcern-getwtimeout-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern::getWtimeout() --FILE-- getWtimeout()); } // Test with default value $wc = new MongoDB\Driver\WriteConcern(1); var_dump($wc->getWtimeout()); ?> ===DONE=== --EXPECT-- int(0) int(1) int(0) ===DONE=== PK.h]' ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]`!tests/decimal128-4-valid-004.phptnu[--TEST-- Decimal128: [basx612] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003eb000 {"d":{"$numberDecimal":"-0.0"}} 1800000013640000000000000000000000000000003eb000 1800000013640000000000000000000000000000003eb000 ===DONE===PK.h]a!tests/decimal128-1-valid-045.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - infinity --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007800 {"d":{"$numberDecimal":"Infinity"}} 180000001364000000000000000000000000000000007800 180000001364000000000000000000000000000000007800 ===DONE===PK.h]@·  tests/top-decodeError-005.phptnu[--TEST-- Top-level document validity: One object, sized correctly, with a spot for an EOO, but the EOO is 0xff --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]/aa!tests/decimal128-3-valid-164.phptnu[--TEST-- Decimal128: [basx014] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400d2040000000000000000000000003a3000 {"d":{"$numberDecimal":"1.234"}} 18000000136400d2040000000000000000000000003a3000 ===DONE===PK.h]|55'tests/bson-regex-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\Regex::jsonSerialize() return value (with flags) --FILE-- jsonSerialize()); ?> ===DONE=== --EXPECT-- array(2) { ["$regex"]=> string(7) "pattern" ["$options"]=> string(1) "i" } ===DONE=== PK.h]FW#"tests/bson-regexinterface-001.phptnu[--TEST-- MongoDB\BSON\RegexInterface is implemented by MongoDB\BSON\Regex --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h] tAA!tests/decimal128-3-valid-184.phptnu[--TEST-- Decimal128: [basx405] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000002c3000 {"d":{"$numberDecimal":"7E-10"}} 1800000013640007000000000000000000000000002c3000 ===DONE===PK.h]U(tests/readconcern-bsonserialize-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern::bsonSerialize() --FILE-- ===DONE=== --EXPECT-- { } { "level" : "linearizable" } { "level" : "local" } { "level" : "majority" } { "level" : "available" } { "level" : "snapshot" } ===DONE=== PK.h]"X(tests/readpreference-ctor_error-003.phptnu[--TEST-- MongoDB\Driver\ReadPreference construction (invalid maxStalenessSeconds) --FILE-- 1000]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { new MongoDB\Driver\ReadPreference("primary", null, ['maxStalenessSeconds' => 1000]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => -2]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => 0]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => 42]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException maxStalenessSeconds may not be used with primary mode OK: Got MongoDB\Driver\Exception\InvalidArgumentException maxStalenessSeconds may not be used with primary mode OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected maxStalenessSeconds to be >= 90, -2 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected maxStalenessSeconds to be >= 90, 0 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected maxStalenessSeconds to be >= 90, 42 given ===DONE=== PK.h]5  !tests/decimal128-3-valid-235.phptnu[--TEST-- Decimal128: [basx341] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000303000 {"d":{"$numberDecimal":"1.0E-7"}} 180000001364000a00000000000000000000000000303000 180000001364000a00000000000000000000000000303000 ===DONE===PK.h]}?b11!tests/decimal128-5-valid-056.phptnu[--TEST-- Decimal128: [decq643] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000010a5d4e8000000000000000000fe5f00 {"d":{"$numberDecimal":"1.000000000000E+6123"}} 180000001364000010a5d4e8000000000000000000fe5f00 180000001364000010a5d4e8000000000000000000fe5f00 ===DONE===PK.h]!tests/decimal128-3-valid-088.phptnu[--TEST-- Decimal128: [basx645] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000483000 {"d":{"$numberDecimal":"0E+4"}} 180000001364000000000000000000000000000000483000 180000001364000000000000000000000000000000483000 ===DONE===PK.h]d6tests/cursor-session-004.phptnu[--TEST-- MongoDB\Driver\Cursor debug output for command cursor includes implicit session --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$match' => new stdClass]], 'cursor' => ['batchSize' => 2], ]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); $iterator = new IteratorIterator($cursor); $iterator->rewind(); $iterator->next(); printf("Cursor ID is zero: %s\n", (string) $cursor->getId() === '0' ? 'yes' : 'no'); var_dump($cursor); $iterator->next(); /* Unlike implicit sessions for query cursors, which are handled internally by * libmongoc, PHPC-1152 emulates its own implicit sessions for command cursors * in order to ensure that command cursors always share the same session as the * originating command. */ printf("\nCursor ID is zero: %s\n", (string) $cursor->getId() === '0' ? 'yes' : 'no'); var_dump($cursor); ?> ===DONE=== --EXPECTF-- Cursor ID is zero: no object(MongoDB\Driver\Cursor)#%d (%d) { %a ["session"]=> object(MongoDB\Driver\Session)#%d (%d) { %a } %a } Cursor ID is zero: yes object(MongoDB\Driver\Cursor)#%d (%d) { %a ["session"]=> NULL %a } ===DONE=== PK.h]=`%tests/manager-executeCommand-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() --SKIPIF-- --FILE-- 1)); $result = $manager->executeCommand(DATABASE_NAME, $command); var_dump($command); var_dump($result instanceof MongoDB\Driver\Cursor); var_dump($result); echo "\nDumping response document:\n"; var_dump(current($result->toArray())); $server = $result->getServer(); var_dump($server instanceof MongoDB\Driver\Server); var_dump($server->getHost()); var_dump($server->getPort()); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Command)#%d (%d) { ["command"]=> object(stdClass)#%d (1) { ["ping"]=> int(1) } } bool(true) object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> NULL ["query"]=> NULL ["command"]=> object(MongoDB\Driver\Command)#%d (%d) { ["command"]=> object(stdClass)#%d (%d) { ["ping"]=> int(1) } } ["readPreference"]=> NULL ["session"]=> %a ["isDead"]=> bool(false) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } Dumping response document: object(stdClass)#%d (%d) { ["ok"]=> float(1)%A } bool(true) string(%d) "%s" int(%d) ===DONE=== PK.h],LL!tests/decimal128-2-valid-077.phptnu[--TEST-- Decimal128: [decq660] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001027000000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.0000E+6115"}} 180000001364001027000000000000000000000000fe5f00 ===DONE===PK.h]*g*(tests/executiontimeoutexception-001.phptnu[--TEST-- ExecutionTimeoutException: exceeding $maxTimeMS (queries) --SKIPIF-- --FILE-- selectServer(new \MongoDB\Driver\ReadPreference('primary')); $query = new MongoDB\Driver\Query(array("company" => "Smith, Carter and Buckridge"), array( 'projection' => array('_id' => 0, 'username' => 1), 'sort' => array('phoneNumber' => 1), 'modifiers' => array( '$maxTimeMS' => 1, ), )); failMaxTimeMS($server); throws(function() use ($server, $query) { $result = $server->executeQuery(NS, $query); }, "MongoDB\Driver\Exception\ExecutionTimeoutException"); ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\ExecutionTimeoutException ===DONE=== PK.h][p22!tests/decimal128-3-valid-071.phptnu[--TEST-- Decimal128: [basx063] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400185c0ace00000000000000000000383000 {"d":{"$numberDecimal":"345678.5432"}} 18000000136400185c0ace00000000000000000000383000 18000000136400185c0ace00000000000000000000383000 ===DONE===PK.h]nN]]%tests/bulkwrite-delete_error-004.phptnu[--TEST-- MongoDB\Driver\BulkWrite::delete() collation option requires MongoDB 3.4 --SKIPIF-- =', '3.4'); ?> --FILE-- delete( ['name' => 'foo'], ['collation' => ['locale' => 'en_US']] ); echo throws(function() use ($manager, $bulk) { $manager->executeBulkWrite(DATABASE_NAME . '.' . COLLECTION_NAME, $bulk); }, 'MongoDB\Driver\Exception\BulkWriteException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\BulkWriteException Bulk write failed due to previous MongoDB\Driver\Exception\RuntimeException: The selected server does not support collation ===DONE=== PK.h]V$ctests/cursorid-debug-001.phptnu[--TEST-- MongoDB\Driver\CursorId debug output --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> %rint\(|string\(19\) "|%r7250031947823432848%r"|\)%r } ===DONE=== PK.h]Da tests/writeconcernerror-002.phptnu[--TEST-- WriteConcernError: Access write counts and WriteConcern reason --SKIPIF-- --FILE-- insert(array("my" => "value")); $bulk->insert(array("my" => "value", "foo" => "bar")); $bulk->insert(array("my" => "value", "foo" => "bar")); $bulk->delete(array("my" => "value", "foo" => "bar"), array("limit" => 1)); $bulk->update(array("foo" => "bar"), array('$set' => array("foo" => "baz")), array("limit" => 1, "upsert" => 0)); $w = new MongoDB\Driver\WriteConcern(30); try { $retval = $manager->executeBulkWrite(NS, $bulk, $w); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { printWriteResult($e->getWriteResult(), false); } ?> ===DONE=== --EXPECTF-- server: %s:%d insertedCount: 3 matchedCount: 1 modifiedCount: 1 upsertedCount: 0 deletedCount: 1 writeConcernError: %s (%d) ===DONE=== PK.h]fMtests/binary-valid-011.phptnu[--TEST-- Binary type: $type query operator (conflicts with legacy $binary form with $type field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1f000000037800170000000224747970650007000000737472696e67000000 {"x":{"$type":"string"}} 1f000000037800170000000224747970650007000000737472696e67000000 ===DONE===PK.h]I^ii!tests/decimal128-2-valid-157.phptnu[--TEST-- Decimal128: [decq550] Specials --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffffff638e8d37c087adbe09ed413000 {"d":{"$numberDecimal":"9999999999999999999999999999999999"}} 18000000136400ffffffff638e8d37c087adbe09ed413000 ===DONE===PK.h]__!tests/decimal128-3-valid-151.phptnu[--TEST-- Decimal128: [basx004] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640064000000000000000000000000003c3000 {"d":{"$numberDecimal":"1.00"}} 1800000013640064000000000000000000000000003c3000 ===DONE===PK.h]%x!tests/decimal128-4-valid-007.phptnu[--TEST-- Decimal128: [basx054] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000500000000000000000000000000323000 {"d":{"$numberDecimal":"5E-7"}} 180000001364000500000000000000000000000000323000 180000001364000500000000000000000000000000323000 ===DONE===PK.h]Yttests/bson-timestamp-003.phptnu[--TEST-- MongoDB\BSON\Timestamp constructor requires positive unsigned 32-bit integers --FILE-- ===DONE=== --EXPECTF-- Test [2147483647:0] object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "2147483647" ["timestamp"]=> string(1) "0" } Test [0:2147483647] object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "2147483647" } ===DONE=== PK.h]uatests/bug0334-002.phptnu[--TEST-- PHPC-334: Encoded BSON should never have multiple __pclass keys --FILE-- "baz", "foo" => "bar", ); } function bsonUnserialize(array $data) { } } hex_dump(fromPHP(new MyClass)) ?> ===DONE=== --EXPECT-- 0 : 28 00 00 00 05 5f 5f 70 63 6c 61 73 73 00 07 00 [(....__pclass...] 10 : 00 00 80 4d 79 43 6c 61 73 73 02 66 6f 6f 00 04 [...MyClass.foo..] 20 : 00 00 00 62 61 72 00 00 [...bar..] ===DONE=== PK.h]*gXX!tests/decimal128-2-valid-131.phptnu[--TEST-- Decimal128: [decq753] DPD all-highs cases (includes the 24 redundant codes) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364007803000000000000000000000000403000 {"d":{"$numberDecimal":"888"}} 180000001364007803000000000000000000000000403000 ===DONE===PK.h];w!tests/causal-consistency-009.phptnu[--TEST-- Causal consistency: custom read concern merges afterClusterTime and level --SKIPIF-- --FILE-- observe( function() { $manager = create_test_manager(); $session = $manager->startSession(); $readConcern = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY); $query = new MongoDB\Driver\Query([], ['readConcern' => $readConcern]); $manager->executeQuery(NS, $query, ['session' => $session]); $manager->executeQuery(NS, $query, ['session' => $session]); }, function(stdClass $command) { $hasAfterClusterTime = isset($command->readConcern->afterClusterTime); printf("Read concern includes afterClusterTime: %s\n", ($hasAfterClusterTime ? 'yes' : 'no')); $hasLevel = isset($command->readConcern->level); printf("Read concern includes level: %s\n", ($hasLevel ? 'yes' : 'no')); } ); ?> ===DONE=== --EXPECT-- Read concern includes afterClusterTime: no Read concern includes level: yes Read concern includes afterClusterTime: yes Read concern includes level: yes ===DONE=== PK.h]R<-tests/manager-executeBulkWrite_error-006.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() update write error --SKIPIF-- --FILE-- insert(array('x' => 1)); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->update(['x' => 1], ['$foo' => 1]); try { $manager->executeBulkWrite(NS, $bulk); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { printf("BulkWriteException: %s\n", $e->getMessage()); echo "\n===> WriteResult\n"; printWriteResult($e->getWriteResult()); } ?> ===DONE=== --EXPECTF-- BulkWriteException: Unknown modifier: $foo%S ===> WriteResult server: %s:%d insertedCount: 0 matchedCount: 0 modifiedCount: 0 upsertedCount: 0 deletedCount: 0 object(MongoDB\Driver\WriteError)#%d (%d) { ["message"]=> string(%d) "Unknown modifier: $foo%S" ["code"]=> int(9) ["index"]=> int(0) ["info"]=> NULL } writeError[0].message: Unknown modifier: $foo%S writeError[0].code: 9 ===DONE=== PK.h]޺e!tests/string-decodeError-005.phptnu[--TEST-- String: string is not null-terminated --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]!tests/decimal128-3-valid-204.phptnu[--TEST-- Decimal128: [basx369] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000503000 {"d":{"$numberDecimal":"7E+8"}} 180000001364000700000000000000000000000000503000 180000001364000700000000000000000000000000503000 ===DONE===PK.h]?q'tests/bson-regex-serialization-004.phptnu[--TEST-- MongoDB\BSON\Regex serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(1) "i" } string(77) "O:18:"MongoDB\BSON\Regex":2:{s:7:"pattern";s:6:"regexp";s:5:"flags";s:1:"i";}" object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(1) "i" } ===DONE=== PK.h]hs!!tests/bug0950-002.phptnu[--TEST-- PHPC-950: Segfault killing cursor after subscriber HashTable is destroyed (one subscriber) --SKIPIF-- =', '7.99'); ?> --FILE-- getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { printf("- succeeded: %s\n", $event->getCommandName()); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { printf("- failed: %s\n", $event->getCommandName()); } } $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); MongoDB\Driver\Monitoring\addSubscriber(new MySubscriber); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['batchSize' => 2])); /* Exiting during iteration on a live cursor will result in * php_phongo_command_started() being invoked for the killCursors command after * RSHUTDOWN has already destroyed the subscriber HashTable */ foreach ($cursor as $data) { echo "Exiting during first iteration on cursor\n"; exit(0); } ?> ===DONE=== --EXPECT-- - started: find - succeeded: find Exiting during first iteration on cursor PK.h]L.W??!tests/decimal128-3-valid-207.phptnu[--TEST-- Decimal128: [basx403] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000002e3000 {"d":{"$numberDecimal":"7E-9"}} 1800000013640007000000000000000000000000002e3000 ===DONE===PK.h]xB*tests/manager-ctor-ssl-deprecated-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): Test deprecated options (capath) --SKIPIF-- --FILE-- 'foo']); }, E_DEPRECATED ), "\n"; echo raises( function () { create_test_manager('mongodb://127.0.0.1/', [], ['context' => stream_context_create(['ssl' => ['capath' => 'foo']])]); }, E_DEPRECATED ), "\n"; ?> ===DONE=== --EXPECT-- OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "capath" context driver option is deprecated. Please use the "ca_dir" driver option instead. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated. ===DONE=== PK.h]a00!tests/decimal128-3-valid-024.phptnu[--TEST-- Decimal128: [basx617] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000038b000 {"d":{"$numberDecimal":"-0.0000"}} 18000000136400000000000000000000000000000038b000 ===DONE===PK.h]q//!tests/writeconcern-debug-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern debug output should include all fields for w default --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["j"]=> bool(true) ["wtimeout"]=> int(1000) } ===DONE=== PK.h]۷aa!tests/decimal128-5-valid-013.phptnu[--TEST-- Decimal128: [decq130] fold-downs (more below) (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000807f1bcf85b27059c8a43cfedf00 {"d":{"$numberDecimal":"-1.230000000000000000000000000000000E+6144"}} 18000000136400000000807f1bcf85b27059c8a43cfedf00 18000000136400000000807f1bcf85b27059c8a43cfedf00 ===DONE===PK.h]8]tests/cursor-isDead-003.phptnu[--TEST-- MongoDB\Driver\Cursor::isDead() with basic iteration (OP_QUERY) --SKIPIF-- =', '3.1'); ?> --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['batchSize' => 2])); foreach ($cursor as $_) { var_dump($cursor->isDead()); } var_dump($cursor->isDead()); ?> ===DONE=== --EXPECT-- bool(false) bool(false) bool(false) bool(true) ===DONE=== PK.h]ha**!tests/decimal128-3-valid-111.phptnu[--TEST-- Decimal128: [basx652] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000443000 {"d":{"$numberDecimal":"0E+2"}} 180000001364000000000000000000000000000000443000 ===DONE===PK.h]6.88"tests/server-executeQuery-002.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() with sort and empty filter --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query(array()))->getServer(); // load fixtures for test $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 1, 'x' => 2, 'y' => 3)); $bulk->insert(array('_id' => 2, 'x' => 3, 'y' => 4)); $bulk->insert(array('_id' => 3, 'x' => 4, 'y' => 5)); $server->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query(array(), array('sort' => array('_id' => -1))); $cursor = $server->executeQuery(NS, $query); var_dump($cursor instanceof MongoDB\Driver\Cursor); var_dump($server == $cursor->getServer()); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- bool(true) bool(true) array(3) { [0]=> object(stdClass)#%d (3) { ["_id"]=> int(3) ["x"]=> int(4) ["y"]=> int(5) } [1]=> object(stdClass)#%d (3) { ["_id"]=> int(2) ["x"]=> int(3) ["y"]=> int(4) } [2]=> object(stdClass)#%d (3) { ["_id"]=> int(1) ["x"]=> int(2) ["y"]=> int(3) } } ===DONE=== PK.h]7#x!tests/decimal128-3-valid-297.phptnu[--TEST-- Decimal128: [basx233] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000383000 {"d":{"$numberDecimal":"0.1265"}} 18000000136400f104000000000000000000000000383000 18000000136400f104000000000000000000000000383000 ===DONE===PK.h]tests/bug1006-002.phptnu[--TEST-- PHPC-1006: Do not skip __pclass in Serializable::bsonSerialize() return value --FILE-- 'baz', 'foo' => 'bar', ]; } } hex_dump(fromPHP(new MyClass)); ?> ===DONE=== --EXPECT-- 0 : 24 00 00 00 02 5f 5f 70 63 6c 61 73 73 00 04 00 [$....__pclass...] 10 : 00 00 62 61 7a 00 02 66 6f 6f 00 04 00 00 00 62 [..baz..foo.....b] 20 : 61 72 00 00 [ar..] ===DONE=== PK.h]{!tests/decimal128-3-valid-174.phptnu[--TEST-- Decimal128: [basx180] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000403000 {"d":{"$numberDecimal":"1265"}} 18000000136400f104000000000000000000000000403000 18000000136400f104000000000000000000000000403000 ===DONE===PK.h]!tests/decimal128-3-valid-229.phptnu[--TEST-- Decimal128: [basx335] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000363000 {"d":{"$numberDecimal":"0.00010"}} 180000001364000a00000000000000000000000000363000 180000001364000a00000000000000000000000000363000 ===DONE===PK.h]/e!tests/binary-decodeError-001.phptnu[--TEST-- Binary type: Length longer than document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h] ݝP$tests/dbpointer-decodeError-004.phptnu[--TEST-- DBPointer type (deprecated): short OID (less than minimum length for field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]h, tests/bson-maxkey_error-001.phptnu[--TEST-- MongoDB\BSON\MaxKey cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyMaxKey %s final class %SMongoDB\BSON\MaxKey%S in %s on line %d PK.h]+i-tests/bson-regex-serialization_error-003.phptnu[--TEST-- MongoDB\BSON\Regex unserialization requires "pattern" and "flags" string fields (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex initialization requires "pattern" and "flags" string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex initialization requires "pattern" and "flags" string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex initialization requires "pattern" and "flags" string fields ===DONE=== PK.h]{!tests/decimal128-3-valid-091.phptnu[--TEST-- Decimal128: [basx666] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000323000 {"d":{"$numberDecimal":"0E-7"}} 180000001364000000000000000000000000000000323000 180000001364000000000000000000000000000000323000 ===DONE===PK.h] 4AA!tests/decimal128-3-valid-188.phptnu[--TEST-- Decimal128: [basx409] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000283000 {"d":{"$numberDecimal":"7E-12"}} 180000001364000700000000000000000000000000283000 ===DONE===PK.h]h!tests/decimal128-3-valid-260.phptnu[--TEST-- Decimal128: [basx202] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000004c3000 {"d":{"$numberDecimal":"1.265E+9"}} 18000000136400f1040000000000000000000000004c3000 18000000136400f1040000000000000000000000004c3000 ===DONE===PK.h]?,tests/dbref-valid-004.phptnu[--TEST-- Document type (DBRef sub-documents): DBRef with additional fields --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 4400000003646272656600380000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e02666f6f0004000000626172000000 {"dbref":{"$ref":"collection","$id":{"$oid":"58921b3e6e32ab156a22b59e"},"foo":"bar"}} 4400000003646272656600380000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e02666f6f0004000000626172000000 ===DONE===PK.h]Fyi $tests/timestamp-decodeError-001.phptnu[--TEST-- Timestamp type: Truncated timestamp field --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]O+(tests/bson-maxkey-serialization-001.phptnu[--TEST-- MongoDB\BSON\MaxKey serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\MaxKey)#%d (%d) { } string(31) "C:19:"MongoDB\BSON\MaxKey":0:{}" object(MongoDB\BSON\MaxKey)#%d (%d) { } ===DONE=== PK.h]tests/bson-fromJSON-001.phptnu[--TEST-- MongoDB\BSON\fromJSON(): Decoding JSON --FILE-- ===DONE=== --EXPECT-- Test {} 0 : 05 00 00 00 00 [.....] Test { "foo": "bar" } 0 : 12 00 00 00 02 66 6f 6f 00 04 00 00 00 62 61 72 [.....foo.....bar] 10 : 00 00 [..] Test { "foo": [ 1, 2, 3 ]} 0 : 24 00 00 00 04 66 6f 6f 00 1a 00 00 00 10 30 00 [$....foo......0.] 10 : 01 00 00 00 10 31 00 02 00 00 00 10 32 00 03 00 [.....1......2...] 20 : 00 00 00 00 [....] Test { "foo": { "bar": 1 }} 0 : 18 00 00 00 03 66 6f 6f 00 0e 00 00 00 10 62 61 [.....foo......ba] 10 : 72 00 01 00 00 00 00 00 [r.......] ===DONE=== PK.h]V7&tests/decimal128-7-parseError-059.phptnu[--TEST-- Decimal128: [basx551] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] ))!tests/decimal128-1-valid-019.phptnu[--TEST-- Decimal128: Regular - -0.0 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003eb000 {"d":{"$numberDecimal":"-0.0"}} 1800000013640000000000000000000000000000003eb000 ===DONE===PK.h]m'tests/monitoring-addSubscriber-003.phptnu[--TEST-- MongoDB\Driver\Monitoring\addSubscriber(): Adding one subscriber multiple times --SKIPIF-- --FILE-- getCommandName(), "\n"; } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $query = new MongoDB\Driver\Query( [] ); $subscriber = new MySubscriber(); echo "Before addSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber ); echo "After addSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber ); echo "After addSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); ?> --EXPECT-- Before addSubscriber After addSubscriber - started: find After addSubscriber - started: find PK.h]pm$tests/server-executeCommand-004.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() takes a read preference in options array --SKIPIF-- --FILE-- selectServer($primaryRp); $secondary = $manager->selectServer($secondaryRp); echo "Testing primary:\n"; $command = new MongoDB\Driver\Command(['ping' => 1]); $cursor = $primary->executeCommand(DATABASE_NAME, $command, ['readPreference' => $primaryRp]); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; echo "Testing secondary:\n"; $command = new MongoDB\Driver\Command(['ping' => 1]); $cursor = $secondary->executeCommand(DATABASE_NAME, $command, ['readPreference' => $secondaryRp]); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; ?> ===DONE=== --EXPECTF-- Testing primary: is_primary: true is_secondary: false Testing secondary: is_primary: false is_secondary: true ===DONE=== PK.h]mL!tests/decimal128-3-valid-025.phptnu[--TEST-- Decimal128: [basx681] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]=1tests/bson-timestamp-serialization_error-003.phptnu[--TEST-- MongoDB\BSON\Timestamp unserialization requires 64-bit integers to be positive unsigned 32-bit integers (Serializable interface) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, 4294967296 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, 4294967296 given ===DONE=== PK.h] ֕~~tests/bulkwrite-count-001.phptnu[--TEST-- MongoDB\Driver\BulkWrite::count() should return the number of operations --FILE-- count()); $bulk->insert(['x' => 1]); var_dump($bulk->count()); $bulk->insert(['x' => 2]); var_dump($bulk->count()); $bulk->update(['x' => 3], ['$set' => ['y' => 3]]); var_dump($bulk->count()); $bulk->update(['x' => 4], ['$set' => ['y' => 4]]); var_dump($bulk->count()); $bulk->delete(['x' => 5]); var_dump($bulk->count()); $bulk->delete(['x' => 6]); var_dump($bulk->count()); ?> ===DONE=== --EXPECT-- int(0) int(1) int(2) int(3) int(4) int(5) int(6) ===DONE=== PK.h]^//!tests/decimal128-5-valid-057.phptnu[--TEST-- Decimal128: [decq645] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000e8764817000000000000000000fe5f00 {"d":{"$numberDecimal":"1.00000000000E+6122"}} 1800000013640000e8764817000000000000000000fe5f00 1800000013640000e8764817000000000000000000fe5f00 ===DONE===PK.h]FE  !tests/decimal128-3-valid-232.phptnu[--TEST-- Decimal128: [basx311] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000004e3000 {"d":{"$numberDecimal":"1.0E+8"}} 180000001364000a000000000000000000000000004e3000 180000001364000a000000000000000000000000004e3000 ===DONE===PK.h]KW  !tests/decimal128-3-valid-220.phptnu[--TEST-- Decimal128: [basx323] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000423000 {"d":{"$numberDecimal":"1.0E+2"}} 180000001364000a00000000000000000000000000423000 180000001364000a00000000000000000000000000423000 ===DONE===PK.h]tO}88tests/regex-valid-002.phptnu[--TEST-- Regular Expression type: regex without options --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0d0000000b6100616263000000 {"a":{"$regularExpression":{"pattern":"abc","options":""}}} 0d0000000b6100616263000000 ===DONE===PK.h]kCCtests/query-ctor-005.phptnu[--TEST-- MongoDB\Driver\Query construction with negative limit --FILE-- 1], ['limit' => -5] )); var_dump(new MongoDB\Driver\Query( ['x' => 1], [ 'limit' => -5, 'singleBatch' => true ] )); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["limit"]=> int(5) ["singleBatch"]=> bool(true) } ["readConcern"]=> NULL } object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(1) } ["options"]=> object(stdClass)#%d (%d) { ["limit"]=> int(5) ["singleBatch"]=> bool(true) } ["readConcern"]=> NULL } ===DONE=== PK.h]wR}}"tests/writeerror-getIndex-001.phptnu[--TEST-- MongoDB\Driver\WriteError::getIndex() --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 1]); try { $manager->executeBulkWrite(NS, $bulk); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteErrors()[0]->getIndex()); } ?> ===DONE=== --EXPECT-- int(1) ===DONE=== PK.h] "tests/bug0705-002.phptnu[--TEST-- PHPC-705: Do not unnecessarily wrap filters in $query (currentOp query) --SKIPIF-- =', '3.1'); ?> --FILE-- executeQuery('admin.$cmd.sys.inprog', new MongoDB\Driver\Query([])); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- array(1) { [0]=> object(stdClass)#%d (%d) { ["inprog"]=> array(0) { } } } ===DONE=== PK.h]A$tests/bson-objectid-compare-002.phptnu[--TEST-- MongoDB\BSON\ObjectId comparisons with null bytes --FILE-- new MongoDB\BSON\ObjectId('00e2a1c40640fd72175d4603')); var_dump(new MongoDB\BSON\ObjectId('00e2a1c40640fd72175d4603') < new MongoDB\BSON\ObjectId('00e2a1c40640fd72175d4604')); var_dump(new MongoDB\BSON\ObjectId('00e2a1c40640fd72175d4603') > new MongoDB\BSON\ObjectId('00e2a1c40640fd72175d4602')); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) bool(true) ===DONE=== PK.h]'QQ%tests/readconcern-ctor_error-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern construction (invalid arguments) --SKIPIF-- =', '7.99'); ?> --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadConcern::__construct() expects at most 1 %r(argument|parameter)%r, 2 given ===DONE=== PK.h]Batests/bulkwrite-delete-002.phptnu[--TEST-- MongoDB\Driver\BulkWrite::delete() with hint option --SKIPIF-- --FILE-- getCommandName() !== 'delete') { return; } printf("delete included hint: %s\n", json_encode($event->getCommand()->deletes[0]->hint)); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $manager->executeBulkWrite(NS, $bulk); MongoDB\Driver\Monitoring\addSubscriber(new CommandLogger); $bulk = new MongoDB\Driver\BulkWrite; $bulk->delete(['_id' => 1], ['hint' => '_id_']); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite; $bulk->delete(['_id' => 2], ['hint' => ['_id' => 1]]); $manager->executeBulkWrite(NS, $bulk); ?> ===DONE=== --EXPECTF-- delete included hint: "_id_" delete included hint: {"_id":1} ===DONE=== PK.h]vRss&tests/server-executeBulkWrite-007.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() with write concern (replica set secondary) --SKIPIF-- --FILE-- false]); $server = $manager->selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY)); $writeConcerns = [1, 2, MongoDB\Driver\WriteConcern::MAJORITY]; foreach ($writeConcerns as $wc) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['wc' => $wc]); $options = [ 'writeConcern' => new MongoDB\Driver\WriteConcern($wc), ]; echo throws(function() use ($server, $bulk, $options) { $server->executeBulkWrite(NS, $bulk, $options); }, "MongoDB\Driver\Exception\RuntimeException"), "\n"; } ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\RuntimeException not %r(primary|master)%r OK: Got MongoDB\Driver\Exception\RuntimeException not %r(primary|master)%r OK: Got MongoDB\Driver\Exception\RuntimeException not %r(primary|master)%r ===DONE=== PK.h]ySS)tests/bson-utcdatetime-set_state-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime::__set_state() --FILE-- $milliseconds, ])); echo "\n\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\BSON\UTCDateTime::__set_state(array( %w'milliseconds' => '0', )) MongoDB\BSON\UTCDateTime::__set_state(array( %w'milliseconds' => '-1416445411987', )) MongoDB\BSON\UTCDateTime::__set_state(array( %w'milliseconds' => '1416445411987', )) ===DONE=== PK.h]++'tests/code_w_scope-decodeError-007.phptnu[--TEST-- Javascript Code with Scope: bad code string: length too short --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]wZ<"tests/readpreference-ctor-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference construction --FILE-- 'one']])); var_dump(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY, [])); var_dump(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => 1000])); var_dump(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['hedge' => ['enabled' => true]])); var_dump(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['hedge' => []])); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (%d) { ["tag"]=> string(3) "one" } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1000) } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["hedge"]=> object(stdClass)#%d (%d) { ["enabled"]=> bool(true) } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } ===DONE=== PK.h]qud__!tests/decimal128-4-valid-013.phptnu[--TEST-- Decimal128: OK2 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000a5bc138938d44c64d31fc2f00 {"d":{"$numberDecimal":"0.1000000000000000000000000000000000"}} 18000000136400000000000a5bc138938d44c64d31fc2f00 18000000136400000000000a5bc138938d44c64d31fc2f00 ===DONE===PK.h]zktests/bug0898-001.phptnu[--TEST-- PHPC-898: readConcern option should not be included in getMore commands (URI option) --SKIPIF-- --FILE-- 'local']); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $result = $manager->executeBulkWrite(NS, $bulk); printf("Inserted %d document(s)\n", $result->getInsertedCount()); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $cursor = $manager->executeQuery(NS, $query); foreach ($cursor as $document) { var_dump($document); } ?> ===DONE=== --EXPECTF-- Inserted 3 document(s) object(stdClass)#%d (1) { ["_id"]=> int(1) } object(stdClass)#%d (1) { ["_id"]=> int(2) } object(stdClass)#%d (1) { ["_id"]=> int(3) } ===DONE=== PK.h]|tests/cursor-toArray-001.phptnu[--TEST-- MongoDB\Driver\Cursor::toArray() --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 1)); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array("x" => 1))); echo "Dumping Cursor::toArray():\n"; var_dump($cursor->toArray()); // Execute the query a second time, since we cannot iterate twice $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array("x" => 1))); echo "\nDumping iterated Cursor:\n"; var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- Dumping Cursor::toArray(): array(2) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(1) } [1]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(1) } } Dumping iterated Cursor: array(2) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(1) } [1]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(1) } } ===DONE=== PK.h]x##tests/bug0851-002.phptnu[--TEST-- PHPC-851: Manager constructor should not modify driverOptions argument --FILE-- true, 'context' => stream_context_create([ 'ssl' => [ 'allow_self_signed' => true, ], ]), ]; $manager = new MongoDB\Driver\Manager(null, [], $driverOptions); var_dump($driverOptions); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "weak_cert_validation" driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead.%s array(2) { ["weak_cert_validation"]=> bool(true) ["context"]=> resource(4) of type (stream-context) } ===DONE=== PK.h]3?^^!tests/decimal128-5-valid-001.phptnu[--TEST-- Decimal128: [decq035] fold-downs (more below) (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000807f1bcf85b27059c8a43cfe5f00 {"d":{"$numberDecimal":"1.230000000000000000000000000000000E+6144"}} 18000000136400000000807f1bcf85b27059c8a43cfe5f00 18000000136400000000807f1bcf85b27059c8a43cfe5f00 ===DONE===PK.h])Y))tests/string-valid-006.phptnu[--TEST-- String: Embedded nulls --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000261000d0000006162006261620062616261620000 {"a":"ab\u0000bab\u0000babab"} 190000000261000d0000006162006261620062616261620000 ===DONE===PK.h]|*tests/writeresult-getdeletedcount-001.phptnu[--TEST-- MongoDB\Driver\WriteResult::getDeletedCount() with acknowledged write --SKIPIF-- --FILE-- insert(['x' => 1]); $bulk->update(['x' => 1], ['$set' => ['y' => 3]]); $bulk->update(['x' => 2], ['$set' => ['y' => 1]], ['upsert' => true]); $bulk->update(['x' => 3], ['$set' => ['y' => 2]], ['upsert' => true]); $bulk->delete(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk); var_dump($result->getDeletedCount()); ?> ===DONE=== --EXPECT-- int(1) ===DONE=== PK.h]4S'tests/manager-removeSubscriber-002.phptnu[--TEST-- MongoDB\Driver\Manager::removeSubscriber() NOP if subscriber not registered --SKIPIF-- --FILE-- id = $id; } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { printf("MySubscriber(%s) commandStarted: %s\n", $this->id, $event->getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { printf("MySubscriber(%s) commandSucceeded: %s\n", $this->id, $event->getCommandName()); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { printf("MySubscriber(%s) commandFailed: %s\n", $this->id, $event->getCommandName()); } } $m = create_test_manager(); $pingCommand = new MongoDB\Driver\Command(['ping' => 1]); $s1 = new MySubscriber('s1'); $s2 = new MySubscriber('s2'); $m->addSubscriber($s1); $m->removeSubscriber($s2); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); ?> --EXPECT-- MySubscriber(s1) commandStarted: ping MySubscriber(s1) commandSucceeded: ping ping: 1 PK.h]qb tests/ini-debug-ini_get-001.phptnu[--TEST-- ini_get() reports mongodb.debug (default) --FILE-- ===DONE=== --EXPECT-- string(0) "" ===DONE=== PK.h]7(C tests/writeresult_error-001.phptnu[--TEST-- MongoDB\Driver\WriteResult cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyWriteResult %s final class %SMongoDB\Driver\WriteResult%S in %s on line %d PK.h]A!tests/decimal128-1-valid-026.phptnu[--TEST-- Decimal128: Scientific - Adjusted Exponent Limit --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f2af967ed05c82de3297ff6fde3cf02f00 {"d":{"$numberDecimal":"1.234567890123456789012345678901234E-7"}} 18000000136400f2af967ed05c82de3297ff6fde3cf02f00 ===DONE===PK.h]XWW!tests/decimal128-5-valid-037.phptnu[--TEST-- Decimal128: [decq605] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000080264b91c02220be377e00fe5f00 {"d":{"$numberDecimal":"1.0000000000000000000000000000000E+6142"}} 1800000013640000000080264b91c02220be377e00fe5f00 1800000013640000000080264b91c02220be377e00fe5f00 ===DONE===PK.h]gR&tests/decimal128-7-parseError-054.phptnu[--TEST-- Decimal128: [basx558] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] H!tests/decimal128-1-valid-003.phptnu[--TEST-- Decimal128: Special - Negative NaN --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000000fc00 {"d":{"$numberDecimal":"NaN"}} ===DONE===PK.h] tests/regex-decodeError-001.phptnu[--TEST-- Regular Expression type: Null byte in pattern string --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]a *tests/manager-ctor-ssl-deprecated-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): Test deprecated options --SKIPIF-- --FILE-- true], ['weak_cert_validation' => true], ['allow_self_signed' => true], ['pem_file' => 'foo'], ['local_cert' => 'foo'], ['pem_pwd' => 'foo'], ['passphrase' => 'foo'], ['ca_file' => 'foo'], ['cafile' => 'foo'], ['context' => stream_context_create(['ssl' => ['cafile' => 'foo']])], ['context' => stream_context_create(['ssl' => ['capath' => 'foo']])], ['context' => stream_context_create(['ssl' => ['local_cert' => 'foo']])], ['context' => stream_context_create(['ssl' => ['passphrase' => 'foo']])], ['context' => stream_context_create(['ssl' => ['allow_self_signed' => true]])], ]; foreach ($deprecatedDriverOptions as $driverOptions) { echo raises( function () use ($driverOptions) { create_test_manager('mongodb://127.0.0.1/', [], $driverOptions); }, E_DEPRECATED ), "\n"; } ?> ===DONE=== --EXPECT-- OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "allow_invalid_hostname" driver option is deprecated. Please use the "tlsAllowInvalidHostnames" URI option instead. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "weak_cert_validation" driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "allow_self_signed" context driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "pem_file" driver option is deprecated. Please use the "tlsCertificateKeyFile" URI option instead. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "local_cert" context driver option is deprecated. Please use the "tlsCertificateKeyFile" URI option instead. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "pem_pwd" driver option is deprecated. Please use the "tlsCertificateKeyFilePassword" URI option instead. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "passphrase" context driver option is deprecated. Please use the "tlsCertificateKeyFilePassword" URI option instead. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "ca_file" driver option is deprecated. Please use the "tlsCAFile" URI option instead. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "cafile" context driver option is deprecated. Please use the "tlsCAFile" URI option instead. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated. OK: Got E_DEPRECATED MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated. ===DONE=== PK.h]3*tests/ini-mock_service_id-ini_get-001.phptnu[--TEST-- ini_get() reports mongodb.mock_service_id (default) --FILE-- ===DONE=== --EXPECT-- string(1) "0" ===DONE=== PK.h] ===DONE=== --EXPECTF-- object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "%d" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1215282385000" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1293894181012" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "2551871655999" } ===DONE=== PK.h]u<<!tests/decimal128-2-valid-010.phptnu[--TEST-- Decimal128: [decq156] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364007b0000000000000000000000000040b000 {"d":{"$numberDecimal":"-123"}} 180000001364007b0000000000000000000000000040b000 ===DONE===PK.h])tests/writeconcern-bsonserialize-004.phptnu[--TEST-- MongoDB\Driver\WriteConcern::bsonSerialize() encodes 64-bit wtimeoutms as Int64 (32-bit) --SKIPIF-- --FILE-- 2, 'wtimeout' => '2147483648']); var_dump($wc->bsonSerialize()); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(10) "2147483648" } } ===DONE=== PK.h]atests/symbol-valid-003.phptnu[--TEST-- Symbol: Multi-character --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 190000000e61000d0000006162616261626162616261620000 {"a":{"$symbol":"abababababab"}} 190000000e61000d0000006162616261626162616261620000 ===DONE===PK.h]z_!tests/decimal128-3-valid-045.phptnu[--TEST-- Decimal128: [basx670] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003c3000 {"d":{"$numberDecimal":"0.00"}} 1800000013640000000000000000000000000000003c3000 1800000013640000000000000000000000000000003c3000 ===DONE===PK.h]55!tests/decimal128-2-valid-125.phptnu[--TEST-- Decimal128: [decq733] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000902000000000000000000000000403000 {"d":{"$numberDecimal":"521"}} 180000001364000902000000000000000000000000403000 ===DONE===PK.h]fO0tests/manager-executeWriteCommand_error-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeWriteCommand() throws CommandException for invalid writeConcern --SKIPIF-- --FILE-- COLLECTION_NAME, 'query' => ['_id' => 'foo'], 'update' => ['foo' => ['bar']], 'upsert' => true, 'new' => true, ]); try { $manager->executeWriteCommand(DATABASE_NAME, $command, ['writeConcern' => new MongoDB\Driver\WriteConcern("undefined")]); } catch (MongoDB\Driver\Exception\CommandException $e) { printf("%s(%d): %s\n", get_class($e), $e->getCode(), $e->getMessage()); } ?> ===DONE=== --EXPECT-- MongoDB\Driver\Exception\CommandException(79): Write Concern error: No write concern mode named 'undefined' found in replica set configuration ===DONE=== PK.h] !tests/decimal128-5-valid-025.phptnu[--TEST-- Decimal128: [decq400] zeros (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000000000 {"d":{"$numberDecimal":"0E-6176"}} 180000001364000000000000000000000000000000000000 180000001364000000000000000000000000000000000000 ===DONE===PK.h]z>)tests/writeresult-isacknowledged-001.phptnu[--TEST-- MongoDB\Driver\WriteResult::isAcknowledged() --SKIPIF-- --FILE-- insert(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk, $wc); var_dump($result->isAcknowledged()); } ?> ===DONE=== --EXPECT-- bool(false) bool(true) ===DONE=== PK.h]^**!tests/decimal128-3-valid-109.phptnu[--TEST-- Decimal128: [basx651] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000423000 {"d":{"$numberDecimal":"0E+1"}} 180000001364000000000000000000000000000000423000 ===DONE===PK.h]/Pkk+tests/manager-executeCommand_error-004.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() with empty command document --SKIPIF-- --FILE-- executeCommand(DATABASE_NAME, $command); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Empty command document ===DONE=== PK.h]`tests/bug1274-001.phptnu[--TEST-- PHPC-1274: Session destruct should not abort transaction from parent process --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new MongoDB\Driver\Command(['create' => COLLECTION_NAME]), ['writeConcern' => new MongoDB\Driver\WriteConcern('majority')] ); $session = $manager->startSession(); $session->startTransaction(['writeConcern' => new MongoDB\Driver\WriteConcern('majority')]); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $result = $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); printf("Parent inserted %d documents\n", $result->getInsertedCount()); $childPid = pcntl_fork(); if ($childPid === 0) { echo "Child exits\n"; exit; } if ($childPid > 0) { $waitPid = pcntl_waitpid($childPid, $status); if ($waitPid === $childPid) { echo "Parent waited for child to exit\n"; } $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 3]); $bulk->insert(['x' => 4]); $result = $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); printf("Parent inserted %d documents\n", $result->getInsertedCount()); $session->commitTransaction(); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); printf("Parent fully iterated cursor for %d documents\n", iterator_count($cursor)); } ?> ===DONE=== --EXPECT-- Parent inserted 2 documents Child exits Parent waited for child to exit Parent inserted 2 documents Parent fully iterated cursor for 4 documents ===DONE=== PK.h]ҿ"tests/server-executeQuery-009.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() takes a read preference in options array --SKIPIF-- --FILE-- insert(['_id' => 1, 'x' => 2, 'y' => 3]); $manager->executeBulkWrite(NS, $bulk); $primaryRp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY); $secondaryRp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY); $primary = $manager->selectServer($primaryRp); $secondary = $manager->selectServer($secondaryRp); echo "Testing primary:\n"; $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); $cursor = $manager->executeQuery(NS, $query, ['readPreference' => $primaryRp]); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; echo "Testing secondary:\n"; $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); $cursor = $manager->executeQuery(NS, $query, ['readPreference' => $secondaryRp]); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; ?> ===DONE=== --EXPECTF-- Testing primary: is_primary: true is_secondary: false Testing secondary: is_primary: false is_secondary: true ===DONE=== PK.h]etests/bson-binary-001.phptnu[--TEST-- MongoDB\BSON\Binary #001 --FILE-- getData() === 'randomBinaryData'); var_dump($binary->getType() == $type); $tests[] = array("binary" => $binary); } foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $bson = fromJSON($json); $testagain = toPHP($bson); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Test#0 { "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "00" } } string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "00" } }" string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "00" } }" bool(true) Test#1 { "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "01" } } string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "01" } }" string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "01" } }" bool(true) Test#2 { "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "02" } } string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "02" } }" string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "02" } }" bool(true) Test#3 { "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "03" } } string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "03" } }" string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "03" } }" bool(true) Test#4 { "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "04" } } string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "04" } }" string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "04" } }" bool(true) Test#5 { "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "05" } } string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "05" } }" string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "05" } }" bool(true) Test#6 { "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "06" } } string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "06" } }" string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "06" } }" bool(true) Test#7 { "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "80" } } string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "80" } }" string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "80" } }" bool(true) Test#8 { "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "85" } } string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "85" } }" string(73) "{ "binary" : { "$binary" : "cmFuZG9tQmluYXJ5RGF0YQ==", "$type" : "85" } }" bool(true) ===DONE=== PK.h] \rrr%tests/bson-utcdatetime_error-004.phptnu[--TEST-- MongoDB\BSON\UTCDateTime constructor requires integer or string argument --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected integer or string, bool%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected integer or string, array given ===DONE=== PK.h]|ZU-tests/bson-timestamp-set_state_error-002.phptnu[--TEST-- MongoDB\BSON\Timestamp::__set_state() requires positive unsigned 32-bit integers --FILE-- -1, 'timestamp' => 5678]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['increment' => -2147483647, 'timestamp' => 5678]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['increment' => 1234, 'timestamp' => -1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['increment' => 1234, 'timestamp' => -2147483647]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, -2147483647 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, -2147483647 given ===DONE=== PK.h]#'++!tests/decimal128-5-valid-059.phptnu[--TEST-- Decimal128: [decq649] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000ca9a3b00000000000000000000fe5f00 {"d":{"$numberDecimal":"1.000000000E+6120"}} 1800000013640000ca9a3b00000000000000000000fe5f00 1800000013640000ca9a3b00000000000000000000fe5f00 ===DONE===PK.h]B!tests/decimal128-3-valid-075.phptnu[--TEST-- Decimal128: [basx684] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]MY&tests/decimal128-6-parseError-001.phptnu[--TEST-- Decimal128: Incomplete Exponent --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]0tests/binary-valid-001.phptnu[--TEST-- Binary type: subtype 0x00 (Zero-length) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0d000000057800000000000000 {"x":{"$binary":{"base64":"","subType":"00"}}} 0d000000057800000000000000 ===DONE===PK.h]o`pptests/datetime-valid-001.phptnu[--TEST-- DateTime: epoch --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000096100000000000000000000 {"a":{"$date":{"$numberLong":"0"}}} {"a":{"$date":"1970-01-01T00:00:00Z"}} 10000000096100000000000000000000 {"a":{"$date":"1970-01-01T00:00:00Z"}} ===DONE===PK.h]iXtests/top-parseError-029.phptnu[--TEST-- Top-level document validity: Bad $timestamp (extra field at same level as t and i) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]>att!tests/decimal128-2-valid-057.phptnu[--TEST-- Decimal128: [decq620] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000a1edccce1bc2d300000000fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000000E+6135"}} 18000000136400000000a1edccce1bc2d300000000fe5f00 ===DONE===PK.h]刬+ + .tests/server-executeReadCommand_error-001.phptnu[--TEST-- MongoDB\Driver\Server::executeReadCommand() with invalid options --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY)); $command = new MongoDB\Driver\Command(['ping' => 1]); echo throws(function() use ($server, $command) { $server->executeReadCommand(DATABASE_NAME, $command, ['readConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeReadCommand(DATABASE_NAME, $command, ['readConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeReadCommand(DATABASE_NAME, $command, ['readPreference' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeReadCommand(DATABASE_NAME, $command, ['readPreference' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeReadCommand(DATABASE_NAME, $command, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeReadCommand(DATABASE_NAME, $command, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given ===DONE=== PK.h]6p%%tests/server-001.phptnu[--TEST-- MongoDB\Driver\Server: Manager->getServer() returning correct server --SKIPIF-- --FILE-- "document"); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert($doc); $wresult = $manager->executeBulkWrite(NS, $bulk); $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert($doc); /* writes go to the primary */ $server = $wresult->getServer(); var_dump( $server->getHost() ); $tags = $server->getTags(); echo "dc: ", array_key_exists('dc', $tags) ? $tags['dc'] : 'not set', "\n"; echo "ordinal: ", array_key_exists('ordinal', $tags) ? $tags['ordinal'] : 'not set', "\n"; var_dump( $server->getLatency(), $server->getPort(), $server->getType() == MongoDB\Driver\Server::TYPE_RS_PRIMARY, $server->isPrimary(), $server->isSecondary(), $server->isArbiter(), $server->isHidden(), $server->isPassive() ); $info = $server->getInfo(); // hello response changes between mongod versions var_dump($info["setName"], $info["hosts"]); var_dump($info["me"] == $server->getHost() . ":" . $server->getPort()); ?> ===DONE=== --EXPECTF-- string(%d) "%s" dc: ny ordinal: one int(%d) int(%d) bool(true) bool(true) bool(false) bool(false) bool(false) bool(false) string(%d) "repl0%S" array(2) { [0]=> string(%d) "%s:%d" [1]=> string(%d) "%s:%d" } bool(true) ===DONE=== PK.h]VLnwwtests/bug1152-002.phptnu[--TEST-- PHPC-1152: Command cursors should use the same session for getMore and killCursors (explicit) --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$match' => new stdClass]], 'cursor' => ['batchSize' => 2], ]); $session = $manager->startSession(); MongoDB\Driver\Monitoring\addSubscriber($this); /* This uses the same sequencing as the implicit session test; however, * we should expect all commands (aggregate, getMore, and killCursors) * to use the same explicit session ID. */ $cursor = $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); $cursor->toArray(); $cursor = $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); $cursor->toArray(); $cursor = $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); $cursor = $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); unset($cursor); MongoDB\Driver\Monitoring\removeSubscriber($this); /* We should expect one unique session ID over the course of the test, * since all commands used the same explicit session. */ printf("Unique session IDs used: %d\n", count(array_unique($this->lsidByRequestId))); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $requestId = $event->getRequestId(); $sessionId = bin2hex((string) $event->getCommand()->lsid->id); printf("%s session ID: %s\n", $event->getCommandName(), $sessionId); if ($event->getCommandName() === 'aggregate') { if (isset($this->lsidByRequestId[$requestId])) { throw new UnexpectedValueException('Previous command observed for request ID: ' . $requestId); } $this->lsidByRequestId[$requestId] = $sessionId; } if ($event->getCommandName() === 'getMore') { $cursorId = (string) $event->getCommand()->getMore; if ( ! isset($this->lsidByCursorId[$cursorId])) { throw new UnexpectedValueException('No previous command observed for cursor ID: ' . $cursorId); } printf("getMore used same session as aggregate: %s\n", $sessionId === $this->lsidByCursorId[$cursorId] ? 'yes' : 'no'); } if ($event->getCommandName() === 'killCursors') { $cursorId = (string) $event->getCommand()->cursors[0]; if ( ! isset($this->lsidByCursorId[$cursorId])) { throw new UnexpectedValueException('No previous command observed for cursor ID: ' . $cursorId); } printf("killCursors used same session as aggregate: %s\n", $sessionId === $this->lsidByCursorId[$cursorId] ? 'yes' : 'no'); } } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { /* Associate the aggregate's session ID with its cursor ID so it can be * looked up by the subsequent getMore or killCursors */ if ($event->getCommandName() === 'aggregate') { $cursorId = (string) $event->getReply()->cursor->id; $requestId = $event->getRequestId(); $this->lsidByCursorId[$cursorId] = $this->lsidByRequestId[$requestId]; } } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } (new Test)->executeCommand(); ?> ===DONE=== --EXPECTF-- aggregate session ID: %x getMore session ID: %x getMore used same session as aggregate: yes aggregate session ID: %x getMore session ID: %x getMore used same session as aggregate: yes aggregate session ID: %x aggregate session ID: %x killCursors session ID: %x killCursors used same session as aggregate: yes killCursors session ID: %x killCursors used same session as aggregate: yes Unique session IDs used: 1 ===DONE=== PK.h]tests/bug0531-001.phptnu[--TEST-- PHPC-531: Segfault due to double free by corrupt BSON visitor (top-level) --FILE-- "world"]); $bson[4] = 1; echo throws(function() use ($bson) { toPHP($bson); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected unknown BSON type 0x31 for field path "hello". Are you using the latest driver? ===DONE=== PK.h]>tests/bug1162-001.phptnu[--TEST-- MongoDB\Driver\Cursor segfault dumping cursor while iterating with IteratorIterator --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $cursor = $manager->executeQuery(NS, $query); $iterator = new IteratorIterator($cursor); $iterator->rewind(); var_dump($cursor); $iterator->next(); var_dump($cursor); $iterator->next(); var_dump($cursor); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Cursor)#%d (%d) {%A } object(MongoDB\Driver\Cursor)#%d (%d) {%A } object(MongoDB\Driver\Cursor)#%d (%d) {%A } ===DONE=== PK.h]977%tests/bson-utcdatetime_error-003.phptnu[--TEST-- MongoDB\BSON\UTCDateTime constructor requires strings to parse as 64-bit integers --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "1234.5678" as 64-bit integer for MongoDB\BSON\UTCDateTime initialization ===DONE=== PK.h]sݒ//tests/top-parseError-040.phptnu[--TEST-- Top-level document validity: Bad DBpointer (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]kfXXtests/bug0924-002.phptnu[--TEST-- PHPC-924: Cursor::setTypeMap() may unnecessarily convert first BSON document (__pclass) --SKIPIF-- --FILE-- data['_id'] = $id; } public function bsonSerialize() { return (object) $this->data; } public function bsonUnserialize(array $data) { printf("%s called for ID: %s\n", __METHOD__, $data['_id']); $this->data = $data; } } $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(new MyDocument('a')); $bulk->insert(new MyDocument('b')); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); /* This type map will have no effect on the query result, since the document * only contains an ID, but it allows us to test for unnecessary conversion. */ $cursor->setTypeMap(['array' => 'array']); foreach ($cursor as $i => $document) { var_dump($document); } ?> ===DONE=== --EXPECTF-- MyDocument::bsonUnserialize called for ID: a object(MyDocument)#%d (%d) { ["data":"MyDocument":private]=> array(2) { ["_id"]=> string(1) "a" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(10) "MyDocument" ["type"]=> int(128) } } } MyDocument::bsonUnserialize called for ID: b object(MyDocument)#%d (%d) { ["data":"MyDocument":private]=> array(2) { ["_id"]=> string(1) "b" ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(10) "MyDocument" ["type"]=> int(128) } } } ===DONE=== PK.h]~W&tests/decimal128-4-parseError-014.phptnu[--TEST-- Decimal128: [dqbsr432] check rounding modes heeded (Rounded & Inexact) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]!tests/string-decodeError-002.phptnu[--TEST-- String: bad string length: -1 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h] LI~SS'tests/manager-executeBulkWrite-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() with upserted ids --SKIPIF-- --FILE-- false]); $bulk->update(array('x' => 'foo'), array('$set' => array('y' => 'foo')), array('upsert' => true)); $bulk->update(array('x' => 'bar'), array('$set' => array('y' => 'bar')), array('upsert' => true)); $bulk->update(array('x' => 'foo'), array('$set' => array('y' => 'bar'))); $result = $manager->executeBulkWrite(NS, $bulk); echo "\n===> WriteResult\n"; printWriteResult($result); echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- ===> WriteResult server: %s:%d insertedCount: 0 matchedCount: 1 modifiedCount: 1 upsertedCount: 2 deletedCount: 0 upsertedId[0]: object(%s\ObjectId)#%d (%d) { ["oid"]=> string(24) "%s" } upsertedId[1]: object(%s\ObjectId)#%d (%d) { ["oid"]=> string(24) "%s" } ===> Collection array(2) { [0]=> object(stdClass)#%d (3) { ["_id"]=> object(%s\ObjectId)#%d (%d) { ["oid"]=> string(24) "%s" } ["x"]=> string(3) "foo" ["y"]=> string(3) "bar" } [1]=> object(stdClass)#%d (3) { ["_id"]=> object(%s\ObjectId)#%d (%d) { ["oid"]=> string(24) "%s" } ["x"]=> string(3) "bar" ["y"]=> string(3) "bar" } } ===DONE=== PK.h]>tests/update-multi-001.phptnu[--TEST-- PHPC-243: Manager::executeUpdate() & Bulk->update() w/o multi --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 2)); $bulk->insert(array('_id' => 3, 'x' => 2)); $bulk->insert(array('_id' => 4, 'x' => 2)); $bulk->insert(array('_id' => 5, 'x' => 1)); $bulk->insert(array('_id' => 6, 'x' => 1)); $manager->executeBulkWrite(NS, $bulk); $bulk = new \MongoDB\Driver\BulkWrite; $bulk->update( array('x' => 1), array('$set' => array('x' => 3)), array('multi' => false, 'upsert' => false) ); $result = $manager->executeBulkWrite(NS, $bulk); printf("Changed %d out of expected 1 (_id=1)\n", $result->getModifiedCount()); $bulk = new \MongoDB\Driver\BulkWrite; $bulk->update( array('x' => 1), array('$set' => array('x' => 2)), array('multi' => true, 'upsert' => false) ); $result = $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); printf("Changed %d out of expected 2, (_id=5, _id=6)\n", $result->getModifiedCount()); $bulk = new MongoDB\Driver\BulkWrite; $bulk->update( array('x' => 2), array('$set' => array('x' => 4)), array('multi' => false, 'upsert' => false) ); $result = $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); printf("Changed %d out of expected 1, (_id=2)\n", $result->getModifiedCount()); $bulk = new MongoDB\Driver\BulkWrite; $bulk->update( array('x' => 2), array('$set' => array('x' => 41)), array('multi' => false, 'upsert' => false) ); $result = $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); printf("Changed %d out of expected 1 (id_=3)\n", $result->getModifiedCount()); $bulk = new MongoDB\Driver\BulkWrite; $bulk->update( array('x' => 2), array('$set' => array('x' => 42)), array('multi' => true, 'upsert' => false) ); $result = $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); printf("Changed %d out of expected 3 (_id=4, _id=5, _id=6)\n", $result->getModifiedCount()); ?> ===DONE=== --EXPECTF-- Changed 1 out of expected 1 (_id=1) array(6) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(3) } [1]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(2) } [2]=> object(stdClass)#%d (2) { ["_id"]=> int(3) ["x"]=> int(2) } [3]=> object(stdClass)#%d (2) { ["_id"]=> int(4) ["x"]=> int(2) } [4]=> object(stdClass)#%d (2) { ["_id"]=> int(5) ["x"]=> int(2) } [5]=> object(stdClass)#%d (2) { ["_id"]=> int(6) ["x"]=> int(2) } } Changed 2 out of expected 2, (_id=5, _id=6) array(6) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(3) } [1]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(4) } [2]=> object(stdClass)#%d (2) { ["_id"]=> int(3) ["x"]=> int(2) } [3]=> object(stdClass)#%d (2) { ["_id"]=> int(4) ["x"]=> int(2) } [4]=> object(stdClass)#%d (2) { ["_id"]=> int(5) ["x"]=> int(2) } [5]=> object(stdClass)#%d (2) { ["_id"]=> int(6) ["x"]=> int(2) } } Changed 1 out of expected 1, (_id=2) array(6) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(3) } [1]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(4) } [2]=> object(stdClass)#%d (2) { ["_id"]=> int(3) ["x"]=> int(41) } [3]=> object(stdClass)#%d (2) { ["_id"]=> int(4) ["x"]=> int(2) } [4]=> object(stdClass)#%d (2) { ["_id"]=> int(5) ["x"]=> int(2) } [5]=> object(stdClass)#%d (2) { ["_id"]=> int(6) ["x"]=> int(2) } } Changed 1 out of expected 1 (id_=3) array(6) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(3) } [1]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(4) } [2]=> object(stdClass)#%d (2) { ["_id"]=> int(3) ["x"]=> int(41) } [3]=> object(stdClass)#%d (2) { ["_id"]=> int(4) ["x"]=> int(42) } [4]=> object(stdClass)#%d (2) { ["_id"]=> int(5) ["x"]=> int(42) } [5]=> object(stdClass)#%d (2) { ["_id"]=> int(6) ["x"]=> int(42) } } Changed 3 out of expected 3 (_id=4, _id=5, _id=6) ===DONE=== PK.h] !tests/decimal128-3-valid-172.phptnu[--TEST-- Decimal128: [basx179] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003e3000 {"d":{"$numberDecimal":"126.5"}} 18000000136400f1040000000000000000000000003e3000 18000000136400f1040000000000000000000000003e3000 ===DONE===PK.h]z{O(tests/bson-utcdatetime-int-size-002.phptnu[--TEST-- MongoDB\BSON\UTCDateTime integer parsing from number (64-bit) --SKIPIF-- --INI-- date.timezone=UTC error_reporting=-1 dislay_errors=1 --FILE-- toDateTime()); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\UTCDateTime)#%d (1) { ["milliseconds"]=> string(13) "1416445411987" } object(DateTime)#%d (3) { ["date"]=> string(26) "2014-11-20 01:03:31.987000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" } ===DONE=== PK.h]wXX!tests/decimal128-2-valid-132.phptnu[--TEST-- Decimal128: [decq754] DPD all-highs cases (includes the 24 redundant codes) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364007903000000000000000000000000403000 {"d":{"$numberDecimal":"889"}} 180000001364007903000000000000000000000000403000 ===DONE===PK.h]@tests/null-valid-001.phptnu[--TEST-- Null type: Null --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 080000000a610000 {"a":null} 080000000a610000 ===DONE===PK.h]s{ TT!tests/decimal128-2-valid-073.phptnu[--TEST-- Decimal128: [decq652] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000e1f50500000000000000000000fe5f00 {"d":{"$numberDecimal":"1.00000000E+6119"}} 1800000013640000e1f50500000000000000000000fe5f00 ===DONE===PK.h]Ʒ'tests/commandFailedEvent-debug-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandFailedEvent debug output --SKIPIF-- --FILE-- addSubscriber(new MySubscriber); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$unsupported' => 1]], ]); /* Note: Although executeCommand() throws a CommandException, CommandFailedEvent * will report a ServerException for its "error" property (PHPC-1990) */ throws(function() use ($manager, $command) { $manager->executeCommand(DATABASE_NAME, $command); }, MongoDB\Driver\Exception\CommandException::class); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Monitoring\CommandFailedEvent)#%d (%d) { ["commandName"]=> string(9) "aggregate" ["durationMicros"]=> int(%d) ["error"]=> object(MongoDB\Driver\Exception\ServerException)#%d (%d) {%A } ["operationId"]=> string(%d) "%d" ["reply"]=> object(stdClass)#%d (%d) {%A } ["requestId"]=> string(%d) "%d" ["server"]=> object(MongoDB\Driver\Server)#%d (%d) {%A } ["serviceId"]=> %r(NULL|object\(MongoDB\\BSON\\ObjectId\).*)%r } OK: Got MongoDB\Driver\Exception\CommandException ===DONE=== PK.h]2j00tests/session-004.phptnu[--TEST-- MongoDB\Driver\Session spec test: snapshot option is incompatible with writes --DESCRIPTION-- PHPC-1875: Disable writes on snapshot sessions --SKIPIF-- --FILE-- startSession(['snapshot' => true]); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); try { $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); } catch (MongoDB\Driver\Exception\BulkWriteException $e) { /* Note: we intentionally do not assert the server's error message for the * client specifying a read concern on a write command. It is sufficient to * assert that the error code is InvalidOptions(72). */ var_dump($e->getCode() === 72); } ?> ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]ƞ66$tests/manager-addSubscriber-003.phptnu[--TEST-- MongoDB\Driver\Manager::addSubscriber() adds reference to subscriber --SKIPIF-- --FILE-- getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { printf("commandSucceeded: %s\n", $event->getCommandName()); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { printf("commandFailed: %s\n", $event->getCommandName()); } public function __destruct() { echo __METHOD__, "\n"; } } $m = create_test_manager(); $pingCommand = new MongoDB\Driver\Command(['ping' => 1]); $subscriber = new MySubscriber; echo "adding subscriber\n"; $m->addSubscriber($subscriber); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); echo "unsetting subscriber\n"; unset($subscriber); printf("ping: %d\n", $m->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); echo "unsetting manager\n"; unset($manager); ?> --EXPECT-- adding subscriber commandStarted: ping commandSucceeded: ping ping: 1 unsetting subscriber commandStarted: ping commandSucceeded: ping ping: 1 unsetting manager MySubscriber::__destruct PK.h]MM(tests/bson-regex-get_properties-002.phptnu[--TEST-- MongoDB\BSON\Regex get_properties handler (foreach) --FILE-- $value) { var_dump($key); var_dump($value); } ?> ===DONE=== --EXPECT-- string(7) "pattern" string(6) "regexp" string(5) "flags" string(1) "i" ===DONE=== PK.h]l#88#tests/standalone-x509-auth-002.phptnu[--TEST-- Connect to MongoDB with SSL and X509 auth (stream context) --SKIPIF-- --FILE-- stream_context_create([ 'ssl' => [ // libmongoc does not allow the hostname to be overridden as "server" 'allow_invalid_hostname' => true, 'allow_self_signed' => false, // "weak_cert_validation" alias 'cafile' => SSL_DIR . '/ca.pem', // "ca_file" alias 'local_cert' => SSL_DIR . '/client.pem', // "pem_file" alias ], ]), ]; $manager = create_test_manager(URI, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); var_dump($cursor->toArray()[0]); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["ok"]=> float(1) } ===DONE=== PK.h])33!tests/decimal128-2-valid-120.phptnu[--TEST-- Decimal128: [decq722] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004e00000000000000000000000000403000 {"d":{"$numberDecimal":"78"}} 180000001364004e00000000000000000000000000403000 ===DONE===PK.h] !tests/writeconcern-constants.phptnu[--TEST-- MongoDB\Driver\WriteConcern constants --FILE-- ===DONE=== --EXPECTF-- string(8) "majority" ===DONE=== PK.h]]e(tests/bson-maxkey-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\MaxKey::jsonSerialize() return value --FILE-- jsonSerialize()); ?> ===DONE=== --EXPECT-- array(1) { ["$maxKey"]=> int(1) } ===DONE=== PK.h]ZII!tests/decimal128-5-valid-044.phptnu[--TEST-- Decimal128: [decq619] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000a1edccce1bc2d300000000fe5f00 {"d":{"$numberDecimal":"1.000000000000000000000000E+6135"}} 18000000136400000000a1edccce1bc2d300000000fe5f00 18000000136400000000a1edccce1bc2d300000000fe5f00 ===DONE===PK.h]1h&&tests/regex-valid-001.phptnu[--TEST-- Regular Expression type: empty regex with no options --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0a0000000b6100000000 {"a":{"$regularExpression":{"pattern":"","options":""}}} 0a0000000b6100000000 ===DONE===PK.h]][!tests/decimal128-3-valid-253.phptnu[--TEST-- Decimal128: [basx195] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000383000 {"d":{"$numberDecimal":"0.1265"}} 18000000136400f104000000000000000000000000383000 18000000136400f104000000000000000000000000383000 ===DONE===PK.h]7aa!tests/decimal128-2-valid-014.phptnu[--TEST-- Decimal128: [decq002] (mostly derived from the Strawman 4 document and examples) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ee020000000000000000000000003cb000 {"d":{"$numberDecimal":"-7.50"}} 18000000136400ee020000000000000000000000003cb000 ===DONE===PK.h]$'tests/manager-executeBulkWrite-011.phptnu[--TEST-- MongoDB\Driver\BulkWrite: bypassDocumentValidation option --SKIPIF-- --FILE-- COLLECTION_NAME, 'validator' => ['x' => ['$type' => 'number']], ]); $manager->executeCommand(DATABASE_NAME, $command); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1, 'x' => 1]); $bulk->insert(['_id' => 2, 'x' => 2]); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite(['bypassDocumentValidation' => true]); $bulk->update(['_id' => 2], ['$set' => ['x' => 'two']]); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite(['bypassDocumentValidation' => true]); $bulk->insert(['_id' => 3, 'x' => 'three']); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 4, 'x' => 'four']); echo throws(function() use($manager, $bulk) { $manager->executeBulkWrite(NS, $bulk); }, "MongoDB\Driver\Exception\BulkWriteException"), "\n"; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->update(['_id' => 1], ['$set' => ['x' => 'one']]); echo throws(function() use($manager, $bulk) { $manager->executeBulkWrite(NS, $bulk); }, "MongoDB\Driver\Exception\BulkWriteException"), "\n"; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->update(['_id' => 2], ['$set' => ['x' => 2]]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\BulkWriteException Document failed validation OK: Got MongoDB\Driver\Exception\BulkWriteException Document failed validation array(3) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(1) } [1]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(2) } [2]=> object(stdClass)#%d (2) { ["_id"]=> int(3) ["x"]=> string(5) "three" } } ===DONE=== PK.h]ڵtests/dbref-valid-002.phptnu[--TEST-- Document type (DBRef sub-documents): DBRef with database --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 4300000003646272656600370000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e0224646200030000006462000000 {"dbref":{"$ref":"collection","$id":{"$oid":"58921b3e6e32ab156a22b59e"},"$db":"db"}} 4300000003646272656600370000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e0224646200030000006462000000 ===DONE===PK.h]rq.,tests/bson-dbpointer-get_properties-001.phptnu[--TEST-- MongoDB\BSON\DBPointer get_properties handler (get_object_vars) --FILE-- dbptr; var_dump(get_object_vars($dbptr)); ?> ===DONE=== --EXPECT-- array(2) { ["ref"]=> string(11) "phongo.test" ["id"]=> string(24) "5a2e78accd485d55b405ac12" } ===DONE=== PK.h]X7gg-tests/bson-int64-serialization_error-003.phptnu[--TEST-- MongoDB\BSON\Int64 unserialization requires "int" string field (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Int64 initialization requires "integer" string field ===DONE=== PK.h]h JJ!tests/decimal128-1-valid-008.phptnu[--TEST-- Decimal128: Special - Canonical Negative Infinity --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000000f800 {"d":{"$numberDecimal":"-Infinity"}} 18000000136400000000000000000000000000000000f800 ===DONE===PK.h]?ٌ[[tests/bug0671-003.phptnu[--TEST-- PHPC-671: Segfault if Manager is already freed when using WriteResult's Server --SKIPIF-- --FILE-- insert(['_id' => 1]); $writeResult = $manager->executeBulkWrite(NS, $bulk); unset($manager); $server = $writeResult->getServer(); /* WriteResult only uses the client to construct a Server. We need to interact * with the Server to test for a user-after-free. */ $cursor = $server->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); var_dump($cursor->toArray()[0]); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["ok"]=> float(1)%A } ===DONE=== PK.h]:%<,tests/bson-decimal128-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\Decimal128::jsonSerialize() with json_encode() --SKIPIF-- --FILE-- new MongoDB\BSON\Decimal128('12389719287312')]; $json = json_encode($doc); echo toJSON(fromPHP($doc)), "\n"; echo $json, "\n"; var_dump(toPHP(fromJSON($json))); ?> ===DONE=== --EXPECTF-- { "foo" : { "$numberDecimal" : "12389719287312" } } {"foo":{"$numberDecimal":"12389719287312"}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(14) "12389719287312" } } ===DONE=== PK.h]V6XX1tests/bson-dbpointer-serialization_error-001.phptnu[--TEST-- MongoDB\BSON\DBPointer unserialization requires "ref" and "id" string fields (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\DBPointer initialization requires "ref" and "id" string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\DBPointer initialization requires "ref" and "id" string fields ===DONE=== PK.h]KG!tests/decimal128-3-valid-145.phptnu[--TEST-- Decimal128: [basx260] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003e3000 {"d":{"$numberDecimal":"126.5"}} 18000000136400f1040000000000000000000000003e3000 18000000136400f1040000000000000000000000003e3000 ===DONE===PK.h] \*tests/bson-timestamp-getIncrement-001.phptnu[--TEST-- MongoDB\BSON\Timestamp::getIncrement() --FILE-- getIncrement()); echo "\n"; } ?> ===DONE=== --EXPECTF-- Test [1234:5678] int(1234) Test [2147483647:0] int(2147483647) Test [0:2147483647] int(0) ===DONE=== PK.h]+Z3 3 $tests/cursor-tailable_error-002.phptnu[--TEST-- MongoDB\Driver\Cursor cursor killed during tailable iteration --SKIPIF-- --FILE-- insert(['_id' => $i]); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted %d document(s): %s\n", $writeResult->getInsertedCount(), implode(', ', range($from, $to))); } $manager = create_test_manager(); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command([ 'create' => COLLECTION_NAME, 'capped' => true, 'size' => 1048576, ])); insert($manager, 1, 3); echo throws(function() use ($manager) { $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['tailable' => true])); $it = new IteratorIterator($cursor); $numAwaitAttempts = 0; $maxAwaitAttempts = 7; for ($it->rewind(); $numAwaitAttempts < $maxAwaitAttempts; $it->next()) { $document = $it->current(); if ($document !== null) { printf("{_id: %d}\n", $document->_id); continue; } if ($numAwaitAttempts === 2) { insert($manager, 4, 6); } if ($numAwaitAttempts === 5) { $cursor->getServer()->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command([ 'killCursors' => COLLECTION_NAME, 'cursors' => [ $cursor->getId() ], ])); } echo "Awaiting results...\n"; $numAwaitAttempts += 1; } }, 'MongoDB\Driver\Exception\RuntimeException'), "\n"; ?> ===DONE=== --EXPECTF-- Inserted 3 document(s): 1, 2, 3 {_id: 1} {_id: 2} {_id: 3} Awaiting results... Awaiting results... Inserted 3 document(s): 4, 5, 6 Awaiting results... {_id: 4} {_id: 5} {_id: 6} Awaiting results... Awaiting results... Awaiting results... OK: Got MongoDB\Driver\Exception\RuntimeException %r(Cursor not found, cursor id: \d+|cursor id \d+ not found|Cursor not found \(namespace: '.*', id: \d+\)\.)%r ===DONE=== PK.h]YӬ!tests/bson-fromPHP_error-001.phptnu[--TEST-- MongoDB\BSON\fromPHP(): bsonSerialize() must return an array or stdClass --FILE-- data = $data; } public function bsonSerialize() { return $this->data; } } $invalidValues = array(null, 123, 'foo', true, new MyDocument); echo "Testing top-level objects\n"; foreach ($invalidValues as $invalidValue) { try { hex_dump(fromPHP(new MyDocument($invalidValue))); } catch (MongoDB\Driver\Exception\UnexpectedValueException $e) { echo $e->getMessage(), "\n"; } } echo "\nTesting nested objects\n"; foreach ($invalidValues as $invalidValue) { try { hex_dump(fromPHP(new MyDocument(array('nested' => new MyDocument($invalidValue))))); } catch (MongoDB\Driver\Exception\UnexpectedValueException $e) { echo $e->getMessage(), "\n"; } } ?> ===DONE=== --EXPECTF-- Testing top-level objects Expected MyDocument::bsonSerialize() to return an array or stdClass, %r(null|NULL)%r given Expected MyDocument::bsonSerialize() to return an array or stdClass, int%S given Expected MyDocument::bsonSerialize() to return an array or stdClass, string given Expected MyDocument::bsonSerialize() to return an array or stdClass, bool%S given Expected MyDocument::bsonSerialize() to return an array or stdClass, MyDocument given Testing nested objects Expected MyDocument::bsonSerialize() to return an array or stdClass, %r(null|NULL)%r given Expected MyDocument::bsonSerialize() to return an array or stdClass, int%S given Expected MyDocument::bsonSerialize() to return an array or stdClass, string given Expected MyDocument::bsonSerialize() to return an array or stdClass, bool%S given Expected MyDocument::bsonSerialize() to return an array or stdClass, MyDocument given ===DONE=== PK.h]jrfII!tests/decimal128-2-valid-126.phptnu[--TEST-- Decimal128: [decq740] DPD: one of each of the huffman groups --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000903000000000000000000000000403000 {"d":{"$numberDecimal":"777"}} 180000001364000903000000000000000000000000403000 ===DONE===PK.h]~&&tests/decimal128-6-parseError-003.phptnu[--TEST-- Decimal128: Just a decimal place --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h](7&tests/decimal128-7-parseError-046.phptnu[--TEST-- Decimal128: [basx543] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]X  !tests/decimal128-3-valid-238.phptnu[--TEST-- Decimal128: [basx307] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000523000 {"d":{"$numberDecimal":"1.0E+10"}} 180000001364000a00000000000000000000000000523000 180000001364000a00000000000000000000000000523000 ===DONE===PK.h]utests/dbref-valid-009.phptnu[--TEST-- Document type (DBRef sub-documents): Sub-document resembles DBRef but $db is not a string --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 4000000003646272656600340000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e1024646200010000000000 {"dbref":{"$ref":"collection","$id":{"$oid":"58921b3e6e32ab156a22b59e"},"$db":{"$numberInt":"1"}}} 4000000003646272656600340000000224726566000b000000636f6c6c656374696f6e00072469640058921b3e6e32ab156a22b59e1024646200010000000000 ===DONE===PK.h]AA!tests/decimal128-5-valid-048.phptnu[--TEST-- Decimal128: [decq627] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000010632d5ec76b050000000000fe5f00 {"d":{"$numberDecimal":"1.00000000000000000000E+6131"}} 18000000136400000010632d5ec76b050000000000fe5f00 18000000136400000010632d5ec76b050000000000fe5f00 ===DONE===PK.h]>m@AA"tests/bson-fromJSON_error-001.phptnu[--TEST-- MongoDB\BSON\fromJSON(): invalid JSON --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE=== PK.h]ϩ2!tests/decimal128-3-valid-138.phptnu[--TEST-- Decimal128: [basx256] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000363000 {"d":{"$numberDecimal":"0.01265"}} 18000000136400f104000000000000000000000000363000 18000000136400f104000000000000000000000000363000 ===DONE===PK.h]?"tests/bson-objectid_error-002.phptnu[--TEST-- MongoDB\BSON\ObjectId cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyObjectId %s final class %SMongoDB\BSON\ObjectId%S in %s on line %d PK.h]4tests/manager-ctor-disableClientPersistence-008.phptnu[--TEST-- MongoDB\Driver\Manager with disableClientPersistence=true referenced by CommandStartedEvent --SKIPIF-- --FILE-- getCommandName()); $this->events[] = $event; } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $subscriber = new MySubscriber; ini_set('mongodb.debug', 'stderr'); $manager = create_test_manager(URI, [], ['disableClientPersistence' => true]); ini_set('mongodb.debug', ''); MongoDB\Driver\Monitoring\addSubscriber($subscriber); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command); /* Remove the subscriber to ensure that the extension does not hold an internal * reference to it. This guarantees that the event object (and final Manager * reference) will be freed when the subscriber is later unset. */ MongoDB\Driver\Monitoring\removeSubscriber($subscriber); echo "Unsetting manager\n"; ini_set('mongodb.debug', 'stderr'); unset($manager); ini_set('mongodb.debug', ''); echo "Unsetting subscriber\n"; ini_set('mongodb.debug', 'stderr'); unset($subscriber); ini_set('mongodb.debug', ''); ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client Command started: ping Unsetting manager Unsetting subscriber%A [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A ===DONE=== PK.h]*+tests/readpreference-getModeString-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference::getModeString() --FILE-- getModeString()); } ?> ===DONE=== --EXPECT-- string(7) "primary" string(16) "primaryPreferred" string(9) "secondary" string(18) "secondaryPreferred" string(7) "nearest" ===DONE=== PK.h]^2tests/bson-javascript-serialization_error-006.phptnu[--TEST-- MongoDB\BSON\Javascript unserialization does not allow code to contain null bytes (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Code cannot contain null bytes ===DONE=== PK.h]xCC,tests/manager-ctor-duplicate-option-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct() with duplicate read preference option --FILE-- 'primary', 'readpreference' => 'secondary']); echo $manager->getReadPreference()->getMode(), "\n"; ?> ===DONE=== --EXPECT-- 2 ===DONE=== PK.h]##!tests/decimal128-1-valid-018.phptnu[--TEST-- Decimal128: Regular - -0 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000040b000 {"d":{"$numberDecimal":"-0"}} 18000000136400000000000000000000000000000040b000 ===DONE===PK.h]l&tests/decimal128-7-parseError-041.phptnu[--TEST-- Decimal128: [basx574] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]lhtests/bson-fromPHP-003.phptnu[--TEST-- MongoDB\BSON\fromPHP(): Encoding non-Persistable objects as a document field value --FILE-- new MongoDB\BSON\UTCDateTime('1416445411987')), array(new MyDocument), array('x' => new MyDocument), ); foreach ($tests as $document) { $s = fromPHP($document); echo "Test ", toJSON($s), "\n"; hex_dump($s); } ?> ===DONE=== --EXPECT-- Test { "0" : { "$date" : 1416445411987 } } 0 : 10 00 00 00 09 30 00 93 c2 b9 ca 49 01 00 00 00 [.....0.....I....] Test { "x" : { "$date" : 1416445411987 } } 0 : 10 00 00 00 09 78 00 93 c2 b9 ca 49 01 00 00 00 [.....x.....I....] Test { "0" : { "baz" : 3 } } 0 : 16 00 00 00 03 30 00 0e 00 00 00 10 62 61 7a 00 [.....0......baz.] 10 : 03 00 00 00 00 00 [......] Test { "x" : { "baz" : 3 } } 0 : 16 00 00 00 03 78 00 0e 00 00 00 10 62 61 7a 00 [.....x......baz.] 10 : 03 00 00 00 00 00 [......] ===DONE=== PK.h]%tests/cursorid-serialization-001.phptnu[--TEST-- MongoDB\Driver\CursorId serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> %rint\(7250031947823432848\)|string\(19\) "7250031947823432848"%r } bool(true) C:23:"MongoDB\Driver\CursorId":42:{a:1:{s:2:"id";s:19:"7250031947823432848";}} object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> %rint\(7250031947823432848\)|string\(19\) "7250031947823432848"%r } object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> int(0) } bool(true) C:23:"MongoDB\Driver\CursorId":23:{a:1:{s:2:"id";s:1:"0";}} object(MongoDB\Driver\CursorId)#%d (%d) { ["id"]=> int(0) } ===DONE=== PK.h]é[¾tests/manager-ctor-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct() with URI --FILE-- ===DONE=== --EXPECT-- ===DONE=== PK.h]~wYtests/top-valid-001.phptnu[--TEST-- Top-level document validity: Dollar-prefixed key in top-level document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0f00000010246b6579002a00000000 {"$key":{"$numberInt":"42"}} 0f00000010246b6579002a00000000 ===DONE===PK.h]!tests/decimal128-3-valid-250.phptnu[--TEST-- Decimal128: [basx198] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003e3000 {"d":{"$numberDecimal":"126.5"}} 18000000136400f1040000000000000000000000003e3000 18000000136400f1040000000000000000000000003e3000 ===DONE===PK.h]1 tests/binary-parseError-005.phptnu[--TEST-- Binary type: $uuid invalid value--too many hyphens --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]snntests/binary-valid-012.phptnu[--TEST-- Binary type: $type query operator (conflicts with legacy $binary form with $type field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000000378001000000010247479706500020000000000 {"x":{"$type":{"$numberInt":"2"}}} 180000000378001000000010247479706500020000000000 ===DONE===PK.h]&Ctests/session-debug-003.phptnu[--TEST-- MongoDB\Driver\Session debug output (causalConsistency=false) --SKIPIF-- --FILE-- startSession(['causalConsistency' => false]); var_dump($session); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Session)#%d (%d) { ["logicalSessionId"]=> array(1) { ["id"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" ["type"]=> int(4) } } ["clusterTime"]=> NULL ["causalConsistency"]=> bool(false) ["snapshot"]=> bool(false) ["operationTime"]=> NULL ["server"]=> NULL ["inTransaction"]=> bool(false) ["transactionState"]=> string(4) "none" ["transactionOptions"]=> NULL } ===DONE=== PK.h]Z&tests/decimal128-7-parseError-009.phptnu[--TEST-- Decimal128: [basx503] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]rg*v,,tests/document-valid-006.phptnu[--TEST-- Document type (sub-documents): Dotted key in sub-document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000000378001000000002612e62000200000063000000 {"x":{"a.b":"c"}} 180000000378001000000002612e62000200000063000000 ===DONE===PK.h]"n?&tests/decimal128-7-parseError-023.phptnu[--TEST-- Decimal128: [basx581] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]E'tests/manager-executeBulkWrite-009.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() update one document with upsert --SKIPIF-- --FILE-- update( array('_id' => 1), array('$set' => array('x' => 1)), array('multi' => false, 'upsert' => true) ); $result = $manager->executeBulkWrite(NS, $bulk); echo "\n===> WriteResult\n"; printWriteResult($result); echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- ===> WriteResult server: %s:%d insertedCount: 0 matchedCount: 0 modifiedCount: 0 upsertedCount: 1 deletedCount: 0 upsertedId[0]: int(1) ===> Collection array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(1) } } ===DONE=== PK.h]733!tests/decimal128-2-valid-111.phptnu[--TEST-- Decimal128: [decq713] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004500000000000000000000000000403000 {"d":{"$numberDecimal":"69"}} 180000001364004500000000000000000000000000403000 ===DONE===PK.h]A&tests/decimal128-7-parseError-042.phptnu[--TEST-- Decimal128: [basx530] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]FDtests/cursorid-002.phptnu[--TEST-- MongoDB\Driver\CursorId BSON serialization for killCursors command --SKIPIF-- --FILE-- selectServer(new \MongoDB\Driver\ReadPreference('primary')); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $server->executeBulkWrite(NS, $bulk); $cursor = $server->executeQuery(NS, new MongoDB\Driver\Query([], ['batchSize' => 2])); $cursorId = $cursor->getId(); $command = new MongoDB\Driver\Command([ 'killCursors' => COLLECTION_NAME, 'cursors' => [ $cursorId ], ]); /* Since the killCursors command result includes cursor IDs as 64-bit integers, * unserializing the result document requires a 64-bit platform. */ $result = $server->executeCommand(DATABASE_NAME, $command)->toArray()[0]; printf("Killed %d cursor(s)\n", count($result->cursorsKilled)); printf("Killed expected cursor: %s\n", (string) $cursorId === (string) $result->cursorsKilled[0] ? 'yes' : 'no'); ?> ===DONE=== --EXPECT-- Killed 1 cursor(s) Killed expected cursor: yes ===DONE=== PK.h]8#-&tests/decimal128-7-parseError-034.phptnu[--TEST-- Decimal128: [basx561] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]dMH11'tests/code_w_scope-decodeError-005.phptnu[--TEST-- Javascript Code with Scope: field length too long (clips outer doc) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]/,tests/manager-ctor-directconnection-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): directConnection option --SKIPIF-- --FILE-- false]); $server = $manager->selectServer(new \MongoDB\Driver\ReadPreference('primaryPreferred')); printf("Topology has multiple nodes when directConnection=false: %s\n", count($manager->getServers()) > 1 ? 'true' : 'false'); $uri = sprintf('mongodb://%s:%d', $server->getHost(), $server->getPort()); $manager2 = create_test_manager($uri, ['directConnection' => true]); $server2 = $manager2->selectServer(new \MongoDB\Driver\ReadPreference('primaryPreferred')); printf("Topology has single node when directConnection=true: %s\n", count($manager2->getServers()) == 1 ? 'true' : 'false'); printf("Single node in topology matches seed in URI: %s\n", ($server2 == $server) ? 'true' : 'false'); ?> ===DONE=== --EXPECT-- Topology has multiple nodes when directConnection=false: true Topology has single node when directConnection=true: true Single node in topology matches seed in URI: true ===DONE=== PK.h]b%%!tests/decimal128-3-valid-040.phptnu[--TEST-- Decimal128: [basx293] some more negative zeros [systematic tests below] --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000032b000 {"d":{"$numberDecimal":"-0E-7"}} 18000000136400000000000000000000000000000032b000 18000000136400000000000000000000000000000032b000 ===DONE===PK.h]2(tests/bson-int64-get_properties-002.phptnu[--TEST-- MongoDB\BSON\Int64 get_properties handler (foreach) --FILE-- $value) { var_dump($key); var_dump($value); } } ?> ===DONE=== --EXPECT-- string(7) "integer" string(19) "9223372036854775807" string(7) "integer" string(20) "-9223372036854775808" string(7) "integer" string(1) "0" ===DONE=== PK.h]qa>>(tests/bson-binary-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\Binary::jsonSerialize() return value --FILE-- jsonSerialize()); ?> ===DONE=== --EXPECT-- array(2) { ["$binary"]=> string(20) "Z2FyZ2xlYmxhc3Rlcg==" ["$type"]=> string(2) "18" } ===DONE=== PK.h]j88#tests/manager-executeQuery-002.phptnu[--TEST-- MongoDB\Driver\Manager::executeQuery() one document (find command) --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 2, 'y' => 3)); $bulk->insert(array('_id' => 2, 'x' => 3, 'y' => 4)); $bulk->insert(array('_id' => 3, 'x' => 4, 'y' => 5)); $manager->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query(array('x' => 3), array('projection' => array('y' => 1))); $qr = $manager->executeQuery(NS, $query); var_dump($qr instanceof MongoDB\Driver\Cursor); var_dump($qr); $server = $qr->getServer(); var_dump($server instanceof MongoDB\Driver\Server); var_dump($server->getHost()); var_dump($server->getPort()); var_dump(iterator_to_array($qr)); ?> ===DONE=== --EXPECTF-- bool(true) object(MongoDB\Driver\Cursor)#%d (%d) { ["database"]=> string(6) "phongo" ["collection"]=> string(32) "manager_manager_executeQuery_002" ["query"]=> object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { ["x"]=> int(3) } ["options"]=> object(stdClass)#%d (%d) { ["projection"]=> object(stdClass)#%d (%d) { ["y"]=> int(1) } } ["readConcern"]=> NULL } ["command"]=> NULL ["readPreference"]=> NULL ["session"]=> NULL ["isDead"]=> bool(false) ["currentIndex"]=> int(0) ["currentDocument"]=> NULL ["server"]=> object(MongoDB\Driver\Server)#%d (%d) { %a } } bool(true) string(%d) "%s" int(%d) array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["y"]=> int(4) } } ===DONE=== PK.h]{H tests/bug0592.phptnu[--TEST-- PHPC-592: Property name corrupted when unserializing 64-bit integer on 32-bit platform --SKIPIF-- --FILE-- getMessage(), "\n"; } echo "\n"; } ?> ===DONE=== --EXPECTF-- Test { "x": { "$numberLong": "-2147483648" }} object(stdClass)#%d (%d) { ["x"]=> int(-2147483648) } Test { "x": { "$numberLong": "2147483647" }} object(stdClass)#%d (%d) { ["x"]=> int(2147483647) } Test { "x": { "$numberLong": "4294967294" }} object(stdClass)#%d (%d) { ["x"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(10) "4294967294" } } Test { "x": { "$numberLong": "4294967295" }} object(stdClass)#%d (%d) { ["x"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(10) "4294967295" } } Test { "x": { "$numberLong": "9223372036854775807" }} object(stdClass)#%d (%d) { ["x"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(19) "9223372036854775807" } } Test { "longFieldName": { "$numberLong": "-2147483648" }} object(stdClass)#%d (%d) { ["longFieldName"]=> int(-2147483648) } Test { "longFieldName": { "$numberLong": "2147483647" }} object(stdClass)#%d (%d) { ["longFieldName"]=> int(2147483647) } Test { "longFieldName": { "$numberLong": "4294967294" }} object(stdClass)#%d (%d) { ["longFieldName"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(10) "4294967294" } } Test { "longFieldName": { "$numberLong": "4294967295" }} object(stdClass)#%d (%d) { ["longFieldName"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(10) "4294967295" } } Test { "longFieldName": { "$numberLong": "9223372036854775807" }} object(stdClass)#%d (%d) { ["longFieldName"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(19) "9223372036854775807" } } ===DONE=== PK.h]] 3tests/bson-utcdatetime-serialization_error-003.phptnu[--TEST-- MongoDB\BSON\UTCDateTime unserialization requires "milliseconds" integer or numeric string field (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\UTCDateTime initialization requires "milliseconds" integer or numeric string field ===DONE=== PK.h]kHDTT+tests/readpreference-serialization-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- 'ny']]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, [['dc' => 'ny'], ['dc' => 'sf', 'use' => 'reporting'], []]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['maxStalenessSeconds' => 1000]), new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY, null, ['hedge' => ['enabled' => true]]), ]; foreach ($tests as $test) { var_dump($test); var_dump($test instanceof Serializable); echo $s = serialize($test), "\n"; var_dump(unserialize($s)); echo "\n"; } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } bool(true) C:29:"MongoDB\Driver\ReadPreference":31:{a:1:{s:4:"mode";s:7:"primary";}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "primary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } bool(true) C:29:"MongoDB\Driver\ReadPreference":41:{a:1:{s:4:"mode";s:16:"primaryPreferred";}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(16) "primaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } bool(true) C:29:"MongoDB\Driver\ReadPreference":33:{a:1:{s:4:"mode";s:9:"secondary";}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } bool(true) C:29:"MongoDB\Driver\ReadPreference":43:{a:1:{s:4:"mode";s:18:"secondaryPreferred";}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(18) "secondaryPreferred" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "nearest" } bool(true) C:29:"MongoDB\Driver\ReadPreference":31:{a:1:{s:4:"mode";s:7:"nearest";}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(7) "nearest" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } bool(true) C:29:"MongoDB\Driver\ReadPreference":33:{a:1:{s:4:"mode";s:9:"secondary";}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } } } bool(true) C:29:"MongoDB\Driver\ReadPreference":78:{a:2:{s:4:"mode";s:9:"secondary";s:4:"tags";a:1:{i:0;a:1:{s:2:"dc";s:2:"ny";}}}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(1) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(3) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } [1]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "sf" ["use"]=> string(9) "reporting" } [2]=> object(stdClass)#%d (%d) { } } } bool(true) C:29:"MongoDB\Driver\ReadPreference":142:{a:2:{s:4:"mode";s:9:"secondary";s:4:"tags";a:3:{i:0;a:1:{s:2:"dc";s:2:"ny";}i:1;a:2:{s:2:"dc";s:2:"sf";s:3:"use";s:9:"reporting";}i:2;a:0:{}}}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["tags"]=> array(3) { [0]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "ny" } [1]=> object(stdClass)#%d (%d) { ["dc"]=> string(2) "sf" ["use"]=> string(9) "reporting" } [2]=> object(stdClass)#%d (%d) { } } } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1000) } bool(true) C:29:"MongoDB\Driver\ReadPreference":67:{a:2:{s:4:"mode";s:9:"secondary";s:19:"maxStalenessSeconds";i:1000;}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(1000) } object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["hedge"]=> object(stdClass)#%d (%d) { ["enabled"]=> bool(true) } } bool(true) C:29:"MongoDB\Driver\ReadPreference":82:{a:2:{s:4:"mode";s:9:"secondary";s:5:"hedge";O:8:"stdClass":1:{s:7:"enabled";b:1;}}} object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> string(9) "secondary" ["hedge"]=> object(stdClass)#%d (%d) { ["enabled"]=> bool(true) } } ===DONE=== PK.h]tests/document-valid-001.phptnu[--TEST-- Document type (sub-documents): Empty subdoc --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0d000000037800050000000000 {"x":{}} 0d000000037800050000000000 ===DONE===PK.h]I!tests/decimal128-3-valid-067.phptnu[--TEST-- Decimal128: [basx678] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000002c3000 {"d":{"$numberDecimal":"0E-10"}} 1800000013640000000000000000000000000000002c3000 1800000013640000000000000000000000000000002c3000 ===DONE===PK.h]kr!1tests/bson-timestamp-serialization_error-004.phptnu[--TEST-- MongoDB\BSON\Timestamp unserialization requires strings to parse as 64-bit integers (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "1.23" as 64-bit integer increment for MongoDB\BSON\Timestamp initialization OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "5.67" as 64-bit integer timestamp for MongoDB\BSON\Timestamp initialization ===DONE=== PK.h]qD#tests/bson-timestamp_error-006.phptnu[--TEST-- MongoDB\BSON\Timestamp constructor requires integer or string arguments --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer or string, %r(null|NULL)%r given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer or string, %r(double|float)%r given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer or string, bool%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer or string, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer or string, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer or string, %r(null|NULL)%r given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer or string, %r(double|float)%r given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer or string, bool%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer or string, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer or string, stdClass given ===DONE=== PK.h]f(!tests/decimal128-3-valid-163.phptnu[--TEST-- Decimal128: [basx150] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000523000 {"d":{"$numberDecimal":"1E+9"}} 180000001364000100000000000000000000000000523000 180000001364000100000000000000000000000000523000 ===DONE===PK.h]$S!tests/decimal128-3-valid-087.phptnu[--TEST-- Decimal128: [basx664] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000363000 {"d":{"$numberDecimal":"0.00000"}} 180000001364000000000000000000000000000000363000 180000001364000000000000000000000000000000363000 ===DONE===PK.h]ptests/cursor-iterator-002.phptnu[--TEST-- MongoDB\Driver\Cursor does not allow iterating multiple times (toArray()) --SKIPIF-- --FILE-- insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); echo "\nFirst Cursor::toArray():\n"; var_dump($cursor->toArray()); echo "\nSecond Cursor::toArray():\n"; echo throws(function () use ($cursor) { var_dump($cursor->toArray()); }, MongoDB\Driver\Exception\LogicException::class), "\n"; ?> ===DONE=== --EXPECTF-- Inserted: 3 First Cursor::toArray(): array(3) { [0]=> object(stdClass)#%d (1) { ["_id"]=> int(0) } [1]=> object(stdClass)#%d (1) { ["_id"]=> int(1) } [2]=> object(stdClass)#%d (1) { ["_id"]=> int(2) } } Second Cursor::toArray(): OK: Got MongoDB\Driver\Exception\LogicException Cursors cannot rewind after starting iteration ===DONE=== PK.h]@N(tests/readpreference-ctor_error-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference construction (invalid mode) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Invalid mode: 42 ===DONE=== PK.h]$''!tests/decimal128-3-valid-083.phptnu[--TEST-- Decimal128: [basx297] some more negative zeros [systematic tests below] --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000038b000 {"d":{"$numberDecimal":"-0.0000"}} 18000000136400000000000000000000000000000038b000 18000000136400000000000000000000000000000038b000 ===DONE===PK.h]k_II!tests/decimal128-2-valid-011.phptnu[--TEST-- Decimal128: [decq008] derivative canonical plain strings --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ee020000000000000000000000003eb000 {"d":{"$numberDecimal":"-75.0"}} 18000000136400ee020000000000000000000000003eb000 ===DONE===PK.h]2+ee.tests/readconcern-serialization_error-002.phptnu[--TEST-- MongoDB\Driver\ReadConcern unserialization errors (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadConcern initialization requires "level" string field ===DONE===PK.h]q{  !tests/decimal128-3-valid-251.phptnu[--TEST-- Decimal128: [basx191] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000143000 {"d":{"$numberDecimal":"1.265E-19"}} 18000000136400f104000000000000000000000000143000 18000000136400f104000000000000000000000000143000 ===DONE===PK.h]nammtests/retryable-reads-001.phptnu[--TEST-- Retryable reads: executeReadCommand is retried once --SKIPIF-- --FILE-- getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(URI, ['retryReads' => true]); // Select a specific server for future operations to avoid mongos switching in sharded clusters $server = $manager->selectServer(new \MongoDB\Driver\ReadPreference('primary')); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $bulk->insert(['x' => 2]); $server->executeBulkWrite(NS, $bulk); configureTargetedFailPoint($server, 'failCommand', ['times' => 1], ['failCommands' => ['aggregate'], 'closeConnection' => true]); $observer = new Observer; MongoDB\Driver\Monitoring\addSubscriber($observer); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$group' => ['_id' => 1, 'n' => ['$sum' => 1]]], ], 'cursor' => (object) [], ]); $cursor = $server->executeReadCommand(DATABASE_NAME, $command); var_dump(iterator_to_array($cursor)); MongoDB\Driver\Monitoring\removeSubscriber($observer); ?> ===DONE=== --EXPECTF-- Command started: aggregate Command started: aggregate array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["n"]=> int(2) } } ===DONE=== PK.h]4]>33!tests/decimal128-3-valid-302.phptnu[--TEST-- Decimal128: [basx059] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f198670c08000000000000000000363000 {"d":{"$numberDecimal":"345678.54321"}} 18000000136400f198670c08000000000000000000363000 18000000136400f198670c08000000000000000000363000 ===DONE===PK.h]}$!tests/decimal128-3-valid-054.phptnu[--TEST-- Decimal128: [basx633] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000423000 {"d":{"$numberDecimal":"0E+1"}} 180000001364000000000000000000000000000000423000 180000001364000000000000000000000000000000423000 ===DONE===PK.h]NE!tests/decimal128-3-valid-148.phptnu[--TEST-- Decimal128: [basx252] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000283000 {"d":{"$numberDecimal":"1.265E-9"}} 18000000136400f104000000000000000000000000283000 18000000136400f104000000000000000000000000283000 ===DONE===PK.h]RٕRRtests/bug0923-002.phptnu[--TEST-- PHPC-923: Use zend_string_release() to free class names (__pclass) --FILE-- ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["x"]=> object(stdClass)#%d (%d) { ["__pclass"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(12) "MissingClass" ["type"]=> int(128) } } } array(1) { [0]=> string(12) "MissingClass" } ===DONE=== PK.h]!tests/bson-fromPHP_error-002.phptnu[--TEST-- MongoDB\BSON\fromPHP(): Encoding unknown Type objects as a document field value --FILE-- new UnknownType()), ); foreach ($tests as $document) { echo throws(function() use ($document) { fromPHP($document); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; } ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Unexpected MongoDB\BSON\Type instance: UnknownType OK: Got MongoDB\Driver\Exception\UnexpectedValueException Unexpected MongoDB\BSON\Type instance: UnknownType ===DONE=== PK.h]|&tests/server-executeBulkWrite-008.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $servers = $manager->getServers(); $selectedServer = array_pop($servers); $wrongServer = array_pop($servers); var_dump($selectedServer != $wrongServer); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() == $selectedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); echo throws(function () use ($wrongServer, $session) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $wrongServer->executeBulkWrite(NS, $bulk, ['session' => $session]); }, \MongoDB\Driver\Exception\BulkWriteException::class), "\n"; $session->commitTransaction(); var_dump($session->getServer() == $selectedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) OK: Got MongoDB\Driver\Exception\BulkWriteException Bulk write failed due to previous MongoDB\Driver\Exception\RuntimeException: Requested server id does not matched pinned server id bool(true) bool(false) ===DONE=== PK.h]1p  !tests/decimal128-3-valid-140.phptnu[--TEST-- Decimal128: [basx251] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000103000 {"d":{"$numberDecimal":"1.265E-21"}} 18000000136400f104000000000000000000000000103000 18000000136400f104000000000000000000000000103000 ===DONE===PK.h]`!tests/decimal128-3-valid-047.phptnu[--TEST-- Decimal128: [basx671] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003a3000 {"d":{"$numberDecimal":"0.000"}} 1800000013640000000000000000000000000000003a3000 1800000013640000000000000000000000000000003a3000 ===DONE===PK.h]4ߞDD!tests/decimal128-1-valid-029.phptnu[--TEST-- Decimal128: Scientific - 0 with Negative Exponent --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000007a2b00 {"d":{"$numberDecimal":"0E-611"}} 1800000013640000000000000000000000000000007a2b00 ===DONE===PK.h]b?!tests/decimal128-2-valid-017.phptnu[--TEST-- Decimal128: [decq125] Nmax and similar --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f2af967ed05c82de3297ff6fde3cfedf00 {"d":{"$numberDecimal":"-1.234567890123456789012345678901234E+6144"}} 18000000136400f2af967ed05c82de3297ff6fde3cfedf00 ===DONE===PK.h]'tests/document-valid-002.phptnu[--TEST-- Document type (sub-documents): Empty-string key subdoc --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 150000000378000d00000002000200000062000000 {"x":{"":"b"}} 150000000378000d00000002000200000062000000 ===DONE===PK.h]u$!tests/decimal128-2-valid-098.phptnu[--TEST-- Decimal128: [decq032] Nmax and similar --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffffff638e8d37c087adbe09edff5f00 {"d":{"$numberDecimal":"9.999999999999999999999999999999999E+6144"}} 18000000136400ffffffff638e8d37c087adbe09edff5f00 ===DONE===PK.h]!΢tests/query_error-001.phptnu[--TEST-- MongoDB\Driver\Query cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyQuery %s final class %SMongoDB\Driver\Query%S in %s on line %d PK.h]hf#tests/bson-dbpointer_error-002.phptnu[--TEST-- MongoDB\BSON\DBPointer cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyDBPointer %s final class %SMongoDB\BSON\DBPointer%S in %s on line %d PK.h] 3bb!tests/code_w_scope-valid-002.phptnu[--TEST-- Javascript Code with Scope: Non-empty code string, empty scope --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1a0000000f610012000000050000006162636400050000000000 {"a":{"$code":"abcd","$scope":{}}} 1a0000000f610012000000050000006162636400050000000000 ===DONE===PK.h]Q33!tests/decimal128-5-valid-055.phptnu[--TEST-- Decimal128: [decq641] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000a0724e18090000000000000000fe5f00 {"d":{"$numberDecimal":"1.0000000000000E+6124"}} 1800000013640000a0724e18090000000000000000fe5f00 1800000013640000a0724e18090000000000000000fe5f00 ===DONE===PK.h]us$tests/dbpointer-decodeError-002.phptnu[--TEST-- DBPointer type (deprecated): String with zero length --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]62  !tests/decimal128-3-valid-199.phptnu[--TEST-- Decimal128: [basx395] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000363000 {"d":{"$numberDecimal":"0.00007"}} 180000001364000700000000000000000000000000363000 180000001364000700000000000000000000000000363000 ===DONE===PK.h] tests/binary-parseError-002.phptnu[--TEST-- Binary type: $uuid invalid value--too short --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]6<\\!tests/decimal128-2-valid-069.phptnu[--TEST-- Decimal128: [decq644] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000010a5d4e8000000000000000000fe5f00 {"d":{"$numberDecimal":"1.000000000000E+6123"}} 180000001364000010a5d4e8000000000000000000fe5f00 ===DONE===PK.h]<|\!tests/binary-decodeError-003.phptnu[--TEST-- Binary type: subtype 0x02 length too long --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]>l#tests/readpreference_error-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyReadPreference %s final class %SMongoDB\Driver\ReadPreference%S in %s on line %d PK.h]J /3&tests/decimal128-6-parseError-005.phptnu[--TEST-- Decimal128: 2 decimal places --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]>>!tests/decimal128-2-valid-019.phptnu[--TEST-- Decimal128: [decq162] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364007b000000000000000000000000003cb000 {"d":{"$numberDecimal":"-1.23"}} 180000001364007b000000000000000000000000003cb000 ===DONE===PK.h]][]]'tests/manager-executeBulkWrite-003.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() delete one document --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 1)); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->delete(array('x' => 1), array('limit' => 1)); $result = $manager->executeBulkWrite(NS, $bulk); echo "\n===> WriteResult\n"; printWriteResult($result); echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- ===> WriteResult server: %s:%d insertedCount: 0 matchedCount: 0 modifiedCount: 0 upsertedCount: 0 deletedCount: 1 ===> Collection array(1) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(1) } } ===DONE=== PK.h][&].tests/bson-binary-serialization_error-003.phptnu[--TEST-- MongoDB\BSON\Binary unserialization requires 16-byte data length for UUID types (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 15 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 17 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 15 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected UUID length to be 16 bytes, 17 given ===DONE=== PK.h]N5tests/binary-valid-009.phptnu[--TEST-- Binary type: subtype 0x05 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1d000000057800100000000573ffd26444b34c6990e8e7d1dfc035d400 {"x":{"$binary":{"base64":"c\/\/SZESzTGmQ6OfR38A11A==","subType":"05"}}} 1d000000057800100000000573ffd26444b34c6990e8e7d1dfc035d400 ===DONE===PK.h]5!tests/decimal128-3-valid-233.phptnu[--TEST-- Decimal128: [basx339] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000323000 {"d":{"$numberDecimal":"0.0000010"}} 180000001364000a00000000000000000000000000323000 180000001364000a00000000000000000000000000323000 ===DONE===PK.h]ke((!tests/decimal128-3-valid-049.phptnu[--TEST-- Decimal128: [basx294] some more negative zeros [systematic tests below] --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000038b000 {"d":{"$numberDecimal":"-0.0000"}} 18000000136400000000000000000000000000000038b000 18000000136400000000000000000000000000000038b000 ===DONE===PK.h]3!tests/decimal128-3-valid-052.phptnu[--TEST-- Decimal128: [basx135] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000363000 {"d":{"$numberDecimal":"0.00000"}} 180000001364000000000000000000000000000000363000 180000001364000000000000000000000000000000363000 ===DONE===PK.h]$T,tests/bson-objectid-set_state_error-002.phptnu[--TEST-- MongoDB\BSON\ObjectId::__set_state() requires valid hex string --FILE-- '0123456789abcdefghijklmn']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\ObjectId::__set_state(['oid' => 'INVALID']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: 0123456789abcdefghijklmn OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: INVALID ===DONE=== PK.h]p&tests/decimal128-7-parseError-017.phptnu[--TEST-- Decimal128: [basx502] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]͎PNN$tests/cursor-tailable_error-001.phptnu[--TEST-- MongoDB\Driver\Cursor collection dropped during tailable iteration --SKIPIF-- --FILE-- insert(['_id' => $i]); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted %d document(s): %s\n", $writeResult->getInsertedCount(), implode(', ', range($from, $to))); } $manager = create_test_manager(); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command([ 'create' => COLLECTION_NAME, 'capped' => true, 'size' => 1048576, ])); insert($manager, 1, 3); echo throws(function() use ($manager) { $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['tailable' => true])); $it = new IteratorIterator($cursor); $numAwaitAttempts = 0; $maxAwaitAttempts = 7; for ($it->rewind(); $numAwaitAttempts < $maxAwaitAttempts; $it->next()) { $document = $it->current(); if ($document !== null) { printf("{_id: %d}\n", $document->_id); continue; } if ($numAwaitAttempts === 2) { insert($manager, 4, 6); } if ($numAwaitAttempts === 5) { $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['drop' => COLLECTION_NAME])); } echo "Awaiting results...\n"; $numAwaitAttempts += 1; } }, 'MongoDB\Driver\Exception\RuntimeException'), "\n"; ?> ===DONE=== --EXPECTF-- Inserted 3 document(s): 1, 2, 3 {_id: 1} {_id: 2} {_id: 3} Awaiting results... Awaiting results... Inserted 3 document(s): 4, 5, 6 Awaiting results... {_id: 4} {_id: 5} {_id: 6} Awaiting results... Awaiting results... Awaiting results... OK: Got MongoDB\Driver\Exception\RuntimeException %Scollection dropped%S ===DONE=== PK.h]Pm&tests/decimal128-7-parseError-022.phptnu[--TEST-- Decimal128: [basx578] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]B /tests/manager-ctor-write_concern-error-007.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid write concern (wtimeoutms range) --SKIPIF-- --FILE-- -1]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected wtimeoutMS to be >= 0, -1 given ===DONE=== PK.h]fstests/bson-toPHP_error-002.phptnu[--TEST-- MongoDB\BSON\toPHP(): BSON decoding exceptions --FILE-- getMessage(), "\n"; } } ?> ===DONE=== --EXPECT-- Could not read document from BSON reader Reading document did not exhaust input buffer ===DONE=== PK.h]&RKK+tests/bson-objectid-get_properties-002.phptnu[--TEST-- MongoDB\BSON\ObjectId get_properties handler (foreach) --FILE-- $value) { var_dump($key); var_dump($value); } ?> ===DONE=== --EXPECT-- string(3) "oid" string(24) "53e2a1c40640fd72175d4603" ===DONE=== PK.h]jtests/bug0894-001.phptnu[--TEST-- PHPC-849: BSON get_properties handlers leak during gc_possible_root() checks --FILE-- 42]), new MongoDB\BSON\MaxKey, new MongoDB\BSON\MinKey, new MongoDB\BSON\ObjectId, new MongoDB\BSON\Regex('foo', 'i'), new MongoDB\BSON\Timestamp(1234, 5678), new MongoDB\BSON\UTCDateTime, ]; printf("Created array of %d BSON objects\n", count($objects)); gc_collect_cycles(); ?> ===DONE=== --EXPECT-- Created array of 9 BSON objects ===DONE=== PK.h]e!J'tests/bson-toRelaxedJSON_error-002.phptnu[--TEST-- MongoDB\BSON\toRelaxedExtendedJSON(): BSON decoding exceptions for malformed documents --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not read document from BSON reader ===DONE=== PK.h] Gq!!!tests/decimal128-5-valid-064.phptnu[--TEST-- Decimal128: [decq659] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364001027000000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.0000E+6115"}} 180000001364001027000000000000000000000000fe5f00 180000001364001027000000000000000000000000fe5f00 ===DONE===PK.h]{앉+tests/bson-dbpointer-serialization-002.phptnu[--TEST-- MongoDB\BSON\DBPointer serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- dbref; var_dump($test); var_dump($s = serialize($test)); var_dump(unserialize($s)); echo "\n"; ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\DBPointer)#1 (2) { ["ref"]=> string(11) "phongo.test" ["id"]=> string(24) "5a2e78accd485d55b4050000" } string(104) "O:22:"MongoDB\BSON\DBPointer":2:{s:3:"ref";s:11:"phongo.test";s:2:"id";s:24:"5a2e78accd485d55b4050000";}" object(MongoDB\BSON\DBPointer)#2 (2) { ["ref"]=> string(11) "phongo.test" ["id"]=> string(24) "5a2e78accd485d55b4050000" } ===DONE=== PK.h]x[`(tests/server-executeQuery_error-001.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() with invalid options --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); echo throws(function() use ($server, $query) { $server->executeQuery(NS, $query, ['readPreference' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $query) { $server->executeQuery(NS, $query, ['readPreference' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $query) { $server->executeQuery(NS, $query, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $query) { $server->executeQuery(NS, $query, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given ===DONE=== PK.h]u|tests/bson-toPHP-010.phptnu[--TEST-- MongoDB\BSON\toPHP(): Setting fieldPath typemaps for compound types with wildcard keys --FILE-- 1, 'array' => [0 => [ 4, 5, 6 ], 1 => [ 7, 8, 9 ]], 'object' => ['one' => [ 4, 5, 6 ], 'two' => [ 7, 8, 9 ]], ] ); function fetch($bson, $typeMap = []) { return \MongoDB\BSON\toPHP($bson, $typeMap); } echo "\nSetting 'array.$' path to 'MyWildcardArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'array.$' => "MyWildcardArrayObject" ]]); var_dump($document instanceof stdClass); var_dump(is_array($document->array)); var_dump($document->array[0] instanceof MyWildcardArrayObject); var_dump($document->array[1] instanceof MyWildcardArrayObject); echo "\nSetting 'array.1' to 'MyArrayObject' and 'array.$' path to 'MyWildcardArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'array.1' => "MyArrayObject", 'array.$' => "MyWildcardArrayObject" ]]); var_dump($document instanceof stdClass); var_dump(is_array($document->array)); var_dump($document->array[0] instanceof MyWildcardArrayObject); var_dump($document->array[1] instanceof MyArrayObject); echo "\nSetting 'array.$' to 'MyWildcardArrayObject' and 'array.1' path to 'MyArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'array.$' => "MyWildcardArrayObject", 'array.1' => "MyArrayObject" ]]); var_dump($document instanceof stdClass); var_dump(is_array($document->array)); var_dump($document->array[0] instanceof MyWildcardArrayObject); var_dump($document->array[1] instanceof MyWildcardArrayObject); echo "\nSetting 'object.$' path to 'MyWildcardArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'object.$' => "MyWildcardArrayObject" ]]); var_dump($document instanceof stdClass); var_dump(is_object($document->object)); var_dump($document->object->one instanceof MyWildcardArrayObject); var_dump($document->object->two instanceof MyWildcardArrayObject); echo "\nSetting 'object.two' to 'MyArrayObject' and 'object.$' path to 'MyWildcardArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'object.two' => "MyArrayObject", 'object.$' => "MyWildcardArrayObject" ]]); var_dump($document instanceof stdClass); var_dump(is_object($document->object)); var_dump($document->object->one instanceof MyWildcardArrayObject); var_dump($document->object->two instanceof MyArrayObject); echo "\nSetting 'object.$' to 'MyWildcardArrayObject' and 'object.one' path to 'MyArrayObject'\n"; $document = fetch($bson, ["fieldPaths" => [ 'object.$' => "MyWildcardArrayObject", 'object.one' => "MyArrayObject" ]]); var_dump($document instanceof stdClass); var_dump(is_object($document->object)); var_dump($document->object->one instanceof MyWildcardArrayObject); var_dump($document->object->two instanceof MyWildcardArrayObject); ?> ===DONE=== --EXPECT-- Setting 'array.$' path to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'array.1' to 'MyArrayObject' and 'array.$' path to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'array.$' to 'MyWildcardArrayObject' and 'array.1' path to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'object.$' path to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'object.two' to 'MyArrayObject' and 'object.$' path to 'MyWildcardArrayObject' bool(true) bool(true) bool(true) bool(true) Setting 'object.$' to 'MyWildcardArrayObject' and 'object.one' path to 'MyArrayObject' bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]3s.tests/undefined-valid-001.phptnu[--TEST-- Undefined type (deprecated): Undefined --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0800000006610000 {"a":{"$undefined":true}} 0800000006610000 ===DONE===PK.h]/ tests/top-parseError-007.phptnu[--TEST-- Top-level document validity: Bad $oid (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]w!tests/manager-ctor_error-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid URI --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'not a valid connection string'. Invalid URI Schema, expecting 'mongodb://' or 'mongodb+srv://'. ===DONE=== PK.h]fAA!tests/decimal128-3-valid-189.phptnu[--TEST-- Decimal128: [basx411] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000263000 {"d":{"$numberDecimal":"7E-13"}} 180000001364000700000000000000000000000000263000 ===DONE===PK.h]Xtttests/cursor-isDead-004.phptnu[--TEST-- MongoDB\Driver\Cursor::isDead() with IteratorIterator (OP_QUERY) --SKIPIF-- =', '3.1'); ?> --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['batchSize' => 2])); $iterator = new IteratorIterator($cursor); $iterator->rewind(); for ($i = 0; $i < 3; $i++) { var_dump($cursor->isDead()); $iterator->next(); } var_dump($cursor->isDead()); ?> ===DONE=== --EXPECT-- bool(false) bool(false) bool(false) bool(true) ===DONE=== PK.h]X @  !tests/decimal128-3-valid-226.phptnu[--TEST-- Decimal128: [basx317] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000483000 {"d":{"$numberDecimal":"1.0E+5"}} 180000001364000a00000000000000000000000000483000 180000001364000a00000000000000000000000000483000 ===DONE===PK.h]s s $tests/manager-addSubscriber-002.phptnu[--TEST-- MongoDB\Driver\Manager::addSubscriber() with multiple Managers --SKIPIF-- --FILE-- id = $id; } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { printf("MySubscriber(%s) commandStarted: %s\n", $this->id, $event->getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { printf("MySubscriber(%s) commandSucceeded: %s\n", $this->id, $event->getCommandName()); } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { printf("MySubscriber(%s) commandFailed: %s\n", $this->id, $event->getCommandName()); } } /* The first two Managers will share the same libmongoc client. The third will * use a different client. */ $m1 = create_test_manager(); $m2 = create_test_manager(); $m3 = create_test_manager(null, [], ['disableClientPersistence' => true]); $s1 = new MySubscriber('s1_on_m1'); $s2 = new MySubscriber('s2_on_m3'); $m1->addSubscriber($s1); $m3->addSubscriber($s2); $pingCommand = new MongoDB\Driver\Command(['ping' => 1]); $unsupportedCommand = new MongoDB\Driver\Command(['unsupportedCommand' => 1]); printf("ping: %d\n", $m1->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); // s1_on_m1 will be notified because both Managers share the same client printf("ping: %d\n", $m2->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); printf("ping: %d\n", $m3->executeCommand(DATABASE_NAME, $pingCommand)->toArray()[0]->ok); throws(function () use ($m1, $unsupportedCommand) { $m1->executeCommand(DATABASE_NAME, $unsupportedCommand); }, MongoDB\Driver\Exception\CommandException::class); throws(function () use ($m2, $unsupportedCommand) { $m2->executeCommand(DATABASE_NAME, $unsupportedCommand); }, MongoDB\Driver\Exception\CommandException::class); throws(function () use ($m3, $unsupportedCommand) { $m3->executeCommand(DATABASE_NAME, $unsupportedCommand); }, MongoDB\Driver\Exception\CommandException::class); ?> --EXPECT-- MySubscriber(s1_on_m1) commandStarted: ping MySubscriber(s1_on_m1) commandSucceeded: ping ping: 1 MySubscriber(s1_on_m1) commandStarted: ping MySubscriber(s1_on_m1) commandSucceeded: ping ping: 1 MySubscriber(s2_on_m3) commandStarted: ping MySubscriber(s2_on_m3) commandSucceeded: ping ping: 1 MySubscriber(s1_on_m1) commandStarted: unsupportedCommand MySubscriber(s1_on_m1) commandFailed: unsupportedCommand OK: Got MongoDB\Driver\Exception\CommandException MySubscriber(s1_on_m1) commandStarted: unsupportedCommand MySubscriber(s1_on_m1) commandFailed: unsupportedCommand OK: Got MongoDB\Driver\Exception\CommandException MySubscriber(s2_on_m3) commandStarted: unsupportedCommand MySubscriber(s2_on_m3) commandFailed: unsupportedCommand OK: Got MongoDB\Driver\Exception\CommandException PK.h]E޶ tests/readconcern_error-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyReadConcern %s final class %SMongoDB\Driver\ReadConcern%S in %s on line %d PK.h]J-tests/bson-int64-serialization_error-004.phptnu[--TEST-- MongoDB\BSON\Int64 unserialization requires "int" string field to be valid (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "1234.5678" as 64-bit integer for MongoDB\BSON\Int64 initialization ===DONE=== PK.h]ptests/string-valid-002.phptnu[--TEST-- String: Single character --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 0e00000002610002000000620000 {"a":"b"} 0e00000002610002000000620000 ===DONE===PK.h]@!tests/decimal128-3-valid-221.phptnu[--TEST-- Decimal128: [basx327] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000003e3000 {"d":{"$numberDecimal":"1.0"}} 180000001364000a000000000000000000000000003e3000 180000001364000a000000000000000000000000003e3000 ===DONE===PK.h]>!tests/decimal128-3-valid-022.phptnu[--TEST-- Decimal128: [basx680] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]ytests/bug1067.phptnu[--TEST-- PHPC-1067: BSON document produces driver segfault with insert --FILE-- new MongoDB\BSON\ObjectID('111111111111111111111111'), '___________________________________' => new MongoDB\BSON\Regex('_______________________________________________________', 'i'), ]; $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert($x); ?> ==DONE== --EXPECT-- ==DONE== PK.h]&tests/cursor-setTypeMap_error-002.phptnu[--TEST-- Cursor::setTypeMap() error does not alter current element --SKIPIF-- --FILE-- insert(['_id' => 1]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); $iterator = new IteratorIterator($cursor); $iterator->rewind(); var_dump($iterator->current()); echo throws(function() use ($cursor) { $cursor->setTypeMap(['root' => 'MissingClass']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; /* IteratorIterator only invokes spl_dual_it_fetch() for rewind() and next(). * We rewind a second time to ensure that the Cursor iterator's current element * is fetched again is remains unchanged. */ $iterator->rewind(); var_dump($iterator->current()); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["_id"]=> int(1) } OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MissingClass does not exist object(stdClass)#%d (%d) { ["_id"]=> int(1) } ===DONE=== PK.h]F~!tests/writeconcern_error-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyWriteConcern %s final class %SMongoDB\Driver\WriteConcern%S in %s on line %d PK.h]"Χ~!tests/bson-regex-compare-002.phptnu[--TEST-- MongoDB\BSON\Regex comparisons (with flags) --FILE-- new MongoDB\BSON\Regex('regexp', 'm')); var_dump(new MongoDB\BSON\Regex('regexp', 'm') < new MongoDB\BSON\Regex('regexp', 'x')); var_dump(new MongoDB\BSON\Regex('regexp', 'm') > new MongoDB\BSON\Regex('regexp', 'i')); var_dump(new MongoDB\BSON\Regex('regexp', 'm') > new MongoDB\BSON\Regex('regexp')); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) bool(true) bool(true) ===DONE=== PK.h]~O!tests/decimal128-3-valid-289.phptnu[--TEST-- Decimal128: [basx236] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003e3000 {"d":{"$numberDecimal":"126.5"}} 18000000136400f1040000000000000000000000003e3000 18000000136400f1040000000000000000000000003e3000 ===DONE===PK.h]&'tests/manager-executeBulkWrite-012.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() with legacy write concern (replica set primary) --SKIPIF-- --FILE-- insert(['wc' => $wc]); $options = [ 'writeConcern' => new MongoDB\Driver\WriteConcern($wc), ]; $result = $manager->executeBulkWrite(NS, $bulk, $options); var_dump($result->isAcknowledged()); var_dump($result->getInsertedCount()); } ?> ===DONE=== --EXPECT-- bool(false) NULL bool(true) int(1) bool(true) int(1) bool(true) int(1) ===DONE=== PK.h](tests/bson-minkey-serialization-001.phptnu[--TEST-- MongoDB\BSON\MinKey serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\MinKey)#%d (%d) { } string(31) "C:19:"MongoDB\BSON\MinKey":0:{}" object(MongoDB\BSON\MinKey)#%d (%d) { } ===DONE=== PK.h]ѸȬtests/query-ctor-001.phptnu[--TEST-- MongoDB\Driver\Query construction should always encode __pclass for Persistable objects --SKIPIF-- --FILE-- id = $id; $this->child = $child; } public function bsonSerialize() { return [ '_id' => $this->id, 'child' => $this->child, ]; } public function bsonUnserialize(array $data) { $this->id = $data['_id']; $this->child = $data['child']; } } $manager = create_test_manager(); $document = new MyClass('foo', new MyClass('bar', new MyClass('baz'))); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(new MyClass('foo', new MyClass('bar', new MyClass('baz')))); $result = $manager->executeBulkWrite(NS, $bulk); printf("Inserted %d document(s)\n", $result->getInsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query($document)); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- Inserted 1 document(s) array(1) { [0]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "foo" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "bar" ["child":"MyClass":private]=> object(MyClass)#%d (%d) { ["id":"MyClass":private]=> string(3) "baz" ["child":"MyClass":private]=> NULL } } } } ===DONE=== PK.h]} } tests/bulkwrite-insert-004.phptnu[--TEST-- MongoDB\Driver\BulkWrite::insert() returns "_id" of inserted document --SKIPIF-- --FILE-- id = $id; } public function bsonSerialize() { return ['id' => $this->id]; } } class MyPersistableId extends MySerializableId implements MongoDB\BSON\Persistable { public function bsonUnserialize(array $data) { $this->id = $data['id']; } } $documents = [ ['x' => 1], ['_id' => new MongoDB\BSON\ObjectId('590b72d606e9660190656a55')], ['_id' => ['foo' => 1]], ['_id' => new MySerializableId('foo')], ['_id' => new MyPersistableId('bar')], ]; $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite(); foreach ($documents as $document) { var_dump($bulk->insert($document)); } $result = $manager->executeBulkWrite(NS, $bulk); printf("Inserted %d document(s)\n", $result->getInsertedCount()); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "590b72d606e9660190656a55" } object(stdClass)#%d (%d) { ["foo"]=> int(1) } object(stdClass)#%d (%d) { ["id"]=> string(3) "foo" } object(MyPersistableId)#%d (%d) { ["id"]=> string(3) "bar" } Inserted 5 document(s) array(5) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } ["x"]=> int(1) } [1]=> object(stdClass)#%d (%d) { ["_id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "590b72d606e9660190656a55" } } [2]=> object(stdClass)#%d (%d) { ["_id"]=> object(stdClass)#%d (%d) { ["foo"]=> int(1) } } [3]=> object(stdClass)#%d (%d) { ["_id"]=> object(stdClass)#%d (%d) { ["id"]=> string(3) "foo" } } [4]=> object(stdClass)#%d (%d) { ["_id"]=> object(MyPersistableId)#%d (%d) { ["id"]=> string(3) "bar" } } } ===DONE=== PK.h]k<33'tests/code_w_scope-decodeError-010.phptnu[--TEST-- Javascript Code with Scope: bad code string: length longer than field --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]}DXXtests/bug0357.phptnu[--TEST-- PHPC-357: The exception for "invalid namespace" does not list the broken name --SKIPIF-- --FILE-- executeQuery( 'demo', $c ); }, "MongoDB\\Driver\\Exception\\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Invalid namespace provided: demo ===DONE=== PK.h]ō55!tests/decimal128-2-valid-039.phptnu[--TEST-- Decimal128: [decq431] negative zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000046b000 {"d":{"$numberDecimal":"-0E+3"}} 18000000136400000000000000000000000000000046b000 ===DONE===PK.h]1Lq tests/server-getLatency-001.phptnu[--TEST-- MongoDB\Driver\Server::getLatency() returns a non-negative integer when set --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference('primary')); var_dump($server->getLatency()); ?> ===DONE=== --EXPECTF-- int(%d) ===DONE=== PK.h] |uu&tests/serverApi-serialization-002.phptnu[--TEST-- MongoDB\Driver\ServerApi serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> NULL ["deprecationErrors"]=> NULL } O:24:"MongoDB\Driver\ServerApi":3:{s:7:"version";s:1:"1";s:6:"strict";N;s:17:"deprecationErrors";N;} object(MongoDB\Driver\ServerApi)#5 (3) { ["version"]=> string(1) "1" ["strict"]=> NULL ["deprecationErrors"]=> NULL } object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> bool(true) ["deprecationErrors"]=> NULL } O:24:"MongoDB\Driver\ServerApi":3:{s:7:"version";s:1:"1";s:6:"strict";b:1;s:17:"deprecationErrors";N;} object(MongoDB\Driver\ServerApi)#5 (3) { ["version"]=> string(1) "1" ["strict"]=> bool(true) ["deprecationErrors"]=> NULL } object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> NULL ["deprecationErrors"]=> bool(true) } O:24:"MongoDB\Driver\ServerApi":3:{s:7:"version";s:1:"1";s:6:"strict";N;s:17:"deprecationErrors";b:1;} object(MongoDB\Driver\ServerApi)#5 (3) { ["version"]=> string(1) "1" ["strict"]=> NULL ["deprecationErrors"]=> bool(true) } object(MongoDB\Driver\ServerApi)#%d (%d) { ["version"]=> string(1) "1" ["strict"]=> bool(false) ["deprecationErrors"]=> bool(false) } O:24:"MongoDB\Driver\ServerApi":3:{s:7:"version";s:1:"1";s:6:"strict";b:0;s:17:"deprecationErrors";b:0;} object(MongoDB\Driver\ServerApi)#5 (3) { ["version"]=> string(1) "1" ["strict"]=> bool(false) ["deprecationErrors"]=> bool(false) } ===DONE=== PK.h]{Gf==+tests/bson-undefined-serialization-001.phptnu[--TEST-- MongoDB\BSON\Undefined serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- undefined); var_dump($s = serialize($undefined)); var_dump(unserialize($s)); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Undefined)#%d (%d) { } string(34) "C:22:"MongoDB\BSON\Undefined":0:{}" object(MongoDB\BSON\Undefined)#%d (%d) { } ===DONE=== PK.h]5tests/bson-dbpointer-001.phptnu[--TEST-- MongoDB\BSON\DBPointer #001 --FILE-- $test) { echo "Test#{$n}", "\n"; $s = fromPHP($test); $testagain = toPHP($s); var_dump($test->dbref instanceof MongoDB\BSON\DBPointer); var_dump($testagain->dbref instanceof MongoDB\BSON\DBPointer); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- Test#0 bool(true) bool(true) string(76) "{ "dbref" : { "$ref" : "phongo.test", "$id" : "5a2e78accd485d55b405ac12" } }" string(76) "{ "dbref" : { "$ref" : "phongo.test", "$id" : "5a2e78accd485d55b405ac12" } }" bool(true) ===DONE=== PK.h]E/22-tests/clientEncryption-createDataKey-001.phptnu[--TEST-- MongoDB\Driver\ClientEncryption::createDataKey() --SKIPIF-- --FILE-- createClientEncryption(['keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary($key, 0)]]]); var_dump($clientEncryption->createDataKey('local')); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%a" ["type"]=> int(4) } ===DONE=== PK.h]"tests/server-executeQuery-012.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $servers = $manager->getServers(); $selectedServer = array_pop($servers); $wrongServer = array_pop($servers); var_dump($selectedServer != $wrongServer); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $query = new MongoDB\Driver\Query([]); $selectedServer->executeQuery(NS, $query, ['session' => $session]); var_dump($session->getServer() == $selectedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); echo throws(function () use ($wrongServer, $session) { $query = new MongoDB\Driver\Query([]); $wrongServer->executeQuery(NS, $query, ['session' => $session]); }, \MongoDB\Driver\Exception\RuntimeException::class), "\n"; $session->commitTransaction(); var_dump($session->getServer() == $selectedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $selectedServer->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) OK: Got MongoDB\Driver\Exception\RuntimeException Requested server id does not matched pinned server id bool(true) bool(false) ===DONE=== PK.h]wi!tests/decimal128-3-valid-231.phptnu[--TEST-- Decimal128: [basx337] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000343000 {"d":{"$numberDecimal":"0.000010"}} 180000001364000a00000000000000000000000000343000 180000001364000a00000000000000000000000000343000 ===DONE===PK.h]oj>>tests/bson-objectid-004.phptnu[--TEST-- MongoDB\BSON\ObjectId #004 Constructor supports uppercase hexadecimal strings --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "56925b7330616224d0000001" } ===DONE=== PK.h]pkUU#tests/bson-regex-set_state-002.phptnu[--TEST-- MongoDB\BSON\Regex::__set_state() will alphabetize flags --FILE-- 'regexp', 'flags' => 'xusmli', ])); echo "\n"; ?> ===DONE=== --EXPECTF-- MongoDB\BSON\Regex::__set_state(array( %w'pattern' => 'regexp', %w'flags' => 'ilmsux', )) ===DONE=== PK.h]vVDTtests/session-003.phptnu[--TEST-- MongoDB\Driver\Session spec test: session cannot be used for different clients --SKIPIF-- --FILE-- 60000]); $otherManager = create_test_manager(URI, ['heartbeatFrequencyMS' => 90000]); // Create a session with the second Manager (associated with different client) $session = $otherManager->startSession(); echo "\nTesting executeBulkWrite()\n"; echo throws(function() use ($manager, $session) { $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo "\nTesting executeCommand()\n"; echo throws(function() use ($manager, $session) { $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo "\nTesting executeQuery()\n"; echo throws(function() use ($manager, $session) { $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- Testing executeBulkWrite() OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use Session started from a different Manager Testing executeCommand() OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use Session started from a different Manager Testing executeQuery() OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot use Session started from a different Manager ===DONE=== PK.h]t&tests/decimal128-4-parseError-018.phptnu[--TEST-- Decimal128: [dqbas938] overflow results at different rounding modes (Overflow & Inexact & Rounded) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h])  )tests/bson-regex-set_state_error-002.phptnu[--TEST-- MongoDB\BSON\Regex::__set_state() does not allow pattern or flags to contain null bytes --DESCRIPTION-- BSON Corpus spec prose test #1 --FILE-- "regexp\0", 'flags' => 'i']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Regex::__set_state(['pattern' => 'regexp', 'flags' => "i\0"]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Pattern cannot contain null bytes OK: Got MongoDB\Driver\Exception\InvalidArgumentException Flags cannot contain null bytes ===DONE=== PK.h] --FILE-- 'admin.keys'], ]; foreach ($tests as $driverOptions) { echo throws(function() use ($driverOptions) { $manager = create_test_manager(null, [], ['autoEncryption' => $driverOptions]); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n\n"; } ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Key vault namespace option required OK: Got MongoDB\Driver\Exception\InvalidArgumentException KMS providers option required ===DONE=== PK.h]G/tests/standalone-x509-extract_username-001.phptnu[--TEST-- Connect to MongoDB with SSL and X509 auth and username retrieved from cert --XFAIL-- parse_url() tests must be reimplemented (PHPC-1177) --SKIPIF-- --FILE-- true, 'weak_cert_validation' => false, 'ca_file' => SSL_DIR . '/ca.pem', 'pem_file' => SSL_DIR . '/client.pem', ]; $uriOptions = ['authMechanism' => 'MONGODB-X509', 'ssl' => true]; $parsed = parse_url(URI); $uri = sprintf('mongodb://%s:%d', $parsed['host'], $parsed['port']); $manager = create_test_manager($uri, $uriOptions, $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); var_dump($cursor->toArray()[0]); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["ok"]=> float(1) } ===DONE=== PK.h]f\+tests/bson-objectid-tostring_error-001.phptnu[--TEST-- MongoDB\BSON\ObjectId raises warning on invalid arguments --SKIPIF-- =', '7.99'); ?> --FILE-- __toString(1); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\ObjectId::__toString() expects exactly 0 parameters, 1 given ===DONE=== PK.h])tests/int32-valid-002.phptnu[--TEST-- Int32 type: MaxValue --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 0c000000106900ffffff7f00 {"i":{"$numberInt":"2147483647"}} {"i":2147483647} 0c000000106900ffffff7f00 {"i":2147483647} ===DONE===PK.h]!tests/decimal128-1-valid-036.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - Exponent Normalization --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640064000000000000000000000000002cb000 {"d":{"$numberDecimal":"-1.00E-8"}} 1800000013640064000000000000000000000000002cb000 1800000013640064000000000000000000000000002cb000 ===DONE===PK.h]2qױ"tests/server-executeQuery-007.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() with negative limit returns a single batch --SKIPIF-- --FILE-- executeQuery(NS, new MongoDB\Driver\Query(array()))->getServer(); // load fixtures for test $bulk = new \MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1, 'x' => 2, 'y' => 3]); $bulk->insert(['_id' => 2, 'x' => 3, 'y' => 4]); $bulk->insert(['_id' => 3, 'x' => 4, 'y' => 5]); $server->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query([], ['limit' => -2]); $cursor = $server->executeQuery(NS, $query); var_dump($cursor instanceof MongoDB\Driver\Cursor); var_dump($server == $cursor->getServer()); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- bool(true) bool(true) array(2) { [0]=> object(stdClass)#%d (3) { ["_id"]=> int(1) ["x"]=> int(2) ["y"]=> int(3) } [1]=> object(stdClass)#%d (3) { ["_id"]=> int(2) ["x"]=> int(3) ["y"]=> int(4) } } ===DONE=== PK.h]D tests/server-getLatency-002.phptnu[--TEST-- MongoDB\Driver\Server::getLatency() returns null when unset (e.g. load balancer) --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference('primary')); var_dump($server->getLatency()); ?> ===DONE=== --EXPECT-- NULL ===DONE=== PK.h]uj_Ptests/minkey-valid-001.phptnu[--TEST-- Minkey type: Minkey --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 08000000ff610000 {"a":{"$minKey":1}} 08000000ff610000 ===DONE===PK.h]}uQQ&tests/writeconcern-var_export-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern: var_export() --FILE-- 1 new MongoDB\Driver\WriteConcern(-2, 1000), // 64-bit wtimeout may be reported as integer or string MongoDB\Driver\WriteConcern::__set_state(['w' => 2, 'wtimeout' => '2147483648']), ]; foreach ($tests as $test) { echo var_export($test, true), "\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 'majority', )) MongoDB\Driver\WriteConcern::__set_state(array( )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => -1, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 0, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 'majority', )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 'tag', )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, 'j' => false, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, 'wtimeout' => 1000, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, 'j' => true, 'wtimeout' => 1000, )) MongoDB\Driver\WriteConcern::__set_state(array( 'j' => true, )) MongoDB\Driver\WriteConcern::__set_state(array( 'wtimeout' => 1000, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 2, 'wtimeout' => %r2147483648|'2147483648'%r, )) ===DONE=== PK.h]7**!tests/decimal128-3-valid-115.phptnu[--TEST-- Decimal128: [basx655] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000004a3000 {"d":{"$numberDecimal":"0E+5"}} 1800000013640000000000000000000000000000004a3000 ===DONE===PK.h]$ݠ!tests/writeconcern-debug-003.phptnu[--TEST-- MongoDB\Driver\WriteConcern debug output --FILE-- 1 new MongoDB\Driver\WriteConcern(-2, 1000), // 64-bit wtimeout may be reported as integer or string MongoDB\Driver\WriteConcern::__set_state(['w' => 2, 'wtimeout' => '2147483648']), ]; foreach ($tests as $test) { var_dump($test); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } object(MongoDB\Driver\WriteConcern)#%d (%d) { } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(-1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(3) "tag" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(false) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(true) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["j"]=> bool(true) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> %rint\(2147483648\)|string\(10\) "2147483648"%r } ===DONE=== PK.h]4tests/manager-ctor-disableClientPersistence-005.phptnu[--TEST-- MongoDB\Driver\Manager with disableClientPersistence=true referenced by WriteResult --SKIPIF-- --FILE-- true]); ini_set('mongodb.debug', ''); echo "Inserting data\n"; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['_id' => 1, 'x' => 2, 'y' => 3]); $bulk->insert(['_id' => 2, 'x' => 3, 'y' => 4]); $bulk->insert(['_id' => 3, 'x' => 4, 'y' => 5]); $writeResult = $manager->executeBulkWrite(NS, $bulk); echo "Unsetting manager\n"; ini_set('mongodb.debug', 'stderr'); unset($manager); ini_set('mongodb.debug', ''); echo "Unsetting writeResult\n"; ini_set('mongodb.debug', 'stderr'); unset($writeResult); ini_set('mongodb.debug', ''); ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client Inserting data Unsetting manager Unsetting writeResult%A [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A ===DONE=== PK.h]qbR33!tests/decimal128-2-valid-121.phptnu[--TEST-- Decimal128: [decq723] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004f00000000000000000000000000403000 {"d":{"$numberDecimal":"79"}} 180000001364004f00000000000000000000000000403000 ===DONE===PK.h]Ho1tests/readpreference-serialization_error-001.phptnu[--TEST-- MongoDB\Driver\ReadPreference unserialization errors (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires specific values for "mode" string field OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "mode" field to be string ===DONE=== PK.h] +tests/cursorid-serialization_error-001.phptnu[--TEST-- MongoDB\Driver\CursorId unserialization errors (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\CursorId initialization requires "id" string field ===DONE=== PK.h]#etests/top-parseError-036.phptnu[--TEST-- Top-level document validity: Bad $minKey (extra field) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]>M!tests/decimal128-3-valid-275.phptnu[--TEST-- Decimal128: [basx218] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000403000 {"d":{"$numberDecimal":"1265"}} 18000000136400f104000000000000000000000000403000 18000000136400f104000000000000000000000000403000 ===DONE===PK.h]=#tests/bson-timestamp_error-003.phptnu[--TEST-- MongoDB\BSON\Timestamp constructor requires positive unsigned 32-bit integers --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected increment to be an unsigned 32-bit integer, -2147483648 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected timestamp to be an unsigned 32-bit integer, -2147483648 given ===DONE=== PK.h]~  !tests/session-endSession-002.phptnu[--TEST-- MongoDB\Driver\Session::endSession() Calling method multiple times --SKIPIF-- --FILE-- startSession(); $sessionA->endSession(); $sessionA->endSession(); $sessionA->endSession(); ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]ťi!tests/decimal128-3-valid-298.phptnu[--TEST-- Decimal128: [basx241] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000483000 {"d":{"$numberDecimal":"1.265E+7"}} 18000000136400f104000000000000000000000000483000 18000000136400f104000000000000000000000000483000 ===DONE===PK.h]ץtests/bson-utcdatetime-005.phptnu[--TEST-- MongoDB\BSON\UTCDateTime construction from DateTime --INI-- date.timezone=UTC --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "%d" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1215282385000" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1293894181012" } object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "2551871655999" } ===DONE=== PK.h]3==-tests/manager-executeBulkWrite_error-010.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() cannot combine session with unacknowledged write concern --SKIPIF-- --FILE-- insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, [ 'session' => $manager->startSession(), 'writeConcern' => new MongoDB\Driver\WriteConcern(0), ]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { $manager = create_test_manager(URI, ['w' => 0]); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, [ 'session' => $manager->startSession(), ]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot combine "session" option with an unacknowledged write concern OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot combine "session" option with an unacknowledged write concern ===DONE=== PK.h]= tests/bson-regex_error-001.phptnu[--TEST-- MongoDB\BSON\Regex argument count errors --SKIPIF-- =', '7.99'); ?> --FILE-- getPattern(true); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; echo throws(function() use ($regex) { $regex->getFlags(true); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; echo throws(function() { new MongoDB\BSON\Regex; }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex::getPattern() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex::getFlags() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Regex::__construct() expects at least 1 %r(argument|parameter)%r, 0 given ===DONE=== PK.h]7dV&tests/decimal128-7-parseError-026.phptnu[--TEST-- Decimal128: [basx579] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]iNҍ##'tests/manager-executeBulkWrite-001.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 2)); $bulk->update(array('x' => 2), array('$set' => array('x' => 1)), array("limit" => 1, "upsert" => false)); $bulk->update(array('_id' => 3), array('$set' => array('x' => 3)), array("limit" => 1, "upsert" => true)); $bulk->delete(array('x' => 1), array("limit" => 1)); $result = $manager->executeBulkWrite(NS, $bulk); echo "\n===> WriteResult\n"; printWriteResult($result); echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- ===> WriteResult server: %s:%d insertedCount: 2 matchedCount: 1 modifiedCount: 1 upsertedCount: 1 deletedCount: 1 upsertedId[3]: int(3) ===> Collection array(2) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(1) } [1]=> object(stdClass)#%d (2) { ["_id"]=> int(3) ["x"]=> int(3) } } ===DONE=== PK.h]bb!tests/decimal128-2-valid-066.phptnu[--TEST-- Decimal128: [decq638] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000080c6a47e8d0300000000000000fe5f00 {"d":{"$numberDecimal":"1.000000000000000E+6126"}} 180000001364000080c6a47e8d0300000000000000fe5f00 ===DONE===PK.h]'tests/manager-executeBulkWrite-008.phptnu[--TEST-- MongoDB\Driver\Manager::executeBulkWrite() update multiple documents with no upsert --SKIPIF-- --FILE-- insert(array('_id' => 1, 'x' => 1)); $bulk->insert(array('_id' => 2, 'x' => 1)); $bulk->insert(array('_id' => 3, 'x' => 3)); $manager->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->update( array('x' => 1), array('$set' => array('x' => 2)), array('multi' => true, 'upsert' => false) ); $result = $manager->executeBulkWrite(NS, $bulk); echo "\n===> WriteResult\n"; printWriteResult($result); echo "\n===> Collection\n"; $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array())); var_dump(iterator_to_array($cursor)); ?> ===DONE=== --EXPECTF-- ===> WriteResult server: %s:%d insertedCount: 0 matchedCount: 2 modifiedCount: 2 upsertedCount: 0 deletedCount: 0 ===> Collection array(3) { [0]=> object(stdClass)#%d (2) { ["_id"]=> int(1) ["x"]=> int(2) } [1]=> object(stdClass)#%d (2) { ["_id"]=> int(2) ["x"]=> int(2) } [2]=> object(stdClass)#%d (2) { ["_id"]=> int(3) ["x"]=> int(3) } } ===DONE=== PK.h]Y966!tests/decimal128-5-valid-005.phptnu[--TEST-- Decimal128: [decq079] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000000000 {"d":{"$numberDecimal":"1.0E-6175"}} 180000001364000a00000000000000000000000000000000 180000001364000a00000000000000000000000000000000 ===DONE===PK.h]qtests/int32-valid-001.phptnu[--TEST-- Int32 type: MinValue --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 0c0000001069000000008000 {"i":{"$numberInt":"-2147483648"}} {"i":-2147483648} 0c0000001069000000008000 {"i":-2147483648} ===DONE===PK.h]c&!tests/decimal128-3-valid-202.phptnu[--TEST-- Decimal128: [basx371] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000004e3000 {"d":{"$numberDecimal":"7E+7"}} 1800000013640007000000000000000000000000004e3000 1800000013640007000000000000000000000000004e3000 ===DONE===PK.h]tests/string-valid-007.phptnu[--TEST-- String: Required escapes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 320000000261002600000061625c220102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f61620000 {"a":"ab\\\"\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001fab"} 320000000261002600000061625c220102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f61620000 ===DONE===PK.h]O  %tests/bulkwrite-insert_error-003.phptnu[--TEST-- MongoDB\Driver\BulkWrite::insert() with BSON encoding error (null bytes in keys) --FILE-- insert(["\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->insert(["x\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->insert(["\0\0\0" => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "x". OK: Got MongoDB\Driver\Exception\UnexpectedValueException BSON keys cannot contain null bytes. Unexpected null byte after "". ===DONE=== PK.h]>nXX!tests/decimal128-2-valid-137.phptnu[--TEST-- Decimal128: [decq774] DPD all-highs cases (includes the 24 redundant codes) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400dd03000000000000000000000000403000 {"d":{"$numberDecimal":"989"}} 18000000136400dd03000000000000000000000000403000 ===DONE===PK.h]!ա/tests/manager-ctor-write_concern-error-002.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid write concern (w range) --SKIPIF-- --FILE-- 2147483648]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected 32-bit integer or string for "w" URI option, 64-bit integer given ===DONE=== PK.h]!.==!tests/decimal128-3-valid-169.phptnu[--TEST-- Decimal128: [basx171] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000123000 {"d":{"$numberDecimal":"1.265E-20"}} 18000000136400f104000000000000000000000000123000 ===DONE===PK.h]~tests/bson-undefined-001.phptnu[--TEST-- MongoDB\BSON\Undefined #001 --FILE-- $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $bson = fromJSON($json); $testagain = toPHP($bson); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- Test#0 { "undefined" : { "$undefined" : true } } string(41) "{ "undefined" : { "$undefined" : true } }" string(41) "{ "undefined" : { "$undefined" : true } }" bool(true) ===DONE=== PK.h]M-tests/top-parseError-017.phptnu[--TEST-- Top-level document validity: Bad $binary (type is number, not string) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h][nh@@!tests/decimal128-2-valid-123.phptnu[--TEST-- Decimal128: [decq064] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640039300000000000000000000000003c3000 {"d":{"$numberDecimal":"123.45"}} 1800000013640039300000000000000000000000003c3000 ===DONE===PK.h]>nN!!tests/decimal128-3-valid-063.phptnu[--TEST-- Decimal128: [basx676] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000303000 {"d":{"$numberDecimal":"0E-8"}} 180000001364000000000000000000000000000000303000 180000001364000000000000000000000000000000303000 ===DONE===PK.h]!tests/decimal128-3-valid-060.phptnu[--TEST-- Decimal128: [basx635] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000463000 {"d":{"$numberDecimal":"0E+3"}} 180000001364000000000000000000000000000000463000 180000001364000000000000000000000000000000463000 ===DONE===PK.h]!tests/decimal128-3-valid-044.phptnu[--TEST-- Decimal128: [basx630] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003c3000 {"d":{"$numberDecimal":"0.00"}} 1800000013640000000000000000000000000000003c3000 1800000013640000000000000000000000000000003c3000 ===DONE===PK.h]R(tests/bson-utcdatetime-tostring-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime::__toString() --FILE-- ===DONE=== --EXPECT-- string(13) "1416445411987" ===DONE=== PK.h]K] tests/bson-minkey-001.phptnu[--TEST-- MongoDB\BSON\MinKey #001 --FILE-- $minkey), ); foreach($tests as $n => $test) { $s = fromPHP($test); echo "Test#{$n} ", $json = toJSON($s), "\n"; $bson = fromJSON($json); $testagain = toPHP($bson); var_dump(toJSON(fromPHP($test)), toJSON(fromPHP($testagain))); var_dump((object)$test == (object)$testagain); } ?> ===DONE=== --EXPECT-- Test#0 { "min" : { "$minKey" : 1 } } string(29) "{ "min" : { "$minKey" : 1 } }" string(29) "{ "min" : { "$minKey" : 1 } }" bool(true) ===DONE=== PK.h] \ָuu!tests/decimal128-3-valid-308.phptnu[--TEST-- Decimal128: [basx032] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640080910f8648700000000000000000403000 {"d":{"$numberDecimal":"123456789123456"}} 1800000013640080910f8648700000000000000000403000 ===DONE===PK.h]K**!tests/decimal128-2-valid-036.phptnu[--TEST-- Decimal128: [decq406] zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003c3000 {"d":{"$numberDecimal":"0.00"}} 1800000013640000000000000000000000000000003c3000 ===DONE===PK.h]tests/int32-valid-005.phptnu[--TEST-- Int32 type: 1 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 0c0000001069000100000000 {"i":{"$numberInt":"1"}} {"i":1} 0c0000001069000100000000 {"i":1} ===DONE===PK.h]^)tests/manager-ctor-appname_error-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): invalid appname --FILE-- "2-{$name2}"]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Invalid appname value: '2-PHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGOPHONGO' ===DONE=== PK.h]!(jEE+tests/manager-ctor-auto_encryption-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): auto encryption options --SKIPIF-- --FILE-- 'admin.dataKeys', 'kmsProviders' => ['aws' => (object) ['accessKeyId' => 'abc', 'secretAccessKey' => 'def']] ]; $tests = [ [], ['keyVaultClient' => new MongoDB\Driver\Manager()], ['schemaMap' => [ 'default.default' => [ 'properties' => [ 'encrypted_objectId' => [ 'encrypt' => [ 'keyId' => [ [ '$binary' => [ 'base64' => 'AAAAAAAAAAAAAAAAAAAAAA==', 'subType' => '04', ], ], ], 'bsonType' => 'objectId', 'algorithm' => MongoDB\Driver\ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC, ], ], ], 'bsonType' => 'object', ], ]], ['bypassAutoEncryption' => true], ['extraOptions' => ['mongocryptdBypassSpawn' => true]], ]; foreach ($tests as $autoEncryptionOptions) { $manager = new MongoDB\Driver\Manager(null, [], ['autoEncryption' => $autoEncryptionOptions + $baseOptions]); } ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]l&tests/decimal128-4-parseError-003.phptnu[--TEST-- Decimal128: [basx566] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]<!tests/decimal128-3-valid-271.phptnu[--TEST-- Decimal128: [basx166] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006400000000000000000000000000523000 {"d":{"$numberDecimal":"1.00E+11"}} 180000001364006400000000000000000000000000523000 180000001364006400000000000000000000000000523000 ===DONE===PK.h]33!tests/decimal128-2-valid-106.phptnu[--TEST-- Decimal128: [decq708] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364002800000000000000000000000000403000 {"d":{"$numberDecimal":"40"}} 180000001364002800000000000000000000000000403000 ===DONE===PK.h]{!tests/decimal128-3-valid-137.phptnu[--TEST-- Decimal128: [basx257] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000383000 {"d":{"$numberDecimal":"0.1265"}} 18000000136400f104000000000000000000000000383000 18000000136400f104000000000000000000000000383000 ===DONE===PK.h],`55!tests/decimal128-3-valid-272.phptnu[--TEST-- Decimal128: [basx210] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003e3000 {"d":{"$numberDecimal":"126.5"}} 18000000136400f1040000000000000000000000003e3000 ===DONE===PK.h]aWu@@tests/multi-type-valid-001.phptnu[--TEST-- Multiple types within the same document: All BSON types --XFAIL-- PHP encodes integers as 32-bit if range allows --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- f4010000075f69640057e193d7a9cc81b4027498b502537472696e670007000000737472696e670010496e743332002a00000012496e743634002a0000000000000001446f75626c6500000000000000f0bf0542696e617279001000000003a34c38f7c3abedc8a37814a992ab8db60542696e61727955736572446566696e656400050000008001020304050d436f6465000e00000066756e6374696f6e2829207b7d000f436f64655769746853636f7065001b0000000e00000066756e6374696f6e2829207b7d00050000000003537562646f63756d656e74001200000002666f6f0004000000626172000004417272617900280000001030000100000010310002000000103200030000001033000400000010340005000000001154696d657374616d7000010000002a0000000b5265676578007061747465726e0000094461746574696d6545706f6368000000000000000000094461746574696d65506f73697469766500ffffff7f00000000094461746574696d654e656761746976650000000080ffffffff085472756500010846616c73650000034442526566003d0000000224726566000b000000636f6c6c656374696f6e00072469640057fd71e96e32ab4225b723fb02246462000900000064617461626173650000ff4d696e6b6579007f4d61786b6579000a4e756c6c0000 {"_id":{"$oid":"57e193d7a9cc81b4027498b5"},"String":"string","Int32":{"$numberInt":"42"},"Int64":{"$numberLong":"42"},"Double":{"$numberDouble":"-1"},"Binary":{"$binary":{"base64":"o0w498Or7cijeBSpkquNtg==","subType":"03"}},"BinaryUserDefined":{"$binary":{"base64":"AQIDBAU=","subType":"80"}},"Code":{"$code":"function() {}"},"CodeWithScope":{"$code":"function() {}","$scope":{}},"Subdocument":{"foo":"bar"},"Array":[{"$numberInt":"1"},{"$numberInt":"2"},{"$numberInt":"3"},{"$numberInt":"4"},{"$numberInt":"5"}],"Timestamp":{"$timestamp":{"t":42,"i":1}},"Regex":{"$regularExpression":{"pattern":"pattern","options":""}},"DatetimeEpoch":{"$date":{"$numberLong":"0"}},"DatetimePositive":{"$date":{"$numberLong":"2147483647"}},"DatetimeNegative":{"$date":{"$numberLong":"-2147483648"}},"True":true,"False":false,"DBRef":{"$ref":"collection","$id":{"$oid":"57fd71e96e32ab4225b723fb"},"$db":"database"},"Minkey":{"$minKey":1},"Maxkey":{"$maxKey":1},"Null":null} f4010000075f69640057e193d7a9cc81b4027498b502537472696e670007000000737472696e670010496e743332002a00000012496e743634002a0000000000000001446f75626c6500000000000000f0bf0542696e617279001000000003a34c38f7c3abedc8a37814a992ab8db60542696e61727955736572446566696e656400050000008001020304050d436f6465000e00000066756e6374696f6e2829207b7d000f436f64655769746853636f7065001b0000000e00000066756e6374696f6e2829207b7d00050000000003537562646f63756d656e74001200000002666f6f0004000000626172000004417272617900280000001030000100000010310002000000103200030000001033000400000010340005000000001154696d657374616d7000010000002a0000000b5265676578007061747465726e0000094461746574696d6545706f6368000000000000000000094461746574696d65506f73697469766500ffffff7f00000000094461746574696d654e656761746976650000000080ffffffff085472756500010846616c73650000034442526566003d0000000224726566000b000000636f6c6c656374696f6e00072469640057fd71e96e32ab4225b723fb02246462000900000064617461626173650000ff4d696e6b6579007f4d61786b6579000a4e756c6c0000 ===DONE===PK.h]_"2tests/bson-javascript-serialization_error-001.phptnu[--TEST-- MongoDB\BSON\Javascript unserialization requires "code" string field (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Javascript initialization requires "code" string field ===DONE=== PK.h]3  !tests/decimal128-3-valid-277.phptnu[--TEST-- Decimal128: [basx223] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000663000 {"d":{"$numberDecimal":"1.265E+22"}} 18000000136400f104000000000000000000000000663000 18000000136400f104000000000000000000000000663000 ===DONE===PK.h]-&tests/decimal128-6-parseError-023.phptnu[--TEST-- Decimal128: Invalid --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h] bbb!tests/decimal128-3-valid-003.phptnu[--TEST-- Decimal128: [basx064] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400185c0ace0000000000000000000038b000 {"d":{"$numberDecimal":"-345678.5432"}} 18000000136400185c0ace0000000000000000000038b000 ===DONE===PK.h]@f)tests/manager-startSession_error-001.phptnu[--TEST-- MongoDB\Driver\Manager::startSession() with wrong defaultTransactionOptions --SKIPIF-- --FILE-- -1 ], [ 'readConcern' => 42 ], [ 'readConcern' => new stdClass ], [ 'readConcern' => new \MongoDB\Driver\WriteConcern( 2 ) ], [ 'readPreference' => 42 ], [ 'readPreference' => new stdClass ], [ 'readPreference' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ) ], [ 'writeConcern' => 42 ], [ 'writeConcern' => new stdClass ], [ 'writeConcern' => new \MongoDB\Driver\ReadPreference( \MongoDB\Driver\ReadPreference::RP_SECONDARY ) ], [ 'readConcern' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ), 'readPreference' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ), ], [ 'readConcern' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ), 'writeConcern' => new \MongoDB\Driver\ReadPreference( \MongoDB\Driver\ReadPreference::RP_SECONDARY ), ], [ 'readPreference' => new \MongoDB\Driver\ReadPreference( \MongoDB\Driver\ReadPreference::RP_SECONDARY ), 'writeConcern' => new \MongoDB\Driver\ReadPreference( \MongoDB\Driver\ReadPreference::RP_SECONDARY ), ], 42, new stdClass, ]; foreach ($options as $txnOptions) { echo throws(function() use ($manager, $txnOptions) { $manager->startSession([ 'defaultTransactionOptions' => $txnOptions ]); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; } echo raises(function() use ($manager) { $manager->startSession([ 'defaultTransactionOptions' => [ 'maxCommitTimeMS' => new stdClass ] ]); }, E_NOTICE | E_WARNING), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "maxCommitTimeMS" option to be >= 0, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, MongoDB\Driver\WriteConcern given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, MongoDB\Driver\ReadConcern given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, MongoDB\Driver\ReadPreference given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, MongoDB\Driver\ReadConcern given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, MongoDB\Driver\ReadPreference given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, MongoDB\Driver\ReadPreference given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "defaultTransactionOptions" option to be an array, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "defaultTransactionOptions" option to be an array, stdClass given OK: Got %r(E_NOTICE|E_WARNING)%r Object of class stdClass could not be converted to int ===DONE=== PK.h]ʢϘ\\tests/bson-decimal128-004.phptnu[--TEST-- MongoDB\BSON\Decimal128 debug handler --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(9) "1234.5678" } object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(3) "NaN" } object(MongoDB\BSON\Decimal128)#%d (%d) { ["dec"]=> string(8) "Infinity" } ===DONE=== PK.h]kbb!tests/decimal128-2-valid-152.phptnu[--TEST-- Decimal128: [decq829] values around [u]int32 edges (zeros done earlier) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ffffffff00000000000000000000403000 {"d":{"$numberDecimal":"4294967295"}} 18000000136400ffffffff00000000000000000000403000 ===DONE===PK.h]GKD%tests/bulkwrite-update_error-007.phptnu[--TEST-- MongoDB\Driver\BulkWrite::update() arrayFilters option requires MongoDB 3.6 --SKIPIF-- =', '3.6'); ?> --FILE-- update( ['grades' => ['$gte' => 100]], ['$set' => ['grades.$[element]' => 100 ]], [ 'arrayFilters' => [['element' => ['$gte' => 100]]], 'multi' => true, ] ); echo throws(function() use ($manager, $bulk) { $manager->executeBulkWrite(DATABASE_NAME . '.' . COLLECTION_NAME, $bulk); }, 'MongoDB\Driver\Exception\BulkWriteException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\BulkWriteException Bulk write failed due to previous MongoDB\Driver\Exception\RuntimeException: The selected server does not support array filters ===DONE=== PK.h]adtests/top-parseError-027.phptnu[--TEST-- Top-level document validity: Bad $timestamp ('i' type is string, not number) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]'tests/cursorid-set_state_error-001.phptnu[--TEST-- MongoDB\Driver\CursorId::__set_state() requires "id" string field --FILE-- 0]); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\CursorId initialization requires "id" string field ===DONE=== PK.h]Zy44tests/cursor-getmore-007.phptnu[--TEST-- MongoDB\Driver\Cursor query result iteration with getmore failure --SKIPIF-- --FILE-- insert(array('_id' => $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $cursor = $manager->executeQuery(NS, $query); failGetMore($manager); throws(function() use ($cursor) { foreach ($cursor as $i => $document) { printf("%d => {_id: %d}\n", $i, $document->_id); } }, "MongoDB\Driver\Exception\ServerException"); ?> ===DONE=== --CLEAN-- --EXPECT-- Inserted: 5 0 => {_id: 0} 1 => {_id: 1} OK: Got MongoDB\Driver\Exception\ServerException ===DONE=== PK.h]!&'&tests/decimal128-7-parseError-015.phptnu[--TEST-- Decimal128: [basx514] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]reH'tests/bson-regex-serialization-005.phptnu[--TEST-- MongoDB\BSON\Regex serialization with flags omitted (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(0) "" } string(76) "O:18:"MongoDB\BSON\Regex":2:{s:7:"pattern";s:6:"regexp";s:5:"flags";s:0:"";}" object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(0) "" } ===DONE=== PK.h]o_XX!tests/decimal128-2-valid-133.phptnu[--TEST-- Decimal128: [decq760] DPD all-highs cases (includes the 24 redundant codes) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364008203000000000000000000000000403000 {"d":{"$numberDecimal":"898"}} 180000001364008203000000000000000000000000403000 ===DONE===PK.h]D,,!tests/decimal128-3-valid-029.phptnu[--TEST-- Decimal128: [basx607] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003a3000 {"d":{"$numberDecimal":"0.000"}} 1800000013640000000000000000000000000000003a3000 ===DONE===PK.h]݆q  !tests/decimal128-3-valid-227.phptnu[--TEST-- Decimal128: [basx333] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000383000 {"d":{"$numberDecimal":"0.0010"}} 180000001364000a00000000000000000000000000383000 180000001364000a00000000000000000000000000383000 ===DONE===PK.h]v&ff+tests/manager-executeCommand_error-003.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() connection error --FILE-- 1]); echo throws(function() use($manager, $command) { $manager->executeCommand('test', $command); }, "MongoDB\Driver\Exception\ConnectionTimeoutException"), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s ===DONE=== PK.h]n'!tests/decimal128-1-valid-038.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - Lowercase Exponent Identifier --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000463000 {"d":{"$numberDecimal":"1E+3"}} 180000001364000100000000000000000000000000463000 180000001364000100000000000000000000000000463000 ===DONE===PK.h]fa)tests/update-001.phptnu[--TEST-- MongoDB\Driver\Command with update and arrayFilters --SKIPIF-- --FILE-- insert([ '_id' => 1, 'grades' => [ 95, 92, 90 ] ]); $bulk->insert([ '_id' => 2, 'grades' => [ 98, 100, 102 ] ]); $bulk->insert([ '_id' => 3, 'grades' => [ 95, 110, 100 ] ]); $manager->executeBulkWrite(DATABASE_NAME . '.' . COLLECTION_NAME, $bulk); $command = new MongoDB\Driver\Command([ 'update' => COLLECTION_NAME, 'updates' => [[ 'q' => [ 'grades' => [ '$gte' => 100 ] ], 'u' => [ '$set' => [ 'grades.$[element]' => 100 ] ], 'arrayFilters' => [ [ 'element' => [ '$gte' => 100 ] ] ], 'multi' => true ]], ]); $manager->executeCommand(DATABASE_NAME, $command); $cursor = $manager->executeQuery( DATABASE_NAME . '.' . COLLECTION_NAME, new \MongoDB\Driver\Query([])); var_dump($cursor->toArray()); ?> ===DONE=== --EXPECTF-- array(%d) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(1) ["grades"]=> array(%d) { [0]=> int(95) [1]=> int(92) [2]=> int(90) } } [1]=> object(stdClass)#%d (%d) { ["_id"]=> int(2) ["grades"]=> array(%d) { [0]=> int(98) [1]=> int(100) [2]=> int(100) } } [2]=> object(stdClass)#%d (%d) { ["_id"]=> int(3) ["grades"]=> array(%d) { [0]=> int(95) [1]=> int(100) [2]=> int(100) } } } ===DONE=== PK.h]"uu!tests/decimal128-3-valid-131.phptnu[--TEST-- Decimal128: [basx033] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640015cd5b0700000000000000000000263000 {"d":{"$numberDecimal":"0.0000123456789"}} 1800000013640015cd5b0700000000000000000000263000 ===DONE===PK.h]+4ZVV)tests/bson-symbol-get_properties-001.phptnu[--TEST-- MongoDB\BSON\Symbol get_properties handler (get_object_vars) --FILE-- symbol; var_dump(get_object_vars($symbol)); ?> ===DONE=== --EXPECT-- array(1) { ["symbol"]=> string(4) "test" } ===DONE=== PK.h]OOO'tests/bson-utcdatetime-compare-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime comparisons --FILE-- new MongoDB\BSON\UTCDateTime(1234)); var_dump(new MongoDB\BSON\UTCDateTime(1234) < new MongoDB\BSON\UTCDateTime(1235)); var_dump(new MongoDB\BSON\UTCDateTime(1234) > new MongoDB\BSON\UTCDateTime(1233)); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) bool(true) ===DONE=== PK.h]gdX EE!tests/causal-consistency-001.phptnu[--TEST-- Causal consistency: new session has no operation time --SKIPIF-- --FILE-- startSession(); echo "Initial operation time:\n"; var_dump($session->getOperationTime()); ?> ===DONE=== --EXPECT-- Initial operation time: NULL ===DONE=== PK.h]U&tests/decimal128-7-parseError-070.phptnu[--TEST-- Decimal128: [basx508] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]tests/typemap-002.phptnu[--TEST-- MongoDB\Driver\Cursor::setTypeMap(): Setting using type "object" --SKIPIF-- --FILE-- insert(array('_id' => 1, 'bson_array' => array(1, 2, 3), 'bson_object' => array("string" => "keys", "for" => "ever"))); $bulk->insert(array('_id' => 2, 'bson_array' => array(4, 5, 6))); $manager->executeBulkWrite(NS, $bulk); function fetch($manager, $typemap = array()) { $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query(array('bson_array' => 1))); if ($typemap) { $cursor->setTypeMap($typemap); } $documents = $cursor->toArray(); return $documents; } echo "Setting to 'object' for arrays and 'array' for embedded and root documents\n"; $documents = fetch($manager, array("array" => "object", "document" => "array", "root" => "array")); var_dump(is_array($documents[0])); var_dump($documents[0]['bson_array'] instanceof stdClass); var_dump(is_array($documents[0]['bson_object'])); echo "\nSetting to 'array' for arrays and 'object' for embedded and root documents\n"; $documents = fetch($manager, array("array" => "array", "document" => "object", "root" => "object")); var_dump($documents[0] instanceof stdClass); var_dump(is_array($documents[0]->bson_array)); var_dump($documents[0]->bson_object instanceof stdClass); echo "\nSetting to 'object' for arrays, embedded, and root documents\n"; $documents = fetch($manager, array("array" => "object", "document" => "object", "root" => "object")); var_dump($documents[0] instanceof stdClass); var_dump($documents[0]->bson_array instanceof stdClass); var_dump($documents[0]->bson_object instanceof stdClass); ?> ===DONE=== --EXPECT-- Setting to 'object' for arrays and 'array' for embedded and root documents bool(true) bool(true) bool(true) Setting to 'array' for arrays and 'object' for embedded and root documents bool(true) bool(true) bool(true) Setting to 'object' for arrays, embedded, and root documents bool(true) bool(true) bool(true) ===DONE=== PK.h]qun&tests/decimal128-6-parseError-012.phptnu[--TEST-- Decimal128: 2 negative signs --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]x!tests/decimal128-3-valid-070.phptnu[--TEST-- Decimal128: [basx679] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000002a3000 {"d":{"$numberDecimal":"0E-11"}} 1800000013640000000000000000000000000000002a3000 1800000013640000000000000000000000000000002a3000 ===DONE===PK.h]6o;(tests/readconcern-bsonserialize-002.phptnu[--TEST-- MongoDB\Driver\ReadConcern::bsonSerialize() returns an object --FILE-- bsonSerialize()); } ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { } object(stdClass)#%d (%d) { ["level"]=> string(12) "linearizable" } object(stdClass)#%d (%d) { ["level"]=> string(5) "local" } object(stdClass)#%d (%d) { ["level"]=> string(8) "majority" } object(stdClass)#%d (%d) { ["level"]=> string(9) "available" } object(stdClass)#%d (%d) { ["level"]=> string(8) "snapshot" } ===DONE=== PK.h] KQ!tests/decimal128-3-valid-104.phptnu[--TEST-- Decimal128: [basx613] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000040b000 {"d":{"$numberDecimal":"-0"}} 18000000136400000000000000000000000000000040b000 18000000136400000000000000000000000000000040b000 ===DONE===PK.h]3:(tests/writeconcernerror-getcode-001.phptnu[--TEST-- MongoDB\Driver\WriteConcernError::getCode() --SKIPIF-- =', '3.1'); ?> --FILE-- insert(['x' => 1]); try { /* We assume that the replica set does not have 12 nodes */ $manager->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern(12)); } catch(MongoDB\Driver\Exception\BulkWriteException $e) { var_dump($e->getWriteResult()->getWriteConcernError()->getCode()); } ?> ===DONE=== --EXPECT-- int(100) ===DONE=== PK.h]B88tests/binary-valid-005.phptnu[--TEST-- Binary type: subtype 0x02 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 13000000057800060000000202000000ffff00 {"x":{"$binary":{"base64":"\/\/8=","subType":"02"}}} 13000000057800060000000202000000ffff00 ===DONE===PK.h] 55!tests/decimal128-3-valid-247.phptnu[--TEST-- Decimal128: [basx190] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003c3000 {"d":{"$numberDecimal":"12.65"}} 18000000136400f1040000000000000000000000003c3000 ===DONE===PK.h][Itests/query-ctor_error-005.phptnu[--TEST-- MongoDB\Driver\Query construction (invalid maxAwaitTimeMS range) --FILE-- -1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "maxAwaitTimeMS" option to be >= 0, -1 given ===DONE=== PK.h]cm77!tests/decimal128-3-valid-136.phptnu[--TEST-- Decimal128: [basx250] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000383000 {"d":{"$numberDecimal":"0.1265"}} 18000000136400f104000000000000000000000000383000 ===DONE===PK.h]-n&tests/decimal128-7-parseError-052.phptnu[--TEST-- Decimal128: [basx556] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]oݞtests/bson-javascript-002.phptnu[--TEST-- MongoDB\BSON\Javascript debug handler --FILE-- 42), ), array( 'function foo() { return id; }', array('id' => new MongoDB\BSON\ObjectId('53e2a1c40640fd72175d4603')), ), ); foreach ($tests as $test) { list($code, $scope) = $test; $js = new MongoDB\BSON\Javascript($code, $scope); var_dump($js); } ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(33) "function foo(bar) { return bar; }" ["scope"]=> object(stdClass)#%d (%d) { } } object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(30) "function foo() { return foo; }" ["scope"]=> object(stdClass)#%d (%d) { ["foo"]=> int(42) } } object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(29) "function foo() { return id; }" ["scope"]=> object(stdClass)#%d (%d) { ["id"]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "53e2a1c40640fd72175d4603" } } } ===DONE=== PK.h]mYY'tests/monitoring-addSubscriber-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\addSubscriber(): Adding one subscriber --SKIPIF-- --FILE-- getCommandName(), "\n"; } public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event ) { } public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event ) { } } $query = new MongoDB\Driver\Query( [] ); $subscriber = new MySubscriber; echo "Before addSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); MongoDB\Driver\Monitoring\addSubscriber( $subscriber ); echo "After addSubscriber\n"; $cursor = $m->executeQuery( "demo.test", $query ); ?> --EXPECT-- Before addSubscriber After addSubscriber - started: find PK.h]T*tests/commandSucceededEvent-debug-001.phptnu[--TEST-- MongoDB\Driver\Monitoring\CommandSucceededEvent debug output --SKIPIF-- --FILE-- addSubscriber(new MySubscriber); $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\Monitoring\CommandSucceededEvent)#%d (%d) { ["commandName"]=> string(4) "ping" ["durationMicros"]=> int(%d) ["operationId"]=> string(%d) "%d" ["reply"]=> object(stdClass)#%d (%d) {%A } ["requestId"]=> string(%d) "%d" ["server"]=> object(MongoDB\Driver\Server)#%d (%d) {%A } ["serviceId"]=> %r(NULL|object\(MongoDB\\BSON\\ObjectId\).*)%r } ===DONE=== PK.h]%)77tests/bson-timestamp-002.phptnu[--TEST-- MongoDB\BSON\Timestamp debug handler --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } ===DONE=== PK.h]1;!tests/decimal128-3-valid-079.phptnu[--TEST-- Decimal128: [basx661] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003c3000 {"d":{"$numberDecimal":"0.00"}} 1800000013640000000000000000000000000000003c3000 1800000013640000000000000000000000000000003c3000 ===DONE===PK.h]oc!tests/symbol-decodeError-002.phptnu[--TEST-- Symbol: bad symbol length: -1 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]ִ!tests/decimal128-3-valid-026.phptnu[--TEST-- Decimal128: [basx686] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000403000 {"d":{"$numberDecimal":"0"}} 180000001364000000000000000000000000000000403000 180000001364000000000000000000000000000000403000 ===DONE===PK.h]Jtests/bug0325.phptnu[--TEST-- Test for PHPC-325: Memory leak decoding buffers with multiple documents --FILE-- getMessage(), "\n"; } ?> ===DONE=== --EXPECT-- Reading document did not exhaust input buffer ===DONE=== PK.h]q)55(tests/bson-utcdatetime-int-size-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime integer parsing from string --INI-- date.timezone=UTC error_reporting=-1 dislay_errors=1 --FILE-- toDateTime()); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\UTCDateTime)#%d (1) { ["milliseconds"]=> string(13) "1416445411987" } object(DateTime)#%d (3) { ["date"]=> string(26) "2014-11-20 01:03:31.987000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" } ===DONE=== PK.h]عG tests/bson-minkey_error-001.phptnu[--TEST-- MongoDB\BSON\MinKey cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyMinKey %s final class %SMongoDB\BSON\MinKey%S in %s on line %d PK.h]naatests/bug0430-001.phptnu[--TEST-- PHPC-430: Query constructor arguments are modified --FILE-- ['x' => 1]]; $query = new MongoDB\Driver\Query($filter, $options); var_dump($filter); var_dump($options); ?> ===DONE=== --EXPECT-- array(0) { } array(1) { ["sort"]=> array(1) { ["x"]=> int(1) } } ===DONE=== PK.h]7?Jtests/bug0430-002.phptnu[--TEST-- PHPC-430: Query constructor arguments are modified --FILE-- ['x' => 1]]; $optionsCopy = $options; $optionsCopy['cursorFlags'] = 0; $query = new MongoDB\Driver\Query([], $options); var_dump($options); var_dump($optionsCopy); ?> ===DONE=== --EXPECT-- array(1) { ["sort"]=> array(1) { ["x"]=> int(1) } } array(2) { ["sort"]=> array(1) { ["x"]=> int(1) } ["cursorFlags"]=> int(0) } ===DONE=== PK.h]_0$tests/server-executeCommand-007.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() sends read preference to mongos --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); (new CommandObserver)->observe( function() use ($server) { $server->executeCommand( DATABASE_NAME, new MongoDB\Driver\Command(['ping' => true]), [ 'readPreference' => new \MongoDB\Driver\ReadPreference(\MongoDB\Driver\ReadPreference::RP_NEAREST), ] ); }, function(stdClass $command) { echo "Read Preference: ", $command->{'$readPreference'}->mode, "\n"; } ); ?> ===DONE=== --EXPECTF-- Read Preference: nearest ===DONE=== PK.h]x//#tests/bson-timestamp_error-001.phptnu[--TEST-- MongoDB\BSON\Timestamp argument count errors --SKIPIF-- =', '7.99'); ?> --FILE-- ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp::__construct() expects exactly 2 %r(argument|parameter)%rs, 0 given ===DONE=== PK.h]- z.tests/bson-symbol-serialization_error-001.phptnu[--TEST-- MongoDB\BSON\Symbol unserialization requires "symbol" string field (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Symbol initialization requires "symbol" string field ===DONE=== PK.h]VO#tests/manager-executeQuery-004.phptnu[--TEST-- MongoDB\Driver\Manager::executeQuery() takes a read preference as legacy option --SKIPIF-- --FILE-- insert(['_id' => 1, 'x' => 2, 'y' => 3]); $manager->executeBulkWrite(NS, $bulk); $primary = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY); $secondary = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY); echo "Testing primary:\n"; $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); $cursor = $manager->executeQuery(NS, $query, $primary); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; echo "Testing secondary:\n"; $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); $cursor = $manager->executeQuery(NS, $query, $secondary); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; ?> ===DONE=== --EXPECTF-- Testing primary: is_primary: true is_secondary: false Testing secondary: is_primary: false is_secondary: true ===DONE=== PK.h]}tests/bug0849-001.phptnu[--TEST-- PHPC-849: Cursor::setTypeMap() leaks current element if called during iteration --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); $cursor->setTypeMap(['root' => 'stdClass']); foreach ($cursor as $i => $document) { // Type map will apply to the next iteration, since current element is already converted $cursor->setTypeMap(['root' => ($i % 2 ? 'stdClass' : 'array')]); var_dump($document); } ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["_id"]=> int(1) } array(1) { ["_id"]=> int(2) } object(stdClass)#%d (%d) { ["_id"]=> int(3) } ===DONE=== PK.h]>GGtests/bug0940-002.phptnu[--TEST-- PHPC-940: php_phongo_free_ssl_opt() attempts to free interned strings (context option) --SKIPIF-- --FILE-- ['cafile' => false]]); var_dump(new MongoDB\Driver\Manager(null, [], ['context' => $context])); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "cafile" context driver option is deprecated. Please use the "tlsCAFile" URI option instead.%s object(MongoDB\Driver\Manager)#%d (%d) { ["uri"]=> string(20) "mongodb://127.0.0.1/" ["cluster"]=> array(0) { } } ===DONE=== PK.h]Fン*tests/bson-objectid-serialization-002.phptnu[--TEST-- MongoDB\BSON\ObjectId serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "576c25db6118fd406e6e6471" } string(75) "O:21:"MongoDB\BSON\ObjectId":1:{s:3:"oid";s:24:"576c25db6118fd406e6e6471";}" object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "576c25db6118fd406e6e6471" } ===DONE=== PK.h]xRtests/document-valid-003.phptnu[--TEST-- Document type (sub-documents): Single-character key subdoc --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 160000000378000e0000000261000200000062000000 {"x":{"a":"b"}} 160000000378000e0000000261000200000062000000 ===DONE===PK.h] ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(15) "0123456789abcde" ["type"]=> int(3) } } object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(17) "0123456789abcdefg" ["type"]=> int(3) } } object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(15) "0123456789abcde" ["type"]=> int(4) } } object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(17) "0123456789abcdefg" ["type"]=> int(4) } } ===DONE=== PK.h]n$$!tests/decimal128-4-valid-009.phptnu[--TEST-- Decimal128: [basx051] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000500000000000000000000000000363000 {"d":{"$numberDecimal":"0.00005"}} 180000001364000500000000000000000000000000363000 180000001364000500000000000000000000000000363000 ===DONE===PK.h] 'tests/code_w_scope-decodeError-002.phptnu[--TEST-- Javascript Code with Scope: field length negative --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]:>##tests/manager-destruct-001.phptnu[--TEST-- MongoDB\Driver\Manager destruct should not free streams that are still in use --SKIPIF-- --INI-- ignore_repeated_errors=1 --FILE-- insert(array('_id' => 1)); $writeResult = $manager1->executeBulkWrite(NS, $bulk); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 2)); $writeResult = $manager2->executeBulkWrite(NS, $bulk); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $manager2 = null; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(array('_id' => 3)); $writeResult = $manager1->executeBulkWrite(NS, $bulk); printf("Inserted: %d\n", $writeResult->getInsertedCount()); ?> ===DONE=== --EXPECT-- Inserted: 1 Inserted: 1 Inserted: 1 ===DONE=== PK.h] ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]H.ww!tests/decimal128-5-valid-015.phptnu[--TEST-- Decimal128: [decq177] Nmin and below (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000081efac855b416d2dee04008000 {"d":{"$numberDecimal":"-1.00000000000000000000000000000000E-6144"}} 180000001364000000000081efac855b416d2dee04008000 180000001364000000000081efac855b416d2dee04008000 ===DONE===PK.h]ROO*tests/bson-utcdatetime-todatetime-002.phptnu[--TEST-- MongoDB\BSON\UTCDateTime::toDateTime() dumping seconds and microseconds --INI-- date.timezone=UTC --FILE-- toDateTime(); echo $datetime->format('U.u'), "\n"; ?> ===DONE=== --EXPECT-- 1416445411.987000 ===DONE=== PK.h]$O!tests/decimal128-3-valid-211.phptnu[--TEST-- Decimal128: [basx163] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000523000 {"d":{"$numberDecimal":"1.0E+10"}} 180000001364000a00000000000000000000000000523000 180000001364000a00000000000000000000000000523000 ===DONE===PK.h]*zkk.tests/bson-symbol-serialization_error-003.phptnu[--TEST-- MongoDB\BSON\Symbol unserialization requires "symbol" string field (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Symbol initialization requires "symbol" string field ===DONE=== PK.h]T"tests/serverApi-construct-001.phptnu[--TEST-- MongoDB\Driver\ServerApi::__construct() --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Server API version "no way" is not supported in this driver version ===DONE=== PK.h]>$ltests/query-sort-004.phptnu[--TEST-- Sort query option is always serialized as a BSON document --SKIPIF-- --FILE-- insert(array('_id' => $i, '0' => 4 - $i)); } $writeResult = $manager->executeBulkWrite(NS, $bulkWrite); printf("Inserted: %d\n", $writeResult->getInsertedCount()); $query = new MongoDB\Driver\Query(array(), array( 'sort' => array('0' => 1), )); var_dump($query); $cursor = $manager->executeQuery(NS, $query); /* Numeric keys of stdClass instances cannot be directly accessed, so ensure the * document is decoded as a PHP array. */ $cursor->setTypeMap(array('root' => 'array')); foreach ($cursor as $document) { echo $document['0'] . "\n"; } ?> ===DONE=== --EXPECTF-- Inserted: 5 object(MongoDB\Driver\Query)#%d (%d) { ["filter"]=> object(stdClass)#%d (%d) { } ["options"]=> object(stdClass)#%d (%d) { ["sort"]=> object(stdClass)#%d (%d) { [%r(0|"0")%r]=> int(1) } } ["readConcern"]=> NULL } 0 1 2 3 4 ===DONE=== PK.h]~tests/bson-regex-clone-001.phptnu[--TEST-- MongoDB\BSON\Regex can be cloned --FILE-- foo = 'bar'; $clone = clone $regexp; var_dump($clone == $regexp); var_dump($clone === $regexp); unset($regexp); var_dump($clone); var_dump($clone->foo); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) object(MongoDB\BSON\Regex)#%d (2) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(1) "i" } string(3) "bar" ===DONE=== PK.h]qMM!tests/decimal128-2-valid-026.phptnu[--TEST-- Decimal128: [decq012] derivative canonical plain strings --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ee0200000000000000000000000038b000 {"d":{"$numberDecimal":"-0.0750"}} 18000000136400ee0200000000000000000000000038b000 ===DONE===PK.h]Y"tests/boolean-decodeError-002.phptnu[--TEST-- Boolean: Invalid boolean value of -1 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]Id!tests/decimal128-5-valid-026.phptnu[--TEST-- Decimal128: [decq401] zeros (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000000000 {"d":{"$numberDecimal":"0E-6176"}} 180000001364000000000000000000000000000000000000 180000001364000000000000000000000000000000000000 ===DONE===PK.h]USS!tests/decimal128-1-valid-014.phptnu[--TEST-- Decimal128: Regular - Smallest with Trailing Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640040ef5a07000000000000000000002a3000 {"d":{"$numberDecimal":"0.00123400000"}} 1800000013640040ef5a07000000000000000000002a3000 ===DONE===PK.h]Kw,;;!tests/decimal128-2-valid-043.phptnu[--TEST-- Decimal128: [decq425] negative zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000008000 {"d":{"$numberDecimal":"-0E-6176"}} 180000001364000000000000000000000000000000008000 ===DONE===PK.h] --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([], ['batchSize' => 2])); foreach ($cursor as $_) { var_dump($cursor->isDead()); } var_dump($cursor->isDead()); ?> ===DONE=== --EXPECT-- bool(false) bool(false) bool(false) bool(true) ===DONE=== PK.h]7 -__-tests/bson-timestamp-set_state_error-004.phptnu[--TEST-- MongoDB\BSON\Timestamp::__set_state() requires strings to parse as 64-bit integers --FILE-- '1.23', 'timestamp' => '5678']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['increment' => '1234', 'timestamp' => '5.67']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "1.23" as 64-bit integer increment for MongoDB\BSON\Timestamp initialization OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing "5.67" as 64-bit integer timestamp for MongoDB\BSON\Timestamp initialization ===DONE=== PK.h]; tests/top-parseError-022.phptnu[--TEST-- Top-level document validity: Bad $code (type is number, not string) when $scope is also present --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]B )tests/manager-ctor-write_concern-004.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): write concern options (safe) --FILE-- true]], [null, ['safe' => false]], [null, ['w' => 1, 'safe' => false]], [null, ['w' => 0, 'safe' => true]], // safe in URI options array may override w in URI string ['mongodb://127.0.0.1/?w=0', ['safe' => true]], ['mongodb://127.0.0.1/?w=1', ['safe' => false]], ]; foreach ($tests as $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getWriteConcern()); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } ===DONE=== PK.h]a_!tests/causal-consistency-006.phptnu[--TEST-- Causal consistency: second read's afterClusterTime uses last reply's operationTime (even on error) --SKIPIF-- --FILE-- lastSeenOperationTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $query = new MongoDB\Driver\Query(['$unsupportedOperator' => 1]); throws(function() use ($manager, $query, $session) { $manager->executeQuery(NS, $query, ['session' => $session]); }, 'MongoDB\Driver\Exception\RuntimeException'); /* We cannot access the server reply if an exception is thrown for a * failed command (see: PHPC-1076). For the time being, just assert that * the operationTime is not null. */ printf("Session has non-null operationTime: %s\n", ($session->getOperationTime() !== null ? 'yes' : 'no')); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function executeReadAfterWriteError() { $this->lastSeenOperationTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 1]); throws(function() use ($manager, $bulk, $session) { $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); }, 'MongoDB\Driver\Exception\BulkWriteException'); $query = new MongoDB\Driver\Query([]); $manager->executeQuery(NS, $query, ['session' => $session]); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { $command = $event->getCommand(); $hasAfterClusterTime = isset($command->readConcern->afterClusterTime); printf("%s command includes afterClusterTime: %s\n", $event->getCommandName(), ($hasAfterClusterTime ? 'yes' : 'no')); if ($hasAfterClusterTime && $this->lastSeenOperationTime !== null) { printf("%s command uses last seen operationTime: %s\n", $event->getCommandName(), ($command->readConcern->afterClusterTime == $this->lastSeenOperationTime) ? 'yes' : 'no'); } } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { $reply = $event->getReply(); $hasOperationTime = isset($reply->operationTime); printf("%s command reply includes operationTime: %s\n", $event->getCommandName(), $hasOperationTime ? 'yes' : 'no'); if ($hasOperationTime) { $this->lastSeenOperationTime = $reply->operationTime; } } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } echo "\nTesting read after read error\n"; (new Test)->executeReadAfterReadError(); echo "\nTesting read after write error\n"; (new Test)->executeReadAfterWriteError(); ?> ===DONE=== --EXPECT-- Testing read after read error find command includes afterClusterTime: no OK: Got MongoDB\Driver\Exception\RuntimeException Session has non-null operationTime: yes find command includes afterClusterTime: yes find command reply includes operationTime: yes Testing read after write error insert command includes afterClusterTime: no insert command reply includes operationTime: yes OK: Got MongoDB\Driver\Exception\BulkWriteException find command includes afterClusterTime: yes find command uses last seen operationTime: yes find command reply includes operationTime: yes ===DONE=== PK.h]<<!tests/decimal128-2-valid-087.phptnu[--TEST-- Decimal128: [decq062] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364007b000000000000000000000000003c3000 {"d":{"$numberDecimal":"1.23"}} 180000001364007b000000000000000000000000003c3000 ===DONE===PK.h]FJ%tests/manager-getreadconcern-001.phptnu[--TEST-- MongoDB\Driver\Manager::getReadConcern() --FILE-- 'local']], [null, ['readconcernlevel' => 'majority']], [null, ['readconcernlevel' => 'not-yet-supported']], ['mongodb://127.0.0.1/?readconcernlevel=local', ['readconcernlevel' => 'majority']], ]; foreach ($tests as $i => $test) { list($uri, $options) = $test; $manager = new MongoDB\Driver\Manager($uri, $options); var_dump($manager->getReadConcern()); $manager->getReadConcern(); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadConcern)#%d (%d) { } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(5) "local" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "majority" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(17) "not-yet-supported" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(5) "local" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "majority" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(17) "not-yet-supported" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "majority" } ===DONE=== PK.h]׬JKK"tests/bson-maxkey-compare-001.phptnu[--TEST-- MongoDB\BSON\MaxKey comparisons --FILE-- new MongoDB\BSON\MaxKey); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) ===DONE=== PK.h]3Yktests/bson-int64-002.phptnu[--TEST-- MongoDB\BSON\Int64 wraps 64-bit integers on 32-bit platforms --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["max64"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(19) "9223372036854775807" } } object(stdClass)#%d (%d) { ["min64"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(20) "-9223372036854775808" } } object(stdClass)#%d (%d) { ["max32+1"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(10) "2147483648" } } object(stdClass)#%d (%d) { ["min32-1"]=> object(MongoDB\BSON\Int64)#%d (%d) { ["integer"]=> string(11) "-2147483649" } } object(stdClass)#%d (%d) { ["max32"]=> int(2147483647) } object(stdClass)#%d (%d) { ["min32"]=> int(-2147483648) } object(stdClass)#%d (%d) { ["zero"]=> int(0) } ===DONE=== PK.h]O=++"tests/bson-binary-compare-001.phptnu[--TEST-- MongoDB\BSON\Binary comparisons --FILE-- new MongoDB\BSON\Binary('foobar', 1)); // Data length is compared first var_dump(new MongoDB\BSON\Binary('c', 1) < new MongoDB\BSON\Binary('aa', 0)); var_dump(new MongoDB\BSON\Binary('bb', 0) > new MongoDB\BSON\Binary('a', 1)); // Type is compared second var_dump(new MongoDB\BSON\Binary('foobar', 1) < new MongoDB\BSON\Binary('foobar', 2)); var_dump(new MongoDB\BSON\Binary('foobar', 1) > new MongoDB\BSON\Binary('foobar', 0)); // Data is compared last var_dump(new MongoDB\BSON\Binary('foobar', 1) < new MongoDB\BSON\Binary('foobat', 1)); var_dump(new MongoDB\BSON\Binary('foobar', 1) > new MongoDB\BSON\Binary('foobap', 1)); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]L!tests/decimal128-3-valid-013.phptnu[--TEST-- Decimal128: [basx622] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000002eb000 {"d":{"$numberDecimal":"-0E-9"}} 1800000013640000000000000000000000000000002eb000 1800000013640000000000000000000000000000002eb000 ===DONE===PK.h]w%AA*tests/bson-binary-set_state_error-001.phptnu[--TEST-- MongoDB\BSON\Binary::__set_state() requires "data" string and "type" integer fields --FILE-- 'foobar']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Binary::__set_state(['type' => 0]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Binary::__set_state(['data' => 0, 'type' => 'foobar']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields ===DONE=== PK.h]{yr)tests/manager-startSession_error-002.phptnu[--TEST-- MongoDB\Driver\Manager::startSession() snapshot and causalConsistency cannot both be true --DESCRIPTION-- Session spec prose test #1 https://github.com/mongodb/specifications/blob/master/source/sessions/tests/README.rst#prose-tests --SKIPIF-- --FILE-- startSession([ 'causalConsistency' => true, 'snapshot' => true, ]); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Only one of "causalConsistency" and "snapshot" can be enabled ===DONE=== PK.h]+XX!tests/decimal128-2-valid-134.phptnu[--TEST-- Decimal128: [decq764] DPD all-highs cases (includes the 24 redundant codes) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364008303000000000000000000000000403000 {"d":{"$numberDecimal":"899"}} 180000001364008303000000000000000000000000403000 ===DONE===PK.h]tests/code-decodeError-002.phptnu[--TEST-- Javascript Code: bad code string length: -1 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]}/ tests/bson-toPHP_error-001.phptnu[--TEST-- MongoDB\BSON\toPHP(): Type classes must be instantiatable and implement Unserializable --FILE-- $class]; printf("Test typeMap: %s\n", json_encode($typeMap)); echo throws(function() use ($bson, $typeMap) { toPHP($bson, $typeMap); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo "\n"; } } ?> ===DONE=== --EXPECT-- Test typeMap: {"array":"MissingClass"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MissingClass does not exist Test typeMap: {"array":"MyAbstractDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyAbstractDocument is not instantiatable Test typeMap: {"array":"MyDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyDocument does not implement MongoDB\BSON\Unserializable Test typeMap: {"array":"MongoDB\\BSON\\Unserializable"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MongoDB\BSON\Unserializable is not instantiatable Test typeMap: {"document":"MissingClass"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MissingClass does not exist Test typeMap: {"document":"MyAbstractDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyAbstractDocument is not instantiatable Test typeMap: {"document":"MyDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyDocument does not implement MongoDB\BSON\Unserializable Test typeMap: {"document":"MongoDB\\BSON\\Unserializable"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MongoDB\BSON\Unserializable is not instantiatable Test typeMap: {"root":"MissingClass"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MissingClass does not exist Test typeMap: {"root":"MyAbstractDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyAbstractDocument is not instantiatable Test typeMap: {"root":"MyDocument"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MyDocument does not implement MongoDB\BSON\Unserializable Test typeMap: {"root":"MongoDB\\BSON\\Unserializable"} OK: Got MongoDB\Driver\Exception\InvalidArgumentException Class MongoDB\BSON\Unserializable is not instantiatable ===DONE=== PK.h]'tests/bson-regex-serialization-006.phptnu[--TEST-- MongoDB\BSON\Regex unserialization will alphabetize flags (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(6) "ilmsux" } ===DONE=== PK.h]G 77!tests/decimal128-2-valid-092.phptnu[--TEST-- Decimal128: [decq445] exponent lengths --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000700000000000000000000000000063100 {"d":{"$numberDecimal":"7E+99"}} 180000001364000700000000000000000000000000063100 ===DONE===PK.h]Z\aa!tests/decimal128-3-valid-007.phptnu[--TEST-- Decimal128: [basx025] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364008f030000000000000000000000003cb000 {"d":{"$numberDecimal":"-9.11"}} 180000001364008f030000000000000000000000003cb000 ===DONE===PK.h]ծ'tests/bson-toRelaxedJSON_error-003.phptnu[--TEST-- MongoDB\BSON\toRelaxedExtendedJSON(): BSON decoding exceptions for bson_as_canonical_json() failure --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not convert BSON document to a JSON string OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not convert BSON document to a JSON string OK: Got MongoDB\Driver\Exception\UnexpectedValueException Could not convert BSON document to a JSON string ===DONE=== PK.h]j[[!tests/decimal128-3-valid-209.phptnu[--TEST-- Decimal128: [basx005] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000403000 {"d":{"$numberDecimal":"10"}} 180000001364000a00000000000000000000000000403000 ===DONE===PK.h]BhB&tests/decimal128-7-parseError-045.phptnu[--TEST-- Decimal128: [basx553] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]1tests/document-valid-005.phptnu[--TEST-- Document type (sub-documents): Dollar as key in sub-document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 160000000378000e0000000224000200000061000000 {"x":{"$":"a"}} 160000000378000e0000000224000200000061000000 ===DONE===PK.h]Q!tests/decimal128-2-valid-050.phptnu[--TEST-- Decimal128: [decq606] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000080264b91c02220be377e00fe5f00 {"d":{"$numberDecimal":"1.0000000000000000000000000000000E+6142"}} 1800000013640000000080264b91c02220be377e00fe5f00 ===DONE===PK.h] aXX,tests/session-getTransactionOptions-001.phptnu[--TEST-- MongoDB\Driver\Session::getTransactionOptions() --SKIPIF-- --FILE-- startSession(); var_dump($session->getTransactionOptions()); $options = [ ['maxCommitTimeMS' => 0], ['maxCommitTimeMS' => 1], ['readConcern' => new \MongoDB\Driver\ReadConcern('majority')], ['readPreference' => new \MongoDB\Driver\ReadPreference('primaryPreferred')], ['writeConcern' => new \MongoDB\Driver\WriteConcern('majority')], ]; foreach ($options as $test) { // Session no longer needs to be restarted once CDRIVER-3366 is fixed $session = $manager->startSession(); $session->startTransaction($test); var_dump($session->getTransactionOptions()); } ?> ===DONE=== --EXPECTF-- NULL array(1) { ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (1) { ["mode"]=> string(7) "primary" } } array(2) { ["maxCommitTimeMS"]=> int(1) ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (1) { ["mode"]=> string(7) "primary" } } array(2) { ["readConcern"]=> object(MongoDB\Driver\ReadConcern)#%d (1) { ["level"]=> string(8) "majority" } ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (1) { ["mode"]=> string(7) "primary" } } array(1) { ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (1) { ["mode"]=> string(16) "primaryPreferred" } } array(2) { ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (1) { ["mode"]=> string(7) "primary" } ["writeConcern"]=> object(MongoDB\Driver\WriteConcern)#%d (1) { ["w"]=> string(8) "majority" } } ===DONE=== PK.h]$tests/retryable-reads_error-002.phptnu[--TEST-- Retryable reads: executeQuery is not retried when retryable reads are disabled --SKIPIF-- --FILE-- getCommandName()); } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } $manager = create_test_manager(URI, ['retryReads' => false]); // Select a specific server for future operations to avoid mongos switching in sharded clusters $server = $manager->selectServer(new \MongoDB\Driver\ReadPreference('primary')); configureTargetedFailPoint($server, 'failCommand', ['times' => 1], ['failCommands' => ['find'], 'closeConnection' => true]); $observer = new Observer; MongoDB\Driver\Monitoring\addSubscriber($observer); throws( function() use ($server) { $server->executeQuery(NS, new \MongoDB\Driver\Query(['x' => 1])); }, \MongoDB\Driver\Exception\ConnectionTimeoutException::class ); ?> ===DONE=== --EXPECT-- Command started: find OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException ===DONE=== PK.h]17$tests/standalone-auth_error-001.phptnu[--TEST-- Connect to MongoDB with using default auth mechanism and wrong password --SKIPIF-- --FILE-- insert(array("my" => "value")); echo throws(function() use($manager, $bulk) { $manager->executeBulkWrite(NS, $bulk); }, 'MongoDB\Driver\Exception\BulkWriteException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\BulkWriteException Bulk write failed due to previous MongoDB\Driver\Exception\AuthenticationException: Authentication failed. ===DONE=== PK.h]1&tests/decimal128-4-parseError-020.phptnu[--TEST-- Decimal128: Inexact rounding#2 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h].66%tests/bson-dbpointer-compare-001.phptnu[--TEST-- MongoDB\BSON\DBPointer comparisons --FILE-- $jsonTest1b); var_dump($jsonAAAA < $jsonTest1b); var_dump($jsonZZZZ > $jsonTest1b); ?> ===DONE=== --EXPECT-- bool(true) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]=+tests/bson-undefined-jsonserialize-002.phptnu[--TEST-- MongoDB\BSON\Undefined::jsonSerialize() with json_encode() --FILE-- ===DONE=== --EXPECTF-- { "foo" : { "$undefined" : true } } {"foo":{"$undefined":true}} object(stdClass)#%d (%d) { ["foo"]=> object(MongoDB\BSON\Undefined)#%d (%d) { } } ===DONE=== PK.h]PXX!tests/decimal128-2-valid-141.phptnu[--TEST-- Decimal128: [decq780] DPD all-highs cases (includes the 24 redundant codes) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400e603000000000000000000000000403000 {"d":{"$numberDecimal":"998"}} 18000000136400e603000000000000000000000000403000 ===DONE===PK.h]8FF&tests/server-executeBulkWrite-009.phptnu[--TEST-- MongoDB\Driver\Server::executeBulkWrite() write concern inheritance --SKIPIF-- --FILE-- 2, 'wtimeoutms' => 1000]); $server = $manager->selectServer(new MongoDB\Driver\ReadPreference('primary')); (new CommandObserver)->observe( function() use ($server) { $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $server->executeBulkWrite(NS, $bulk); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); $server->executeBulkWrite(NS, $bulk, ['writeConcern' => new MongoDB\Driver\WriteConcern(1)]); }, function(stdClass $command) { echo json_encode($command->writeConcern), "\n"; } ); ?> ===DONE=== --EXPECT-- {"w":2,"wtimeout":1000} {"w":1} ===DONE=== PK.h]WOGiitests/double-valid-005.phptnu[--TEST-- Double type: 1.2345678921232E+18 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 100000000164002a1bf5f41022b14300 {"d":{"$numberDouble":"1.2345678921232e+18"}} {"d":1.2345678921232e+18} 100000000164002a1bf5f41022b14300 {"d":1.2345678921232e+18} ===DONE===PK.h]>$$"tests/bson-int64-tostring-001.phptnu[--TEST-- MongoDB\BSON\Int64::__toString() --FILE-- ===DONE=== --EXPECT-- string(19) "9223372036854775807" string(20) "-9223372036854775808" string(1) "0" ===DONE=== PK.h]]//tests/query-sort-001.phptnu[--TEST-- Sorting single field, ascending --SKIPIF-- --FILE-- array('_id' => 0, 'username' => 1), 'sort' => array('username' => 1), "limit" => 100, )); $cursor = $manager->executeQuery(NS, $query); foreach ($cursor as $document) { echo $document->username . "\n"; } ?> ===DONE=== --EXPECT-- aaliyah.kertzmann aaron89 abbott.alden abbott.flo abby76 abernathy.adrienne abernathy.audrey abner.kreiger aboehm abshire.icie abshire.jazlyn adams.delta adolph20 adonis.schamberger agleason ahartmann ahettinger akreiger al.cormier al97 albin95 alda.murray alden.blanda alessandra76 alex73 alexa01 alfred.ritchie alia07 alia72 alize.hegmann allie48 alta.sawayn alvena.pacocha alvis22 alycia48 amalia84 amely01 amos.corkery amos78 anahi95 anais.feest anais58 andreanne.steuber angela.dickinson angelina.bartoletti angelina31 aniyah.franecki annalise40 antoinette.gaylord antoinette.weissnat aoberbrunner apacocha apollich ara92 arch44 arely.ryan armstrong.clara armstrong.gordon arnold.kiehn arvel.hilll asatterfield aschuppe ashlynn71 ashlynn85 ashton.o'kon austen03 austen47 austin67 awintheiser awyman ayana.brakus bailey.mertz bailey.sarina balistreri.donald barrett.prohaska bartell.susie bashirian.lina bayer.ova baylee.maggio bbernier bblick beahan.oleta beatty.layne beatty.myrtis beau49 beaulah.mann bechtelar.nadia becker.theron beer.mossie beer.roselyn benedict.johnson berge.enoch bergnaum.roberto bernardo.mccullough bernardo52 bernhard.margaretta bernie.morissette bethel20 betty09 bins.aliyah ===DONE=== PK.h]n4)tests/writeconcern-serialization-001.phptnu[--TEST-- MongoDB\Driver\WriteConcern serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- 1 new MongoDB\Driver\WriteConcern(-2, 1000), // 64-bit wtimeout is always encoded as as string MongoDB\Driver\WriteConcern::__set_state(['w' => 2, 'wtimeout' => '2147483648']), ]; foreach ($tests as $test) { var_dump($test); var_dump($test instanceof Serializable); echo $s = serialize($test), "\n"; var_dump(unserialize($s)); echo "\n"; } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } bool(true) C:27:"MongoDB\Driver\WriteConcern":29:{a:1:{s:1:"w";s:8:"majority";}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } object(MongoDB\Driver\WriteConcern)#%d (%d) { } bool(true) C:27:"MongoDB\Driver\WriteConcern":6:{a:0:{}} object(MongoDB\Driver\WriteConcern)#%d (%d) { } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(-1) } bool(true) C:27:"MongoDB\Driver\WriteConcern":19:{a:1:{s:1:"w";i:-1;}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(-1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } bool(true) C:27:"MongoDB\Driver\WriteConcern":18:{a:1:{s:1:"w";i:0;}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } bool(true) C:27:"MongoDB\Driver\WriteConcern":18:{a:1:{s:1:"w";i:1;}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } bool(true) C:27:"MongoDB\Driver\WriteConcern":29:{a:1:{s:1:"w";s:8:"majority";}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(8) "majority" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(3) "tag" } bool(true) C:27:"MongoDB\Driver\WriteConcern":24:{a:1:{s:1:"w";s:3:"tag";}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> string(3) "tag" } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } bool(true) C:27:"MongoDB\Driver\WriteConcern":18:{a:1:{s:1:"w";i:1;}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(false) } bool(true) C:27:"MongoDB\Driver\WriteConcern":30:{a:2:{s:1:"w";i:1;s:1:"j";b:0;}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(false) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["wtimeout"]=> int(1000) } bool(true) C:27:"MongoDB\Driver\WriteConcern":40:{a:2:{s:1:"w";i:1;s:8:"wtimeout";i:1000;}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(true) ["wtimeout"]=> int(1000) } bool(true) C:27:"MongoDB\Driver\WriteConcern":52:{a:3:{s:1:"w";i:1;s:1:"j";b:1;s:8:"wtimeout";i:1000;}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(1) ["j"]=> bool(true) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["j"]=> bool(true) } bool(true) C:27:"MongoDB\Driver\WriteConcern":18:{a:1:{s:1:"j";b:1;}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["j"]=> bool(true) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["wtimeout"]=> int(1000) } bool(true) C:27:"MongoDB\Driver\WriteConcern":28:{a:1:{s:8:"wtimeout";i:1000;}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> %rint\(2147483648\)|string\(10\) "2147483648"%r } bool(true) C:27:"MongoDB\Driver\WriteConcern":51:{a:2:{s:1:"w";i:2;s:8:"wtimeout";s:10:"2147483648";}} object(MongoDB\Driver\WriteConcern)#%d (%d) { ["w"]=> int(2) ["wtimeout"]=> %rint\(2147483648\)|string\(10\) "2147483648"%r } ===DONE=== PK.h];n  !tests/decimal128-4-valid-006.phptnu[--TEST-- Decimal128: [basx055] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000500000000000000000000000000303000 {"d":{"$numberDecimal":"5E-8"}} 180000001364000500000000000000000000000000303000 180000001364000500000000000000000000000000303000 ===DONE===PK.h]B'&tests/decimal128-6-parseError-017.phptnu[--TEST-- Decimal128: 2 signs --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]!CC+tests/bson-undefined-serialization-002.phptnu[--TEST-- MongoDB\BSON\Undefined serialization (__serialize and __unserialize) --SKIPIF-- --FILE-- undefined); var_dump($s = serialize($undefined)); var_dump(unserialize($s)); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Undefined)#%d (%d) { } string(34) "O:22:"MongoDB\BSON\Undefined":0:{}" object(MongoDB\BSON\Undefined)#%d (%d) { } ===DONE=== PK.h]6R,--!tests/decimal128-3-valid-038.phptnu[--TEST-- Decimal128: [basx292] some more negative zeros [systematic tests below] --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000034b000 {"d":{"$numberDecimal":"-0.000000"}} 18000000136400000000000000000000000000000034b000 18000000136400000000000000000000000000000034b000 ===DONE===PK.h]ų!tests/string-decodeError-004.phptnu[--TEST-- String: bad string length: longer than rest of document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]i zz-tests/session-startTransaction_error-002.phptnu[--TEST-- MongoDB\Driver\Session::startTransaction() with wrong values in options array --SKIPIF-- --FILE-- startSession(); $options = [ [ 'maxCommitTimeMS' => -1 ], [ 'readConcern' => 42 ], [ 'readConcern' => new stdClass ], [ 'readConcern' => new \MongoDB\Driver\WriteConcern( 2 ) ], [ 'readPreference' => 42 ], [ 'readPreference' => new stdClass ], [ 'readPreference' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ) ], [ 'writeConcern' => 42 ], [ 'writeConcern' => new stdClass ], [ 'writeConcern' => new \MongoDB\Driver\ReadPreference( \MongoDB\Driver\ReadPreference::RP_SECONDARY ) ], [ 'readConcern' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ), 'readPreference' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ), ], [ 'readConcern' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ), 'writeConcern' => new \MongoDB\Driver\ReadPreference( \MongoDB\Driver\ReadPreference::RP_SECONDARY ), ], [ 'readPreference' => new \MongoDB\Driver\ReadPreference( \MongoDB\Driver\ReadPreference::RP_SECONDARY ), 'writeConcern' => new \MongoDB\Driver\ReadPreference( \MongoDB\Driver\ReadPreference::RP_SECONDARY ), ], ]; foreach ($options as $txnOptions) { echo throws(function() use ($session, $txnOptions) { $session->startTransaction($txnOptions); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; } echo raises(function() use ($session) { $session->startTransaction([ 'maxCommitTimeMS' => new stdClass ]); }, E_NOTICE | E_WARNING), "\n"; ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "maxCommitTimeMS" option to be >= 0, -1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, MongoDB\Driver\WriteConcern given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, MongoDB\Driver\ReadConcern given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, int%S given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, MongoDB\Driver\ReadPreference given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, MongoDB\Driver\ReadConcern given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, MongoDB\Driver\ReadPreference given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, MongoDB\Driver\ReadPreference given OK: Got %r(E_NOTICE|E_WARNING)%r Object of class stdClass could not be converted to int ===DONE=== PK.h]#X88!tests/decimal128-2-valid-100.phptnu[--TEST-- Decimal128: [decq057] fold-downs (more below) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000c00000000000000000000000000403000 {"d":{"$numberDecimal":"12"}} 180000001364000c00000000000000000000000000403000 ===DONE===PK.h]ԇ,%tests/manager-executeCommand-005.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() pins transaction to server --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); $session = $manager->startSession(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $session->startTransaction(); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [['$group' => ['_id' => 1]]], 'cursor' => (object) [] ]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); $pinnedServer = $session->getServer(); var_dump($pinnedServer instanceof \MongoDB\Driver\Server); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); $session->commitTransaction(); var_dump($session->getServer() == $pinnedServer); $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['x' => 1]); $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); var_dump($session->getServer() instanceof \MongoDB\Driver\Server); ?> ===DONE=== --EXPECT-- bool(false) bool(false) bool(true) bool(true) bool(false) ===DONE=== PK.h]&tests/decimal128-7-parseError-013.phptnu[--TEST-- Decimal128: [basx510] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]o  !tests/decimal128-3-valid-225.phptnu[--TEST-- Decimal128: [basx331] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000003a3000 {"d":{"$numberDecimal":"0.010"}} 180000001364000a000000000000000000000000003a3000 180000001364000a000000000000000000000000003a3000 ===DONE===PK.h]QC&tests/decimal128-7-parseError-004.phptnu[--TEST-- Decimal128: [basx534] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]%?:!!!tests/decimal128-3-valid-110.phptnu[--TEST-- Decimal128: [basx298] some more negative zeros [systematic tests below] --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003cb000 {"d":{"$numberDecimal":"-0.00"}} 1800000013640000000000000000000000000000003cb000 1800000013640000000000000000000000000000003cb000 ===DONE===PK.h]B2v,,4tests/manager-ctor-disableClientPersistence-003.phptnu[--TEST-- MongoDB\Driver\Manager with disableClientPersistence=true referenced by Session --SKIPIF-- --FILE-- true]); ini_set('mongodb.debug', ''); echo "Creating session\n"; $session = $manager->startSession(); echo "Unsetting manager\n"; ini_set('mongodb.debug', 'stderr'); unset($manager); ini_set('mongodb.debug', ''); echo "Unsetting session\n"; ini_set('mongodb.debug', 'stderr'); unset($session); ini_set('mongodb.debug', ''); ?> ===DONE=== --EXPECTF-- %A [%s] PHONGO: DEBUG > Created client with hash: %s [%s] PHONGO: DEBUG > Stored non-persistent client Creating session Unsetting manager Unsetting session%A [%s] PHONGO: DEBUG > Destroying non-persistent client for Manager%A ===DONE=== PK.h])(tests/bson-decimal128-set_state-001.phptnu[--TEST-- MongoDB\BSON\Decimal128::__set_state() --SKIPIF-- --FILE-- $value, ])); echo "\n\n"; } ?> ===DONE=== --EXPECTF-- MongoDB\BSON\Decimal128::__set_state(array( %w'dec' => '1234.5678', )) MongoDB\BSON\Decimal128::__set_state(array( %w'dec' => '-1234.5678', )) MongoDB\BSON\Decimal128::__set_state(array( %w'dec' => 'Infinity', )) MongoDB\BSON\Decimal128::__set_state(array( %w'dec' => 'Infinity', )) MongoDB\BSON\Decimal128::__set_state(array( %w'dec' => 'NaN', )) MongoDB\BSON\Decimal128::__set_state(array( %w'dec' => 'NaN', )) ===DONE=== PK.h]ଧ!tests/decimal128-3-valid-039.phptnu[--TEST-- Decimal128: [basx133] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000323000 {"d":{"$numberDecimal":"0E-7"}} 180000001364000000000000000000000000000000323000 180000001364000000000000000000000000000000323000 ===DONE===PK.h]!KP  !tests/decimal128-3-valid-146.phptnu[--TEST-- Decimal128: [basx253] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000303000 {"d":{"$numberDecimal":"0.00001265"}} 18000000136400f104000000000000000000000000303000 18000000136400f104000000000000000000000000303000 ===DONE===PK.h]%Žkk#tests/standalone-x509-auth-001.phptnu[--TEST-- Connect to MongoDB with SSL and X509 auth --SKIPIF-- --FILE-- true, 'weak_cert_validation' => false, 'ca_file' => SSL_DIR . '/ca.pem', 'pem_file' => SSL_DIR . '/client.pem', ]; $manager = create_test_manager(URI, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); var_dump($cursor->toArray()[0]); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["ok"]=> float(1) } ===DONE=== PK.h]5p33!tests/decimal128-2-valid-099.phptnu[--TEST-- Decimal128: [decq702] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000403000 {"d":{"$numberDecimal":"10"}} 180000001364000a00000000000000000000000000403000 ===DONE===PK.h]jtests/top-parseError-030.phptnu[--TEST-- Top-level document validity: Bad $timestamp (missing t) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]ɓ6&tests/decimal128-7-parseError-014.phptnu[--TEST-- Decimal128: [basx513] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h](RY1tests/bson-dbpointer-serialization_error-004.phptnu[--TEST-- MongoDB\BSON\DBPointer unserialization requires "id" string field to be valid (__serialize and __unserialize) --SKIPIF-- --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: QQQQ78accd485d55b4050000 OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: 52e78accd485d55b4050000 ===DONE=== PK.h]tests/top-parseError-010.phptnu[--TEST-- Top-level document validity: Bad $numberLong (number, not string) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]Q-tests/readpreference-set_state_error-002.phptnu[--TEST-- MongoDB\Driver\ReadPreference::__set_state() requires correct data types and values --SKIPIF-- --FILE-- 'secondary', 'maxStalenessSeconds' => 2147483648]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ReadPreference initialization requires "maxStalenessSeconds" integer field to be <= 2147483647 ===DONE=== PK.h]SW tests/array-decodeError-003.phptnu[--TEST-- Array: Invalid Array: bad string length in field --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]tZ&tests/decimal128-7-parseError-044.phptnu[--TEST-- Decimal128: [basx542] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]M#tests/manager-executeQuery-003.phptnu[--TEST-- MongoDB\Driver\Manager::executeQuery() takes a read preference in options array --SKIPIF-- --FILE-- insert(['_id' => 1, 'x' => 2, 'y' => 3]); $manager->executeBulkWrite(NS, $bulk); $primary = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY); $secondary = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY); echo "Testing primary:\n"; $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); $cursor = $manager->executeQuery(NS, $query, ['readPreference' => $primary]); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; echo "Testing secondary:\n"; $query = new MongoDB\Driver\Query(['x' => 3], ['projection' => ['y' => 1]]); $cursor = $manager->executeQuery(NS, $query, ['readPreference' => $secondary]); echo "is_primary: ", $cursor->getServer()->isPrimary() ? 'true' : 'false', "\n"; echo "is_secondary: ", $cursor->getServer()->isSecondary() ? 'true' : 'false', "\n\n"; ?> ===DONE=== --EXPECTF-- Testing primary: is_primary: true is_secondary: false Testing secondary: is_primary: false is_secondary: true ===DONE=== PK.h]4K)tests/standalone-ssl-verify_cert-002.phptnu[--TEST-- Connect to MongoDB with SSL and cert verification (context options) --SKIPIF-- --FILE-- stream_context_create([ 'ssl' => [ // libmongoc does not allow the hostname to be overridden as "server" 'allow_invalid_hostname' => true, 'allow_self_signed' => false, // "weak_cert_validation" alias 'cafile' => SSL_DIR . '/ca.pem', // "ca_file" alias ], ]), ]; $manager = create_test_manager(URI, [], $driverOptions); $cursor = $manager->executeCommand(DATABASE_NAME, new MongoDB\Driver\Command(['ping' => 1])); printf("ping: %d\n", $cursor->toArray()[0]->ok); ?> ===DONE=== --EXPECTF-- Deprecated: MongoDB\Driver\Manager::__construct(): The "context" driver option is deprecated.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_invalid_hostname" driver option is deprecated. Please use the "tlsAllowInvalidHostnames" URI option instead.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "allow_self_signed" context driver option is deprecated. Please use the "tlsAllowInvalidCertificates" URI option instead.%s Deprecated: MongoDB\Driver\Manager::__construct(): The "cafile" context driver option is deprecated. Please use the "tlsCAFile" URI option instead.%s ping: 1 ===DONE=== PK.h]a33!tests/decimal128-2-valid-114.phptnu[--TEST-- Decimal128: [decq716] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364004800000000000000000000000000403000 {"d":{"$numberDecimal":"72"}} 180000001364004800000000000000000000000000403000 ===DONE===PK.h];!tests/bson-int64-compare-001.phptnu[--TEST-- MongoDB\BSON\Int64 comparisons --FILE-- $min); var_dump($max > $zero); var_dump($min == $min); var_dump($min < $max); var_dump($min < $zero); var_dump($zero == $zero); var_dump($zero < $max); var_dump($zero > $min); ?> ===DONE=== --EXPECT-- bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]S*tests/manager-ctor-auth_mechanism-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): authMechanism option --FILE-- 'MONGODB-X509', 'username' => 'username']], [null, ['authMechanism' => 'MONGODB-X509']], [null, ['authMechanism' => 'GSSAPI', 'username' => 'username']], [null, ['authMechanism' => 'MONGODB-AWS']], ]; foreach ($tests as $test) { list($uri, $options) = $test; /* Note: the Manager's debug information does not include the auth mechanism * so we are merely testing that no exception is thrown. */ $manager = new MongoDB\Driver\Manager($uri, $options); } ?> ===DONE=== --EXPECT-- ===DONE=== PK.h]t;&tests/decimal128-6-parseError-007.phptnu[--TEST-- Decimal128: 2 decimal places --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]Ir'%tests/bson-objectidinterface-001.phptnu[--TEST-- MongoDB\BSON\ObjectIdInterface is implemented by MongoDB\BSON\ObjectId --FILE-- ===DONE=== --EXPECT-- bool(true) ===DONE=== PK.h]Y*!tests/decimal128-4-valid-003.phptnu[--TEST-- Decimal128: [basx610] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640000000000000000000000000000003e3000 {"d":{"$numberDecimal":"0.0"}} 1800000013640000000000000000000000000000003e3000 1800000013640000000000000000000000000000003e3000 ===DONE===PK.h]C  +tests/session-advanceOperationTime-001.phptnu[--TEST-- MongoDB\Driver\Session::advanceOperationTime() --SKIPIF-- --FILE-- startSession(); $sessionB = $manager->startSession(); $command = new MongoDB\Driver\Command(['ping' => 1]); $manager->executeCommand(DATABASE_NAME, $command, ['session' => $sessionA]); echo "Initial operation time of session B:\n"; var_dump($sessionB->getOperationTime()); $sessionB->advanceOperationTime($sessionA->getOperationTime()); echo "\nOperation time after advancing session B:\n"; var_dump($sessionB->getOperationTime()); echo "\nSessions A and B have equivalent operation times:\n"; var_dump($sessionA->getOperationTime() == $sessionB->getOperationTime()); ?> ===DONE=== --EXPECTF-- Initial operation time of session B: NULL Operation time after advancing session B: object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(%d) "%d" ["timestamp"]=> string(%d) "%d" } Sessions A and B have equivalent operation times: bool(true) ===DONE=== PK.h]fY92tests/manager-ctor-directconnection-error-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): directConnection=true conflicts with multiple seeds --FILE-- true]); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://a.example.com,b.example.com/?directConnection=true'. Multiple seeds not allowed with directConnection option. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: Multiple seeds not allowed with directConnection option. ===DONE=== PK.h]v.&tests/decimal128-7-parseError-036.phptnu[--TEST-- Decimal128: [basx588] some baddies with dots and Es and dots and specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h];u[ [ *tests/server-executeCommand_error-001.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() with invalid options (MONGOC_CMD_RAW) --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); $command = new MongoDB\Driver\Command(['ping' => 1]); echo throws(function() use ($server, $command) { $server->executeCommand(DATABASE_NAME, $command, ['readConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeCommand(DATABASE_NAME, $command, ['readConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeCommand(DATABASE_NAME, $command, ['readPreference' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeCommand(DATABASE_NAME, $command, ['readPreference' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeCommand(DATABASE_NAME, $command, ['session' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeCommand(DATABASE_NAME, $command, ['session' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeCommand(DATABASE_NAME, $command, ['writeConcern' => 'foo']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() use ($server, $command) { $server->executeCommand(DATABASE_NAME, $command, ['writeConcern' => new stdClass]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readPreference" option to be MongoDB\Driver\ReadPreference, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "session" option to be MongoDB\Driver\Session, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "writeConcern" option to be MongoDB\Driver\WriteConcern, stdClass given ===DONE=== PK.h]{3tests/runtimeexception-haserrorlabel_error-001.phptnu[--TEST-- MongoDB\Driver\Exception\RuntimeException::hasErrorLabel() with non-array values --FILE-- getProperty('errorLabels'); $resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('bar')); ?> ===DONE=== --EXPECT-- bool(false) ===DONE=== PK.h](#22tests/int64-valid-004.phptnu[--TEST-- Int64 type: 0 --XFAIL-- PHP encodes integers as 32-bit if range allows --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000126100000000000000000000 {"a":{"$numberLong":"0"}} {"a":0} 10000000126100000000000000000000 {"a":0} ===DONE===PK.h].0Shh!tests/decimal128-3-valid-305.phptnu[--TEST-- Decimal128: [basx056] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006ab9c8733a0b0000000000000000343000 {"d":{"$numberDecimal":"12345678.543210"}} 180000001364006ab9c8733a0b0000000000000000343000 ===DONE===PK.h]7]/0tests/bson-objectid-serialization_error-002.phptnu[--TEST-- MongoDB\BSON\ObjectId unserialization requires valid hex string (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: 0123456789abcdefghijklmn OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: INVALID ===DONE=== PK.h]Q9P!tests/decimal128-1-valid-041.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - Long Decimal String --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000722800 {"d":{"$numberDecimal":"1E-999"}} 180000001364000100000000000000000000000000722800 180000001364000100000000000000000000000000722800 ===DONE===PK.h]nǺ tests/server-errors.phptnu[--TEST-- MongoDB\Driver\Server argument count errors --SKIPIF-- =', '7.99'); ?> --FILE-- executeQuery(NS, new MongoDB\Driver\Query(array()))->getServer(); $methods = [ 'getHost', 'getTags', 'getInfo', 'getLatency', 'getPort', 'getType', 'isPrimary', 'isSecondary', 'isArbiter', 'isHidden', 'isPassive', ]; foreach ($methods as $method) { echo throws(function() use ($server, $method) { $server->{$method}(true); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; } ?> ===DONE=== --EXPECTF-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::getHost() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::getTags() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::getInfo() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::getLatency() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::getPort() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::getType() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::isPrimary() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::isSecondary() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::isArbiter() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::isHidden() expects exactly 0 %r(argument|parameter)%rs, 1 given OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\Server::isPassive() expects exactly 0 %r(argument|parameter)%rs, 1 given ===DONE=== PK.h]RA0MM+tests/bson-timestamp-serialization-001.phptnu[--TEST-- MongoDB\BSON\Timestamp serialization (Serializable interface) --SKIPIF-- =', '7.4.0'); ?> --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } string(95) "C:22:"MongoDB\BSON\Timestamp":60:{a:2:{s:9:"increment";s:4:"1234";s:9:"timestamp";s:4:"5678";}}" object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "2147483647" ["timestamp"]=> string(1) "0" } string(99) "C:22:"MongoDB\BSON\Timestamp":64:{a:2:{s:9:"increment";s:10:"2147483647";s:9:"timestamp";s:1:"0";}}" object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(10) "2147483647" ["timestamp"]=> string(1) "0" } object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "2147483647" } string(99) "C:22:"MongoDB\BSON\Timestamp":64:{a:2:{s:9:"increment";s:1:"0";s:9:"timestamp";s:10:"2147483647";}}" object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(1) "0" ["timestamp"]=> string(10) "2147483647" } ===DONE=== PK.h]}$tests/server-executeCommand-006.phptnu[--TEST-- MongoDB\Driver\Server::executeCommand() options (MONGO_CMD_RAW) --SKIPIF-- --FILE-- selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY)); (new CommandObserver)->observe( function() use ($server) { $command = new MongoDB\Driver\Command([ 'ping' => true, ]); try { $server->executeCommand( DATABASE_NAME, $command, [ 'readPreference' => new \MongoDB\Driver\ReadPreference(\MongoDB\Driver\ReadPreference::RP_SECONDARY), 'readConcern' => new \MongoDB\Driver\ReadConcern(\MongoDB\Driver\ReadConcern::LOCAL), 'writeConcern' => new \MongoDB\Driver\WriteConcern(\MongoDB\Driver\WriteConcern::MAJORITY), ] ); } catch ( Exception $e ) { // Ignore exception that ping doesn't support writeConcern } }, function(stdClass $command) { echo "Read Preference: ", $command->{'$readPreference'}->mode, "\n"; echo "Read Concern: ", $command->readConcern->level, "\n"; echo "Write Concern: ", $command->writeConcern->w, "\n"; } ); ?> ===DONE=== --EXPECTF-- Read Preference: secondary Read Concern: local Write Concern: majority ===DONE=== PK.h]..!tests/decimal128-3-valid-023.phptnu[--TEST-- Decimal128: [basx606] Zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000383000 {"d":{"$numberDecimal":"0.0000"}} 180000001364000000000000000000000000000000383000 ===DONE===PK.h]{{Ntests/datetime-valid-005.phptnu[--TEST-- DateTime: leading zero ms --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000096100d1d6d6cc3b01000000 {"a":{"$date":{"$numberLong":"1356351330001"}}} {"a":{"$date":"2012-12-24T12:15:30.001Z"}} 10000000096100d1d6d6cc3b01000000 {"a":{"$date":"2012-12-24T12:15:30.001Z"}} ===DONE===PK.h] f ff!tests/decimal128-3-valid-304.phptnu[--TEST-- Decimal128: [basx057] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364006a19562522020000000000000000343000 {"d":{"$numberDecimal":"2345678.543210"}} 180000001364006a19562522020000000000000000343000 ===DONE===PK.h]WOxtests/manager_error-001.phptnu[--TEST-- MongoDB\Driver\Manager cannot be extended --FILE-- ===DONE=== --EXPECTF-- Fatal error: Class MyManager %s final class %SMongoDB\Driver\Manager%S in %s on line %d PK.h]PZvtests/query-ctor_error-003.phptnu[--TEST-- MongoDB\Driver\Query construction (negative limit conflicts with false singleBatch) --FILE-- -1, 'singleBatch' => false]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Negative "limit" option conflicts with false "singleBatch" option ===DONE=== PK.h]9n!tests/decimal128-3-valid-200.phptnu[--TEST-- Decimal128: [basx373] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000004c3000 {"d":{"$numberDecimal":"7E+6"}} 1800000013640007000000000000000000000000004c3000 1800000013640007000000000000000000000000004c3000 ===DONE===PK.h]4!tests/decimal128-5-valid-023.phptnu[--TEST-- Decimal128: [decq190] underflow edge cases (Subnormal) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000008000 {"d":{"$numberDecimal":"-1E-6176"}} 180000001364000100000000000000000000000000008000 180000001364000100000000000000000000000000008000 ===DONE===PK.h]!^BFF!tests/decimal128-3-valid-128.phptnu[--TEST-- Decimal128: [basx035] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640015cd5b0700000000000000000000223000 {"d":{"$numberDecimal":"1.23456789E-7"}} 1800000013640015cd5b0700000000000000000000223000 1800000013640015cd5b0700000000000000000000223000 ===DONE===PK.h]S&tests/decimal128-6-parseError-015.phptnu[--TEST-- Decimal128: 2 negative signs --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]5B11!tests/decimal128-2-valid-097.phptnu[--TEST-- Decimal128: [decq701] Selected DPD codes --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000900000000000000000000000000403000 {"d":{"$numberDecimal":"9"}} 180000001364000900000000000000000000000000403000 ===DONE===PK.h])tests/writeresult-getupsertedids-002.phptnu[--TEST-- MongoDB\Driver\WriteResult::getUpsertedIds() with client-generated values --SKIPIF-- --FILE-- update(['_id' => $value], ['$set' => ['x' => 1]], ['upsert' => true]); } $result = $manager->executeBulkWrite(NS, $bulk); var_dump($result->getUpsertedIds()); ?> ===DONE=== --EXPECTF-- array(13) { [0]=> NULL [1]=> bool(true) [2]=> int(1) [3]=> float(4.125) [4]=> string(3) "foo" [5]=> object(stdClass)#%d (%d) { } [6]=> object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(3) "foo" ["type"]=> int(0) } [7]=> object(MongoDB\BSON\Javascript)#%d (%d) { ["code"]=> string(12) "function(){}" ["scope"]=> NULL } [8]=> object(MongoDB\BSON\MaxKey)#%d (%d) { } [9]=> object(MongoDB\BSON\MinKey)#%d (%d) { } [10]=> object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "586c18d86118fd6c9012dec1" } [11]=> object(MongoDB\BSON\Timestamp)#%d (%d) { ["increment"]=> string(4) "1234" ["timestamp"]=> string(4) "5678" } [12]=> object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1483479256924" } } ===DONE=== PK.h]i] %!tests/decimal128-3-valid-255.phptnu[--TEST-- Decimal128: [basx194] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f104000000000000000000000000363000 {"d":{"$numberDecimal":"0.01265"}} 18000000136400f104000000000000000000000000363000 18000000136400f104000000000000000000000000363000 ===DONE===PK.h]ѻhhtests/bug0912-001.phptnu[--TEST-- PHPC-912: Child process should not destroy mongoc_client_t objects from parent --SKIPIF-- --FILE-- 1]); $cursor = $manager->executeCommand(DATABASE_NAME, $command); $uri = $cursor->toArray()[0]->you; $bulk = new MongoDB\Driver\BulkWrite(); $bulk->insert(['pid' => getmypid(), 'uri' => $uri]); $manager->executeBulkWrite(NS, $bulk); } $manager = create_test_manager(); logMyURI($manager); $parentPid = getmypid(); $childPid = pcntl_fork(); if ($childPid === 0) { $manager = create_test_manager(); logMyURI($manager); exit; } if ($childPid) { $waitPid = pcntl_waitpid($childPid, $status); if ($waitPid > 0) { printf("Parent(%d) waited for child(%d) to exit\n", $parentPid, $waitPid); } $cursor = $manager->executeQuery(NS, new MongoDB\Driver\Query([])); $results = $cursor->toArray(); printf("%d connections were logged\n", count($results)); printf("PIDs differ: %s\n", $results[0]->pid !== $results[1]->pid ? 'yes' : 'no'); printf("URIs differ: %s\n", $results[0]->uri !== $results[1]->uri ? 'yes' : 'no'); } ?> ===DONE=== --EXPECTF-- Parent(%d) waited for child(%d) to exit 2 connections were logged PIDs differ: yes URIs differ: yes ===DONE=== PK.h]Wtests/bson-utcdatetime-003.phptnu[--TEST-- MongoDB\BSON\UTCDateTime construction from 64-bit integer --SKIPIF-- --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\UTCDateTime)#%d (%d) { ["milliseconds"]=> string(13) "1416445411987" } ===DONE=== PK.h]]9!tests/decimal128-5-valid-065.phptnu[--TEST-- Decimal128: [decq661] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400e803000000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.000E+6114"}} 18000000136400e803000000000000000000000000fe5f00 18000000136400e803000000000000000000000000fe5f00 ===DONE===PK.h]ڼ500!tests/decimal128-3-valid-126.phptnu[--TEST-- Decimal128: [basx061] strings without E cannot generate E in result --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400185c0ace00000000000000000000383000 {"d":{"$numberDecimal":"345678.5432"}} 18000000136400185c0ace00000000000000000000383000 18000000136400185c0ace00000000000000000000383000 ===DONE===PK.h]n``-tests/session-startTransaction_error-004.phptnu[--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%S 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=== PK.h]~g!tests/decimal128-3-valid-273.phptnu[--TEST-- Decimal128: [basx217] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400f1040000000000000000000000003e3000 {"d":{"$numberDecimal":"126.5"}} 18000000136400f1040000000000000000000000003e3000 18000000136400f1040000000000000000000000003e3000 ===DONE===PK.h]]Y9!tests/decimal128-3-valid-157.phptnu[--TEST-- Decimal128: [basx146] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000523000 {"d":{"$numberDecimal":"1E+9"}} 180000001364000100000000000000000000000000523000 180000001364000100000000000000000000000000523000 ===DONE===PK.h]w!tests/decimal128-1-valid-042.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - nan --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007c00 {"d":{"$numberDecimal":"NaN"}} 180000001364000000000000000000000000000000007c00 180000001364000000000000000000000000000000007c00 ===DONE===PK.h]_''!tests/decimal128-5-valid-061.phptnu[--TEST-- Decimal128: [decq653] fold-down full sequence (Clamped) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364008096980000000000000000000000fe5f00 {"d":{"$numberDecimal":"1.0000000E+6118"}} 180000001364008096980000000000000000000000fe5f00 180000001364008096980000000000000000000000fe5f00 ===DONE===PK.h]!;;!tests/decimal128-2-valid-090.phptnu[--TEST-- Decimal128: [decq449] exponent lengths --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1800000013640007000000000000000000000000001e5f00 {"d":{"$numberDecimal":"7E+5999"}} 1800000013640007000000000000000000000000001e5f00 ===DONE===PK.h]5]]tests/bulkwrite_error-002.phptnu[--TEST-- MongoDB\Driver\BulkWrite cannot be executed multiple times --SKIPIF-- --FILE-- insert(['x' => 1]); $result = $manager->executeBulkWrite(NS, $bulk); printf("Inserted %d document(s)\n", $result->getInsertedCount()); echo throws(function() use ($manager, $bulk) { $result = $manager->executeBulkWrite(NS, $bulk); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECTF-- Inserted 1 document(s) OK: Got MongoDB\Driver\Exception\InvalidArgumentException BulkWrite objects may only be executed once and this instance has already been executed ===DONE=== PK.h]X=  !tests/decimal128-1-valid-052.phptnu[--TEST-- Decimal128: Non-Canonical Parsing - -inf --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400000000000000000000000000000000f800 {"d":{"$numberDecimal":"-Infinity"}} 18000000136400000000000000000000000000000000f800 18000000136400000000000000000000000000000000f800 ===DONE===PK.h]aUU!tests/decimal128-2-valid-028.phptnu[--TEST-- Decimal128: [decq016] derivative canonical plain strings --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400ee0200000000000000000000000030b000 {"d":{"$numberDecimal":"-0.00000750"}} 18000000136400ee0200000000000000000000000030b000 ===DONE===PK.h]"m55!tests/decimal128-2-valid-044.phptnu[--TEST-- Decimal128: [decq508] Specials --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000007800 {"d":{"$numberDecimal":"Infinity"}} 180000001364000000000000000000000000000000007800 ===DONE===PK.h]Sl쎴!tests/causal-consistency-004.phptnu[--TEST-- Causal consistency: first read or write in session updates operationTime (even on error) --SKIPIF-- --FILE-- lastSeenOperationTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['_id' => 1]); $bulk->insert(['_id' => 1]); throws(function() use ($manager, $bulk, $session) { $manager->executeBulkWrite(NS, $bulk, ['session' => $session]); }, 'MongoDB\Driver\Exception\BulkWriteException'); printf("Session reports last seen operationTime: %s\n", ($session->getOperationTime() == $this->lastSeenOperationTime) ? 'yes' : 'no'); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function executeCommand() { $this->lastSeenOperationTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $command = new MongoDB\Driver\Command([ 'aggregate' => COLLECTION_NAME, 'pipeline' => [ ['$unsupportedOperator' => 1], ], 'cursor' => new stdClass, ]); throws(function() use ($manager, $command, $session) { $manager->executeCommand(DATABASE_NAME, $command, ['session' => $session]); }, 'MongoDB\Driver\Exception\RuntimeException'); /* We cannot access the server reply if an exception is thrown for a * failed command (see: PHPC-1076). For the time being, just assert that * the operationTime is not null. */ printf("Session has non-null operationTime: %s\n", ($session->getOperationTime() !== null ? 'yes' : 'no')); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function executeQuery() { $this->lastSeenOperationTime = null; MongoDB\Driver\Monitoring\addSubscriber($this); $manager = create_test_manager(); $session = $manager->startSession(); $query = new MongoDB\Driver\Query(['$unsupportedOperator' => 1]); throws(function() use ($manager, $query, $session) { $manager->executeQuery(NS, $query, ['session' => $session]); }, 'MongoDB\Driver\Exception\RuntimeException'); /* We cannot access the server reply if an exception is thrown for a * failed command (see: PHPC-1076). For the time being, just assert that * the operationTime is not null. */ printf("Session has non-null operationTime: %s\n", ($session->getOperationTime() !== null ? 'yes' : 'no')); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { $reply = $event->getReply(); $hasOperationTime = isset($reply->operationTime); printf("%s command reply includes operationTime: %s\n", $event->getCommandName(), $hasOperationTime ? 'yes' : 'no'); if ($hasOperationTime) { $this->lastSeenOperationTime = $reply->operationTime; } } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } echo "Testing executeBulkWrite()\n"; (new Test)->executeBulkWrite(); echo "\nTesting executeCommand()\n"; (new Test)->executeCommand(); echo "\nTesting executeQuery()\n"; (new Test)->executeQuery(); ?> ===DONE=== --EXPECT-- Testing executeBulkWrite() insert command reply includes operationTime: yes OK: Got MongoDB\Driver\Exception\BulkWriteException Session reports last seen operationTime: yes Testing executeCommand() OK: Got MongoDB\Driver\Exception\RuntimeException Session has non-null operationTime: yes Testing executeQuery() OK: Got MongoDB\Driver\Exception\RuntimeException Session has non-null operationTime: yes ===DONE=== PK.h]Ĝtests/document-valid-007.phptnu[--TEST-- Document type (sub-documents): Dot as key in sub-document --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 160000000378000e000000022e000200000061000000 {"x":{".":"a"}} 160000000378000e000000022e000200000061000000 ===DONE===PK.h]0%tests/bson-timestamp-compare-001.phptnu[--TEST-- MongoDB\BSON\Timestamp comparisons --FILE-- new MongoDB\BSON\Timestamp(1234, 5678)); // Timestamp is compared first var_dump(new MongoDB\BSON\Timestamp(1234, 5678) < new MongoDB\BSON\Timestamp(1233, 5679)); var_dump(new MongoDB\BSON\Timestamp(1234, 5678) > new MongoDB\BSON\Timestamp(1235, 5677)); // Increment is compared second var_dump(new MongoDB\BSON\Timestamp(1234, 5678) < new MongoDB\BSON\Timestamp(1235, 5678)); var_dump(new MongoDB\BSON\Timestamp(1234, 5678) > new MongoDB\BSON\Timestamp(1233, 5678)); ?> ===DONE=== --EXPECT-- bool(true) bool(false) bool(false) bool(true) bool(true) bool(true) bool(true) ===DONE=== PK.h]s tests/bug1163-001.phptnu[--TEST-- PHPC-1163: Unacknowledged write concern should omit implicit session --SKIPIF-- --FILE-- 0]); MongoDB\Driver\Monitoring\addSubscriber($this); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['x' => 1]); echo "Testing executeBulkWrite\n"; $manager->executeBulkWrite(NS, $bulk); $command = new MongoDB\Driver\Command([ 'insert' => COLLECTION_NAME, 'documents' => [['x' => 1]], ]); /* Note: executeCommand() and executeReadCommand() are not tested * because they do not inherit the client-level write concern. */ echo "\nTesting executeWriteCommand\n"; $manager->executeWriteCommand(DATABASE_NAME, $command); /* We can safely re-use the insert command with executeReadWriteCommand * because there is no readConcern to inherit. */ echo "\nTesting executeReadWriteCommand\n"; $manager->executeReadWriteCommand(DATABASE_NAME, $command); MongoDB\Driver\Monitoring\removeSubscriber($this); } public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event) { if ($event->getCommandName() === 'insert') { $command = $event->getCommand(); $hasSession = isset($command->lsid); $writeConcern = isset($command->writeConcern) ? $command->writeConcern: null; printf("insert command write concern: %s\n", json_encode($writeConcern)); printf("insert command has session: %s\n", $hasSession ? 'yes' : 'no'); } } public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event) { } public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event) { } } (new Test)->run(); ?> ===DONE=== --EXPECT-- Testing executeBulkWrite insert command write concern: {"w":0} insert command has session: no Testing executeWriteCommand insert command write concern: {"w":0} insert command has session: no Testing executeReadWriteCommand insert command write concern: {"w":0} insert command has session: no ===DONE=== PK.h] rXX!tests/decimal128-2-valid-142.phptnu[--TEST-- Decimal128: [decq787] DPD all-highs cases (includes the 24 redundant codes) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400e703000000000000000000000000403000 {"d":{"$numberDecimal":"999"}} 18000000136400e703000000000000000000000000403000 ===DONE===PK.h] ::(tests/bson-symbol-jsonserialize-001.phptnu[--TEST-- MongoDB\BSON\Symbol::jsonSerialize() return value --FILE-- symbol; var_dump($js->jsonSerialize()); ?> ===DONE=== --EXPECT-- array(1) { ["$symbol"]=> string(9) "valSymbol" } ===DONE=== PK.h]P\00!tests/decimal128-2-valid-042.phptnu[--TEST-- Decimal128: [decq405] zeros --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000000000 {"d":{"$numberDecimal":"0E-6176"}} 180000001364000000000000000000000000000000000000 ===DONE===PK.h]c&+tests/manager-executeCommand_error-005.phptnu[--TEST-- MongoDB\Driver\Manager::executeCommand() cannot combine session with unacknowledged write concern --SKIPIF-- --FILE-- COLLECTION_NAME, 'documents' => [['x' => 1]], ]); $manager->executeCommand(DATABASE_NAME, $command, [ 'session' => $manager->startSession(), 'writeConcern' => new MongoDB\Driver\WriteConcern(0), ]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot combine "session" option with an unacknowledged write concern ===DONE=== PK.h]C-,tests/transaction-integration_error-004.phptnu[--TEST-- MongoDB\Driver\Session: Setting per-op readConcern or writeConcern in transaction (executeReadWriteCommand) --SKIPIF-- --FILE-- executeCommand( DATABASE_NAME, new \MongoDB\Driver\Command([ 'create' => COLLECTION_NAME ]), [ 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); /* Do the transaction */ $session = $manager->startSession(); $session->startTransaction( [ 'readConcern' => new \MongoDB\Driver\ReadConcern( "snapshot" ), 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); echo throws(function() use ($manager, $session) { $cmd = new \MongoDB\Driver\Command( [ 'count' => COLLECTION_NAME, 'query' => [ 'q' => [ 'employee' => 3 ] ] ] ); $manager->executeReadWriteCommand( DATABASE_NAME, $cmd, [ 'session' => $session, 'readConcern' => new \MongoDB\Driver\ReadConcern( \MongoDB\Driver\ReadConcern::LOCAL ) ] ); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() use ($manager, $session) { $cmd = new \MongoDB\Driver\Command( [ 'update' => COLLECTION_NAME, 'updates' => [ [ 'q' => [ 'employee' => 3 ], 'u' => [ '$set' => [ 'status' => 'Inactive' ] ] ] ] ] ); $manager->executeReadWriteCommand( DATABASE_NAME, $cmd, [ 'session' => $session, 'writeConcern' => new \MongoDB\Driver\WriteConcern( \MongoDB\Driver\WriteConcern::MAJORITY ) ] ); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot set read concern after starting transaction OK: Got MongoDB\Driver\Exception\InvalidArgumentException Cannot set write concern after starting transaction ===DONE=== PK.h]J4!tests/decimal128-3-valid-236.phptnu[--TEST-- Decimal128: [basx164] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000f43000 {"d":{"$numberDecimal":"1.0E+91"}} 180000001364000a00000000000000000000000000f43000 180000001364000a00000000000000000000000000f43000 ===DONE===PK.h]&tests/int64-valid-001.phptnu[--TEST-- Int64 type: MinValue --SKIPIF-- --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Relaxed extJSON -> BSON -> Relaxed extJSON echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n"; ?> ===DONE=== --EXPECT-- 10000000126100000000000000008000 {"a":{"$numberLong":"-9223372036854775808"}} {"a":-9223372036854775808} 10000000126100000000000000008000 {"a":-9223372036854775808} ===DONE===PK.h]ratests/readconcern-ctor-001.phptnu[--TEST-- MongoDB\Driver\ReadConcern construction --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\Driver\ReadConcern)#%d (%d) { } object(MongoDB\Driver\ReadConcern)#%d (%d) { } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(5) "local" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(8) "majority" } object(MongoDB\Driver\ReadConcern)#%d (%d) { ["level"]=> string(17) "not-yet-supported" } ===DONE=== PK.h]ӳQQtests/bug1598-001.phptnu[--TEST-- PHPC-1598: WriteConcern get_gc should not invoke get_properties --FILE-- $wc]; $b = (object) ['wc' => $wc]; $a->b = $b; $b->a = $a; printf("Collected cycles: %d\n", gc_collect_cycles()); unset($a, $b); printf("Collected cycles: %d\n", gc_collect_cycles()); ?> ===DONE=== --EXPECT-- Collected cycles: 0 Collected cycles: 2 ===DONE=== PK.h]R!tests/decimal128-3-valid-210.phptnu[--TEST-- Decimal128: [basx165] Numbers with E --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a00000000000000000000000000523000 {"d":{"$numberDecimal":"1.0E+10"}} 180000001364000a00000000000000000000000000523000 180000001364000a00000000000000000000000000523000 ===DONE===PK.h]@|tests/cursor-session-002.phptnu[--TEST-- MongoDB\Driver\Cursor debug output for query cursor omits implicit session --SKIPIF-- --FILE-- insert(['_id' => 1]); $bulk->insert(['_id' => 2]); $bulk->insert(['_id' => 3]); $manager->executeBulkWrite(NS, $bulk); $query = new MongoDB\Driver\Query([], ['batchSize' => 2]); $cursor = $manager->executeQuery(NS, $query); $iterator = new IteratorIterator($cursor); $iterator->rewind(); $iterator->next(); /* Implicit sessions for query cursors are never exposed to PHPC, as they are * handled internally by libmongoc. Cursor debug ouput should never report such * sessions. */ printf("Cursor ID is zero: %s\n", (string) $cursor->getId() === '0' ? 'yes' : 'no'); var_dump($cursor); $iterator->next(); printf("\nCursor ID is zero: %s\n", (string) $cursor->getId() === '0' ? 'yes' : 'no'); var_dump($cursor); ?> ===DONE=== --EXPECTF-- Cursor ID is zero: no object(MongoDB\Driver\Cursor)#%d (%d) { %a ["session"]=> NULL %a } Cursor ID is zero: yes object(MongoDB\Driver\Cursor)#%d (%d) { %a ["session"]=> NULL %a } ===DONE=== PK.h]!tests/decimal128-2-valid-049.phptnu[--TEST-- Decimal128: [decq604] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000081efac855b416d2dee04fe5f00 {"d":{"$numberDecimal":"1.00000000000000000000000000000000E+6143"}} 180000001364000000000081efac855b416d2dee04fe5f00 ===DONE===PK.h] &tests/decimal128-7-parseError-048.phptnu[--TEST-- Decimal128: [basx546] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]& tests/compression_error-001.phptnu[--TEST-- MongoDB\Driver\Manager: Connecting with unsupported compressor --SKIPIF-- --FILE-- 'zli'] ); ini_set('mongodb.debug', null); ?> ===DONE=== --EXPECTF-- %AWARNING > Unsupported compressor: 'zli'%A ===DONE=== PK.h]{  0tests/manager-ctor-auth_mechanism-error-001.phptnu[--TEST-- MongoDB\Driver\Manager::__construct(): authentication options are validated --FILE-- 'GSSAPI', 'authSource' => 'admin']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://localhost:27017/?authMechanism=MONGODB-X509&authSource=admin'); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://localhost:27017/', ['authMechanism' => 'MONGODB-X509', 'authSource' => 'admin']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://@localhost:27017/?authMechanism=SCRAM-SHA-1'); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://localhost:27017/', ['username' => '', 'authMechanism' => 'SCRAM-SHA-1']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() { create_test_manager('mongodb://localhost:27017/', ['password' => 'password', 'authMechanism' => 'MONGODB-X509']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; // TODO: This test case should be removed by PHPC-1950 echo throws(function() { create_test_manager('mongodb://localhost:27017/', ['authSource' => 'foo']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?authMechanism=GSSAPI&authSource=admin'. GSSAPI and X509 require "$external" authSource. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: GSSAPI and X509 require "$external" authSource. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?authMechanism=MONGODB-X509&authSource=admin'. GSSAPI and X509 require "$external" authSource. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: GSSAPI and X509 require "$external" authSource. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://@localhost:27017/?authMechanism=SCRAM-SHA-1'. 'SCRAM-SHA-1' authentication mechanism requires username. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: 'SCRAM-SHA-1' authentication mechanism requires username. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: X509 authentication mechanism does not accept a password. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: Default authentication mechanism requires username. ===DONE=== PK.h]"tests/server-executeQuery-008.phptnu[--TEST-- MongoDB\Driver\Server::executeQuery() with conflicting read preference for secondary --SKIPIF-- --FILE-- selectServer($primaryRp); // Count all data-bearing members to use for the write concern $dataBearingNodes = count(array_filter($manager->getServers(), function (MongoDB\Driver\Server $server) { return ($server->isPrimary() || $server->isSecondary()); })); $bulk = new \MongoDB\Driver\BulkWrite; $bulk->insert(['_id' => 1, 'x' => 1]); $primary->executeBulkWrite(NS, $bulk, new MongoDB\Driver\WriteConcern($dataBearingNodes)); $secondaryRp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY); $secondary = $manager->selectServer($secondaryRp); /* Note: this is testing that the read preference (even a conflicting one) has * no effect when directly querying a server, since the secondaryOk flag is always * set for hinted queries. */ $cursor = $secondary->executeQuery(NS, new MongoDB\Driver\Query(['x' => 1]), $primaryRp); var_dump($cursor->toArray()); ?> ===DONE=== ( --EXPECTF-- array(1) { [0]=> object(stdClass)#%d (%d) { ["_id"]=> int(1) ["x"]=> int(1) } } ===DONE=== PK.h]b&tests/decimal128-7-parseError-066.phptnu[--TEST-- Decimal128: [basx570] Near-specials (Conversion_syntax) --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException ===DONE===PK.h]B$tests/dbpointer-decodeError-006.phptnu[--TEST-- DBPointer type (deprecated): String with bad UTF-8 --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]B!tests/symbol-decodeError-003.phptnu[--TEST-- Symbol: bad symbol length: eats terminator --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===PK.h]-ԓtests/query-sort-002.phptnu[--TEST-- Sorting single field, descending --SKIPIF-- --FILE-- array('_id' => 0, 'username' => 1), 'sort' => array('username' => -1), 'limit' => 100, )); $cursor = $manager->executeQuery(NS, $query); foreach ($cursor as $document) { echo $document->username . "\n"; } ?> ===DONE=== --EXPECT-- zulauf.amaya zstanton zoe41 zieme.noemi ziemann.webster zheathcote zella78 zboyle zachery33 yyost ywyman ywiza ypredovic yost.magali yost.ari ylarkin yklein yhudson yfritsch ycole yasmine.lowe yasmin55 xrodriguez xkohler xhermann xgutmann xgibson xcassin wwilkinson wunsch.mose wschimmel wschaefer wpacocha wolff.caroline wkertzmann wiza.carmel witting.walker witting.chris wisozk.cortez winnifred08 wilson.white willms.amari will.lamont will.jerod will.edwina wilfred.feil wilderman.sophia wiegand.blanche west.jude west.cristobal weimann.tillman webster70 webster48 watson70 warren.feest walton33 walter.norval walter.lester walsh.vincenza walker.alec wade91 vwaters vvolkman vschulist vrolfson vpfeffer vorn von.britney vivianne.macejkovic veum.tyrell vesta.ritchie verda93 vena.schumm velma37 velda.wehner veffertz vdickinson vconn vbraun vborer vbins vandervort.ezekiel van.ruecker uzieme uwisoky usmith uschumm uschmeler urban24 upton.zackery unique.pagac una.larkin umraz ullrich.layne ulises44 ulises.beatty ulesch ukovacek ujenkins uhansen ===DONE=== PK.h]Hގtests/bson-regex-002.phptnu[--TEST-- MongoDB\BSON\Regex debug handler --FILE-- ===DONE=== --EXPECTF-- object(MongoDB\BSON\Regex)#%d (%d) { ["pattern"]=> string(6) "regexp" ["flags"]=> string(1) "i" } ===DONE=== PK.h]8[[!tests/decimal128-3-valid-011.phptnu[--TEST-- Decimal128: [basx021] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 18000000136400010000000000000000000000000040b000 {"d":{"$numberDecimal":"-1"}} 18000000136400010000000000000000000000000040b000 ===DONE===PK.h]8P;;!tests/decimal128-2-valid-040.phptnu[--TEST-- Decimal128: [decq419] clamped zeros... --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000000000000000000000000000000fe5f00 {"d":{"$numberDecimal":"0E+6111"}} 180000001364000000000000000000000000000000fe5f00 ===DONE===PK.h]h((%tests/bson-utcdatetime-clone-001.phptnu[--TEST-- MongoDB\BSON\UTCDateTime can be cloned --FILE-- foo = 'bar'; $clone = clone $utcdatetime; var_dump($clone == $utcdatetime); var_dump($clone === $utcdatetime); unset($utcdatetime); var_dump($clone); var_dump($clone->foo); ?> ===DONE=== --EXPECTF-- bool(true) bool(false) object(MongoDB\BSON\UTCDateTime)#%d (1) { ["milliseconds"]=> string(13) "1416445411987" } string(3) "bar" ===DONE=== PK.h];xTBB!tests/decimal128-2-valid-082.phptnu[--TEST-- Decimal128: [decq670] fold-down full sequence --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000100000000000000000000000000fc5f00 {"d":{"$numberDecimal":"1E+6110"}} 180000001364000100000000000000000000000000fc5f00 ===DONE===PK.h]Q__!tests/decimal128-3-valid-008.phptnu[--TEST-- Decimal128: [basx024] conform to rules and exponent will be in permitted range). --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364005b000000000000000000000000003eb000 {"d":{"$numberDecimal":"-9.1"}} 180000001364005b000000000000000000000000003eb000 ===DONE===PK.h]2||1tests/bson-dbpointer-serialization_error-002.phptnu[--TEST-- MongoDB\BSON\DBPointer unserialization requires "id" string field to be valid (Serializable interface) --FILE-- ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: QQQQ78accd485d55b4050000 OK: Got MongoDB\Driver\Exception\InvalidArgumentException Error parsing ObjectId string: 52e78accd485d55b4050000 ===DONE=== PK.h]xxtests/dbpointer-valid-002.phptnu[--TEST-- DBPointer type (deprecated): DBpointer with opposite key order --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 1a0000000c610002000000620056e1fc72e0c917e9c471416100 {"a":{"$dbPointer":{"$ref":"b","$id":{"$oid":"56e1fc72e0c917e9c4714161"}}}} 1a0000000c610002000000620056e1fc72e0c917e9c471416100 1a0000000c610002000000620056e1fc72e0c917e9c471416100 ===DONE===PK.h]Zn{  !tests/decimal128-3-valid-230.phptnu[--TEST-- Decimal128: [basx313] Engineering notation tests --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- Native -> Canonical BSON echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n"; // Canonical BSON -> Canonical extJSON echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n"; // Canonical extJSON -> Canonical BSON echo bin2hex(fromJSON($canonicalExtJson)), "\n"; // Degenerate extJSON -> Canonical BSON echo bin2hex(fromJSON($degenerateExtJson)), "\n"; ?> ===DONE=== --EXPECT-- 180000001364000a000000000000000000000000004c3000 {"d":{"$numberDecimal":"1.0E+7"}} 180000001364000a000000000000000000000000004c3000 180000001364000a000000000000000000000000004c3000 ===DONE===PK.h]+C^C^utils/tools.phpnu[PK.h]^utils/classes.incnu[PK.h]IS''dutils/PHONGO-FIXTURES.json.gznu[PK.h]FFutils/observer.phpnu[PK.h];W%%9utils/basic.incnu[PK.h]yutils/basic-skipif.incnu[PK.h]/F3F3utils/skipif.phpnu[PK.h]tests/binary-decodeError-002.phptnu[PK.h]4zJVV!Y@tests/decimal128-2-valid-072.phptnu[PK.h]b9DD(Dtests/bson-symbol-jsonserialize-002.phptnu[PK.h]l  $Ftests/server-executeCommand-009.phptnu[PK.h]彷!Otests/decimal128-3-valid-125.phptnu[PK.h]IGnNTtests/boolean-valid-001.phptnu[PK.h]Ϊ&0Wtests/decimal128-4-parseError-019.phptnu[PK.h]&eYtests/decimal128-7-parseError-027.phptnu[PK.h]6G66[tests/cursor-getmore-003.phptnu[PK.h] #`tests/top-parseError-039.phptnu[PK.h]*CC3Bbtests/bson-utcdatetime-serialization_error-001.phptnu[PK.h]Kdtests/top-valid-004.phptnu[PK.h]一htests/bson-toPHP_error-006.phptnu[PK.h]( <77!jtests/decimal128-5-valid-053.phptnu[PK.h]o!otests/decimal128-5-valid-032.phptnu[PK.h]Ĥ]'kstests/bson-decimal128interface-001.phptnu[PK.h]ڱ`L%ttests/manager-executeCommand-007.phptnu[PK.h]!DAA!ztests/decimal128-5-valid-011.phptnu[PK.h]+11!Ztests/decimal128-5-valid-007.phptnu[PK.h]es ss܃tests/manager-ctor-004.phptnu[PK.h]!tests/decimal128-3-valid-191.phptnu[PK.h]%%!tests/decimal128-3-valid-080.phptnu[PK.h]ftests/bug1713-001.phptnu[PK.h]\\!tests/decimal128-2-valid-095.phptnu[PK.h]hp'ww!1tests/decimal128-1-valid-034.phptnu[PK.h]:W-tests/manager-executeBulkWrite_error-003.phptnu[PK.h]"s1GG!tests/decimal128-5-valid-022.phptnu[PK.h]P=s!ytests/decimal128-3-valid-107.phptnu[PK.h]˶ff%tests/cursorid-serialization-002.phptnu[PK.h]>I&rtests/cursorid_error-001.phptnu[PK.h]Dgtests/top-parseError-021.phptnu[PK.h]H&֮tests/writeconcern-ctor_error-004.phptnu[PK.h]yͻ,  !Ұtests/decimal128-3-valid-144.phptnu[PK.h]Y8!-tests/decimal128-3-valid-058.phptnu[PK.h]!stests/writeerror-getCode-001.phptnu[PK.h]-bb!Ctests/decimal128-2-valid-147.phptnu[PK.h] 00tests/bson-toPHP-008.phptnu[PK.h]~otests/top-parseError-033.phptnu[PK.h],ゐ+tests/manager-ctor-read_preference-002.phptnu[PK.h]^?? tests/writeconcernerror-001.phptnu[PK.h]T"x!$tests/decimal128-1-valid-047.phptnu[PK.h]oxPPztests/bson-unknown-001.phptnu[PK.h]!tests/decimal128-3-valid-216.phptnu[PK.h];jd))!utests/decimal128-3-valid-034.phptnu[PK.h]-,6W&tests/decimal128-7-parseError-018.phptnu[PK.h]1X<&/tests/session-isInTransaction-001.phptnu[PK.h]j[[!btests/decimal128-5-valid-002.phptnu[PK.h]'3,__!tests/decimal128-3-valid-245.phptnu[PK.h][cc!tests/decimal128-1-valid-040.phptnu[PK.h]݃Q Q rtests/bson-objectid-001.phptnu[PK.h]>>-tests/manager-executeBulkWrite_error-009.phptnu[PK.h]ؤ\s& tests/decimal128-7-parseError-025.phptnu[PK.h]c/tests/writeconcern-serialization_error-002.phptnu[PK.h]ekk4Vtests/manager-executeReadWriteCommand_error-002.phptnu[PK.h]s33!%tests/decimal128-2-valid-107.phptnu[PK.h]u"tests/top-parseError-041.phptnu[PK.h]7Q zz%tests/bulkwrite-delete_error-003.phptnu[PK.h]S(}'tests/query-ctor-002.phptnu[PK.h]eR(5tests/bson-symbol-serialization-001.phptnu[PK.h]ʤ%GG!8tests/decimal128-1-valid-030.phptnu[PK.h]:W. !q<tests/commandFailedEvent-001.phptnu[PK.h]/Gtests/top-parseError-018.phptnu[PK.h]g]\MM"Itests/replicaset-seedlist-001.phptnu[PK.h]&Ntests/decimal128-6-parseError-004.phptnu[PK.h]Ȇ==!Ptests/decimal128-5-valid-050.phptnu[PK.h]33!Utests/decimal128-2-valid-115.phptnu[PK.h]..!Xtests/decimal128-3-valid-030.phptnu[PK.h]Tp \tests/bson-toJSON_error-002.phptnu[PK.h];j+-_tests/writeresult-getinsertedcount-001.phptnu[PK.h]e%rr&Ubtests/writeconcernerror-debug-001.phptnu[PK.h]dUfp$ftests/server-executeCommand-008.phptnu[PK.h]ؼ&;mtests/decimal128-7-parseError-067.phptnu[PK.h][~otests/top-parseError-004.phptnu[PK.h]?!>!qtests/decimal128-3-valid-139.phptnu[PK.h]GA%%vtests/readconcern-ctor_error-002.phptnu[PK.h],**!ytests/decimal128-3-valid-074.phptnu[PK.h]18=+ }tests/readpreference-bsonserialize-002.phptnu[PK.h]/`Whh!tests/decimal128-2-valid-063.phptnu[PK.h]x&tests/writeconcern-ctor_error-005.phptnu[PK.h]Dqr)΋tests/writeconcern-serialization-002.phptnu[PK.h]ZNx2&tests/decimal128-6-parseError-030.phptnu[PK.h]R1tests/commandSucceededEvent-getServiceId-001.phptnu[PK.h]*28  !tests/decimal128-3-valid-195.phptnu[PK.h]ltests/top-decodeError-012.phptnu[PK.h]``tests/bug0347.phptnu[PK.h]F<dd!@tests/decimal128-2-valid-002.phptnu[PK.h].m#tests/bson-symbol-tostring-001.phptnu[PK.h]gbbXtests/bug1151-001.phptnu[PK.h]`tests/top-decodeError-013.phptnu[PK.h]A3(r33!3tests/decimal128-2-valid-104.phptnu[PK.h]O:!  -tests/bson-utcdatetime-serialization-002.phptnu[PK.h]WB!tests/decimal128-3-valid-046.phptnu[PK.h]GH#btests/bson-binary-tostring-001.phptnu[PK.h]F!tests/decimal128-1-valid-004.phptnu[PK.h]Q&tests/decimal128-7-parseError-032.phptnu[PK.h]ȠT&tests/cursor-setTypeMap_error-003.phptnu[PK.h]-1tests/server-getInfo-001.phptnu[PK.h]MNtests/dbpointer-valid-003.phptnu[PK.h]qq!tests/decimal128-4-valid-012.phptnu[PK.h]Ѿ99tests/bug1053.phptnu[PK.h]Fs8~GG%Xtests/readconcern-var_export-001.phptnu[PK.h]]~ww!tests/decimal128-3-valid-307.phptnu[PK.h]S&tests/decimal128-6-parseError-010.phptnu[PK.h]K lEE!tests/decimal128-5-valid-010.phptnu[PK.h]􆑌o o &Ftests/cursor-setTypeMap_error-001.phptnu[PK.h]BK& tests/decimal128-7-parseError-068.phptnu[PK.h]+g)Ntests/connectiontimeoutexception-001.phptnu[PK.h]P^ ==!tests/decimal128-3-valid-170.phptnu[PK.h]`&0tests/decimal128-7-parseError-080.phptnu[PK.h]ns(|tests/manager-ctor-read_concern-001.phptnu[PK.h]! tests/decimal128-3-valid-264.phptnu[PK.h]nY%Xtests/bulkwrite-delete_error-005.phptnu[PK.h]`~!tests/decimal128-3-valid-248.phptnu[PK.h]v.^^tests/bson-fromPHP-006.phptnu[PK.h]fMEE!tests/decimal128-5-valid-046.phptnu[PK.h]X;;!M tests/decimal128-5-valid-051.phptnu[PK.h] ,,!$tests/decimal128-1-valid-021.phptnu[PK.h]OO!V(tests/decimal128-2-valid-015.phptnu[PK.h]<2H0+tests/bson-objectid-serialization_error-001.phptnu[PK.h]ZTTN.tests/regex-valid-005.phptnu[PK.h]81tests/dbref-valid-003.phptnu[PK.h]v)7tests/writeconcern-bsonserialize-002.phptnu[PK.h]Ѥɍ'+>tests/bson-regex-serialization-003.phptnu[PK.h]! @tests/symbol-decodeError-006.phptnu[PK.h]'@HH8Btests/dbref-valid-001.phptnu[PK.h]ys0Ftests/manager-executeWriteCommand_error-001.phptnu[PK.h]Xa33!Mtests/decimal128-3-valid-287.phptnu[PK.h]ZgQtests/bug0231.phptnu[PK.h]ZHigTtests/bulkwrite-update-003.phptnu[PK.h]e**!'Ztests/decimal128-3-valid-116.phptnu[PK.h]w ]tests/array-decodeError-001.phptnu[PK.h]ߟxx_tests/bson-utcdatetime-007.phptnu[PK.h]VNN!btests/decimal128-2-valid-076.phptnu[PK.h]+x5OOQftests/bug0898-002.phptnu[PK.h]P"[jtests/bson-utcdatetime-004.phptnu[PK.h]*+j::!ltests/bson-fromPHP_error-006.phptnu[PK.h]O)Z!utests/decimal128-3-valid-092.phptnu[PK.h]Wq// ytests/ini-debug-ini_get-002.phptnu[PK.h]e22'G|tests/code_w_scope-decodeError-004.phptnu[PK.h]z-~tests/bson-decimal128-get_properties-002.phptnu[PK.h]|%!tests/decimal128-3-valid-215.phptnu[PK.h]eri"@tests/bson-objectid-clone-001.phptnu[PK.h]ص77!tests/decimal128-2-valid-045.phptnu[PK.h]-M3tests/string-valid-003.phptnu[PK.h]e?00(tests/writeconcernerror-getinfo-002.phptnu[PK.h]N!  !tests/decimal128-3-valid-239.phptnu[PK.h]DCCtests/dbref-valid-008.phptnu[PK.h]Z4{-tests/bson-regex-serialization_error-001.phptnu[PK.h]&ztests/bug1839-008.phptnu[PK.h]Ltests/cursorinterface-001.phptnu[PK.h]&ztests/bulkwrite_error-001.phptnu[PK.h]T ̿tests/retryable-writes-004.phptnu[PK.h]bmV!tests/decimal128-3-valid-106.phptnu[PK.h]Dtests/top-parseError-028.phptnu[PK.h]{Ntests/top-parseError-019.phptnu[PK.h]:;88tests/cursor-iterator-001.phptnu[PK.h]n `__!Ltests/decimal128-3-valid-244.phptnu[PK.h]ut  &tests/bson-undefined-tostring-001.phptnu[PK.h]e&_tests/decimal128-7-parseError-053.phptnu[PK.h]Ck !tests/code_w_scope-valid-005.phptnu[PK.h]=\`pp!tests/decimal128-2-valid-059.phptnu[PK.h]#.&tests/decimal128-6-parseError-028.phptnu[PK.h]==!tests/decimal128-1-valid-031.phptnu[PK.h]0&tests/server-executeBulkWrite-001.phptnu[PK.h];tests/bson-encode-005.phptnu[PK.h] dtests/bug1274-002.phptnu[PK.h]**!-tests/decimal128-3-valid-113.phptnu[PK.h]n@- tests/bson-regex-serialization_error-004.phptnu[PK.h]s'OO!tests/decimal128-2-valid-016.phptnu[PK.h]F{##!tests/decimal128-5-valid-063.phptnu[PK.h]ed__!tests/decimal128-3-valid-286.phptnu[PK.h]^Nr'dd!tests/decimal128-2-valid-003.phptnu[PK.h]qS*Xtests/commandFailedEvent-getReply-001.phptnu[PK.h]0ٺ!$tests/decimal128-3-valid-257.phptnu[PK.h]ޤ}JJ%(tests/manager-executeCommand-003.phptnu[PK.h]^^!.tests/decimal128-2-valid-068.phptnu[PK.h]_**!:2tests/decimal128-3-valid-123.phptnu[PK.h]j? ZZ!5tests/decimal128-2-valid-070.phptnu[PK.h]DD,`9tests/bson-timestamp-get_properties-001.phptnu[PK.h]X̤,;tests/bson-decimal128-jsonserialize-001.phptnu[PK.h]n1bb!<tests/decimal128-3-valid-009.phptnu[PK.h]V+A~~!Atests/bson-fromPHP_error-003.phptnu[PK.h]~ޅp!Jtests/decimal128-3-valid-095.phptnu[PK.h].A#Ntests/manager-ctor-wireversion.phptnu[PK.h]!Qtests/bson-fromJSON-002.phptnu[PK.h]gз4UZtests/manager-ctor-disableClientPersistence-004.phptnu[PK.h]A_EE^tests/regex-valid-003.phptnu[PK.h]N]]!Cbtests/decimal128-3-valid-152.phptnu[PK.h])}  !etests/decimal128-3-valid-175.phptnu[PK.h]!šKjtests/double-valid-009.phptnu[PK.h][^(('`ntests/manager-removeSubscriber-001.phptnu[PK.h].u!utests/decimal128-3-valid-258.phptnu[PK.h](/Χ  7ztests/top-decodeError-006.phptnu[PK.h]GG)|tests/bson-binary-get_properties-001.phptnu[PK.h]ǵ!2~tests/decimal128-3-valid-182.phptnu[PK.h]4{tests/top-parseError-008.phptnu[PK.h]en!tests/decimal128-5-valid-029.phptnu[PK.h] &tests/manager-set-uri-options-003.phptnu[PK.h]lLD(tests/bson-int64-get_properties-001.phptnu[PK.h]22!tests/decimal128-3-valid-021.phptnu[PK.h]Nxgetests/bug1698-001.phptnu[PK.h]{Ce(tests/bson-minkey-jsonserialize-001.phptnu[PK.h] 1@$tests/server-executeCommand-003.phptnu[PK.h]rXtests/top-decodeError-002.phptnu[PK.h]]&Ġtests/server-executeBulkWrite-006.phptnu[PK.h]0tests/manager-executeWriteCommand_error-004.phptnu[PK.h]y\!Ktests/decimal128-3-valid-280.phptnu[PK.h]ݵ&tests/writeconcern-ctor_error-003.phptnu[PK.h]6!tests/decimal128-3-valid-237.phptnu[PK.h]-G33!޵tests/decimal128-2-valid-103.phptnu[PK.h]ߨ.33$btests/manager-addSubscriber-001.phptnu[PK.h]Zpptests/typemap-001.phptnu[PK.h]Vll!tests/decimal128-2-valid-001.phptnu[PK.h]꧜;"\tests/server-executeQuery-004.phptnu[PK.h]~~!tests/decimal128-2-valid-052.phptnu[PK.h]yatests/bson-toPHP-002.phptnu[PK.h]("tests/replicaset-seedlist-002.phptnu[PK.h]GG#tests/manager-selectServer-002.phptnu[PK.h]ja!6tests/decimal128-3-valid-149.phptnu[PK.h] %zHH!tests/decimal128-2-valid-079.phptnu[PK.h] !!/(tests/manager-ctor-write_concern-error-003.phptnu[PK.h]EGbb!tests/decimal128-2-valid-148.phptnu[PK.h] [tests/writeconcern-getw-001.phptnu[PK.h] ?!ttests/decimal128-3-valid-173.phptnu[PK.h]>__tests/bug0631.phptnu[PK.h]w7k!mtests/decimal128-5-valid-004.phptnu[PK.h]JіF  !Etests/decimal128-3-valid-292.phptnu[PK.h]C! tests/symbol-decodeError-001.phptnu[PK.h]Ů-tests/manager-executeBulkWrite_error-005.phptnu[PK.h]+Ztests/bson-javascript-001.phptnu[PK.h])'tests/code-decodeError-006.phptnu[PK.h][ +btests/session-advanceOperationTime-003.phptnu[PK.h]K**!!tests/decimal128-3-valid-117.phptnu[PK.h]EG@33!%tests/decimal128-2-valid-108.phptnu[PK.h]7 //!(tests/decimal128-2-valid-034.phptnu[PK.h]ll  ,tests/bson-minkey-clone-001.phptnu[PK.h]ەhF-tests/oid-valid-002.phptnu[PK.h]q!A1tests/decimal128-1-valid-046.phptnu[PK.h]Y,--)5tests/bson-regex-set_state_error-001.phptnu[PK.h]"Y%%*':tests/session-getLogicalSessionId-001.phptnu[PK.h]F=tests/session-debug-004.phptnu[PK.h](˘'Atests/bson-javascript-getScope-001.phptnu[PK.h]l,Dtests/bson-dbpointer-get_properties-002.phptnu[PK.h]ް%!Gtests/bson-undefined-compare-001.phptnu[PK.h]y&Jtests/top-parseError-005.phptnu[PK.h]$%'`Ltests/session-startTransaction-001.phptnu[PK.h]ӏ*  Ntests/binary-valid-010.phptnu[PK.h]F__!@Rtests/decimal128-3-valid-010.phptnu[PK.h]z/##/Utests/commandStartedEvent-getServiceId-001.phptnu[PK.h]nsV;;!r\tests/decimal128-3-valid-176.phptnu[PK.h]bM_tests/session-001.phptnu[PK.h]pqctests/top-parseError-035.phptnu[PK.h]x5IIftests/cursorid-001.phptnu[PK.h]'itests/bson-int64-jsonserialize-002.phptnu[PK.h]8nn!ltests/decimal128-2-valid-060.phptnu[PK.h]ڕ'ptests/bson-regex-serialization-001.phptnu[PK.h]+>>'stests/manager-executeBulkWrite-013.phptnu[PK.h] &AAztests/cursor-session-001.phptnu[PK.h]/dPtests/bug0705-001.phptnu[PK.h]ttests/bug1045.phptnu[PK.h] &ɉtests/transaction-integration-002.phptnu[PK.h]HB&tests/decimal128-7-parseError-055.phptnu[PK.h]+#SS!tests/decimal128-5-valid-039.phptnu[PK.h]-&tests/decimal128-7-parseError-012.phptnu[PK.h]Ptests/cursor-getmore-001.phptnu[PK.h]  ! tests/decimal128-3-valid-183.phptnu[PK.h]Ga99.tests/bson-utcdatetime-get_properties-001.phptnu[PK.h]Ctests/standalone-auth-001.phptnu[PK.h]uY!tests/decimal128-2-valid-048.phptnu[PK.h]6O̪*Xtests/manager-executeWriteCommand-003.phptnu[PK.h]!Gtests/boolean-valid-002.phptnu[PK.h]֩ (,tests/readpreference-var_export-001.phptnu[PK.h]DYr(tests/server-executeReadCommand-003.phptnu[PK.h]2 ;;!#tests/decimal128-3-valid-178.phptnu[PK.h]IJ#tests/bson-toCanonicalJSON-001.phptnu[PK.h]4z)tests/manager-ctor-write_concern-006.phptnu[PK.h]o4==!tests/decimal128-1-valid-028.phptnu[PK.h]q)Ntests/bug1839-003.phptnu[PK.h]~  0Gtests/bulkwriteexception-getwriteresult-001.phptnu[PK.h]yLAA!tests/decimal128-3-valid-186.phptnu[PK.h]QK6 6 1Ftests/manager-ctor-read_preference-error-001.phptnu[PK.h]֛  -tests/server-executeReadWriteCommand-003.phptnu[PK.h]JRO!Ctests/decimal128-1-valid-050.phptnu[PK.h]OR!tests/causal-consistency-010.phptnu[PK.h]+5$tests/bson-javascript_error-003.phptnu[PK.h] jW55!tests/decimal128-5-valid-021.phptnu[PK.h]Z r=GG!=tests/decimal128-3-valid-127.phptnu[PK.h] gje] ] tests/typemap-005.phptnu[PK.h]Mxtests/bug0544.phptnu[PK.h]8b!etests/decimal128-3-valid-076.phptnu[PK.h]}q55!tests/decimal128-3-valid-165.phptnu[PK.h]uu  ). tests/writeresult-getwriteerrors-001.phptnu[PK.h]P-e"$tests/server-executeQuery-005.phptnu[PK.h] +tests/ini-debug-phpinfo-002.phptnu[PK.h]lx ,tests/retryable-writes-002.phptnu[PK.h] JJG8tests/bug0655.phptnu[PK.h]_Q  !<tests/decimal128-1-valid-053.phptnu[PK.h]b-Atests/top-parseError-011.phptnu[PK.h]k "WCtests/server-executeQuery-013.phptnu[PK.h]|&Gtests/decimal128-7-parseError-071.phptnu[PK.h]͖h! Jtests/decimal128-3-valid-069.phptnu[PK.h]z&ONtests/decimal128-7-parseError-033.phptnu[PK.h]!A<99!Ptests/decimal128-5-valid-052.phptnu[PK.h]#. JJ!Utests/decimal128-2-valid-078.phptnu[PK.h] g.FF(Xtests/bson-binary-serialization-002.phptnu[PK.h]%hpUatests/int32-valid-003.phptnu[PK.h]Setests/bson-decimal128-001.phptnu[PK.h]c׳i)i)ihtests/bson-toPHP-003.phptnu[PK.h]pCC,tests/manager-ctor-duplicate-option-002.phptnu[PK.h]5q  +tests/writeconcernerror-getmessage-001.phptnu[PK.h]Ǯ"tests/bson-decimal128-002.phptnu[PK.h]BB)tests/manager-selectserver_error-001.phptnu[PK.h]1$tests/dbpointer-decodeError-005.phptnu[PK.h]v+tests/double-valid-001.phptnu[PK.h]{@@ztests/retryable-reads-002.phptnu[PK.h]4U^KKtests/manager-debug-001.phptnu[PK.h]gX+tests/manager-ctor-read_preference-001.phptnu[PK.h]RW/tests/bulkwriteexception-haserrorlabel-002.phptnu[PK.h]Yfz55!ҹtests/decimal128-2-valid-093.phptnu[PK.h]oII!Xtests/decimal128-2-valid-127.phptnu[PK.h]&tests/decimal128-4-parseError-011.phptnu[PK.h]q i!'tests/decimal128-1-valid-016.phptnu[PK.h][{ww!tests/commandFailedEvent-002.phptnu[PK.h]ՠd   tests/standalone-plain-0002.phptnu[PK.h]xlG #tests/bug1274-005.phptnu[PK.h]zvv)9tests/manager-executeQuery_error-003.phptnu[PK.h]б(tests/manager-getreadpreference-001.phptnu[PK.h]%HjT1tests/commandexception-getresultdocument-001.phptnu[PK.h]ZN;&ptests/decimal128-7-parseError-016.phptnu[PK.h]%-tests/session-startTransaction_error-006.phptnu[PK.h]:^q& tests/decimal128-7-parseError-039.phptnu[PK.h];남..-Rtests/runtimeexception-haserrorlabel-001.phptnu[PK.h]@!33!tests/decimal128-2-valid-112.phptnu[PK.h]/atests/bson-utcdatetime-set_state_error-001.phptnu[PK.h]mJ__!tests/decimal128-3-valid-072.phptnu[PK.h]Mc[$tests/bson-maxkey-set_state-001.phptnu[PK.h]l3&tests/decimal128-7-parseError-047.phptnu[PK.h]wR!tests/symbol-decodeError-004.phptnu[PK.h]892,D tests/bson-javascript-jsonserialize-002.phptnu[PK.h]X&A tests/decimal128-7-parseError-061.phptnu[PK.h]I]2VVtests/bson-objectid-003.phptnu[PK.h]0)tests/bug0155.phptnu[PK.h]oԭBktests/bson-toPHP_error-003.phptnu[PK.h]?炤4tests/manager-ctor-disableClientPersistence-007.phptnu[PK.h]TT1 tests/bson-timestamp-serialization_error-006.phptnu[PK.h]jLpJJ"B'tests/server-executeQuery-003.phptnu[PK.h]t=)  *,tests/monitoring-removeSubscriber-001.phptnu[PK.h]'Yii,C2tests/transaction-integration_error-003.phptnu[PK.h] 19tests/manager-ctor-006.phptnu[PK.h]!P;tests/decimal128-1-valid-009.phptnu[PK.h])d  (Y>tests/session-commitTransaction-001.phptnu[PK.h]aV[[!Htests/decimal128-5-valid-035.phptnu[PK.h]@**!zMtests/decimal128-3-valid-114.phptnu[PK.h]C=Ptests/bug0924-001.phptnu[PK.h]Vtests/top-decodeError-015.phptnu[PK.h]v440Ytests/bug0572.phptnu[PK.h]L&]tests/decimal128-7-parseError-002.phptnu[PK.h]dd!_tests/decimal128-3-valid-303.phptnu[PK.h]:` ctests/bson-binary_error-004.phptnu[PK.h]rDooitests/bulkwrite-insert-001.phptnu[PK.h]-otests/bson-utcdatetime-serialization-004.phptnu[PK.h]zz!ttests/decimal128-2-valid-094.phptnu[PK.h] ==xtests/cursor-getmore-005.phptnu[PK.h][[!0tests/decimal128-3-valid-102.phptnu[PK.h]Gt܂tests/bug0732-001.phptnu[PK.h]t!Ȇtests/string-decodeError-006.phptnu[PK.h]t)tests/writeresult-getupsertedids-001.phptnu[PK.h]52tests/bson-javascript-serialization_error-003.phptnu[PK.h]U GG&etests/serverApi-bsonserialize-002.phptnu[PK.h]tests/top-parseError-015.phptnu[PK.h]}!2tests/decimal128-2-valid-020.phptnu[PK.h]/iY!tests/decimal128-3-valid-065.phptnu[PK.h]h@Htests/bug1152-001.phptnu[PK.h]ɀ(ltests/bson-minkey-serialization-002.phptnu[PK.h]+X!tests/decimal128-3-valid-084.phptnu[PK.h]ZS  !tests/decimal128-1-valid-020.phptnu[PK.h]Nkll etests/bson-maxkey-clone-001.phptnu[PK.h]y͝s s !tests/bson-decode-002.phptnu[PK.h]E//'tests/writeconcern-getwtimeout-002.phptnu[PK.h]Fg  !dtests/decimal128-3-valid-234.phptnu[PK.h] ;$tests/bson-javascript_error-002.phptnu[PK.h]Y ; ;%tests/manager-ctor-tls-error-001.phptnu[PK.h]_q& tests/decimal128-7-parseError-035.phptnu[PK.h]  tests/cursor-batchsize-001.phptnu[PK.h]X) tests/writeconcern-bsonserialize-003.phptnu[PK.h]z" tests/server-executeQuery-011.phptnu[PK.h]  $ tests/dbpointer-decodeError-001.phptnu[PK.h]ȍ-$ tests/manager-executeBulkWrite_error-007.phptnu[PK.h]7 $ tests/bson-regex-001.phptnu[PK.h]YxW=# ( tests/manager-executeQuery-005.phptnu[PK.h]JV!$/ tests/binary-decodeError-004.phptnu[PK.h]m[!c1 tests/decimal128-3-valid-032.phptnu[PK.h]Qqp5 tests/code-valid-006.phptnu[PK.h]pԈw(9 tests/bson-utcdatetimeinterface-001.phptnu[PK.h]//, ; tests/bson-javascript-jsonserialize-004.phptnu[PK.h]ſ> tests/symbol-valid-006.phptnu[PK.h]1rB tests/manager-ctor-ssl-003.phptnu[PK.h]sF tests/bulkwrite-update-002.phptnu[PK.h]"N tests/bson-binary-compare-002.phptnu[PK.h]s R tests/bson-toJSON_error-001.phptnu[PK.h]g&5V tests/decimal128-4-parseError-001.phptnu[PK.h]KX tests/bson-timestamp-004.phptnu[PK.h][V%[ tests/manager-ctor-serverApi-001.phptnu[PK.h]0MW W ` tests/bson-toPHP-001.phptnu[PK.h]*@@4;j tests/manager-ctor-disableClientPersistence-010.phptnu[PK.h] xff!r tests/decimal128-2-valid-064.phptnu[PK.h]L GG!v tests/decimal128-5-valid-020.phptnu[PK.h][ w11.z tests/symbol-valid-002.phptnu[PK.h]d(q++.} tests/manager-executeReadWriteCommand-001.phptnu[PK.h]aw/3 tests/int32-valid-004.phptnu[PK.h]ҕ![ tests/writeerror-getInfo-002.phptnu[PK.h]}.J tests/manager-ctor-read_concern-error-001.phptnu[PK.h]5PP!x tests/decimal128-3-valid-004.phptnu[PK.h]}A tests/cursor-tailable-002.phptnu[PK.h]ZU%) tests/manager-ctor-write_concern-003.phptnu[PK.h]@XX"N tests/server-executeQuery-006.phptnu[PK.h]UOO! tests/decimal128-5-valid-041.phptnu[PK.h]}X( tests/writeconcernerror-getinfo-001.phptnu[PK.h]:ghѰ tests/top-decodeError-014.phptnu[PK.h]&\^V& tests/decimal128-7-parseError-043.phptnu[PK.h]~|؜EE!F tests/decimal128-5-valid-008.phptnu[PK.h]yf`33!ܸ tests/decimal128-2-valid-102.phptnu[PK.h]gw ` tests/bulkwrite-update-001.phptnu[PK.h]w0/- tests/bson-decimal128-get_properties-001.phptnu[PK.h] tests/bson-toPHP-004.phptnu[PK.h]d::!Eh tests/decimal128-1-valid-032.phptnu[PK.h]? k>>%k tests/bulkwrite-update_error-004.phptnu[PK.h]77'cq tests/code_w_scope-decodeError-006.phptnu[PK.h]-A%s tests/bulkwrite-insert_error-001.phptnu[PK.h]ǻ"w tests/boolean-decodeError-001.phptnu[PK.h]P)~@!&y tests/decimal128-3-valid-012.phptnu[PK.h]>Q p} tests/query-ctor-004.phptnu[PK.h]6DT (( tests/top-decodeError-001.phptnu[PK.h]N;y tests/query-debug-001.phptnu[PK.h]]i`K tests/bson-regex_error-003.phptnu[PK.h]UV́'a tests/bson-int64-serialization-002.phptnu[PK.h]9 tests/bug0950-001.phptnu[PK.h] /E tests/manager-ctor-write_concern-error-001.phptnu[PK.h]k  ! tests/decimal128-3-valid-214.phptnu[PK.h],! tests/decimal128-3-valid-099.phptnu[PK.h]ֺe!8 tests/decimal128-3-valid-158.phptnu[PK.h]HKK. tests/bson-decimal128-set_state_error-001.phptnu[PK.h] %- tests/readpreference-getMode-001.phptnu[PK.h]&&# tests/bson-binaryinterface-001.phptnu[PK.h]w33! tests/decimal128-3-valid-162.phptnu[PK.h]RR! tests/decimal128-2-valid-074.phptnu[PK.h]ΤyA tests/top-parseError-044.phptnu[PK.h]fI tests/code-decodeError-001.phptnu[PK.h]UL&Ҿ tests/decimal128-7-parseError-006.phptnu[PK.h]sxx) tests/manager-executeReadCommand-003.phptnu[PK.h]/ s tests/dbref-valid-007.phptnu[PK.h] Ԣ11! tests/decimal128-2-valid-035.phptnu[PK.h]-Pv&: tests/decimal128-6-parseError-020.phptnu[PK.h]aa,G tests/bson-timestamp-get_properties-002.phptnu[PK.h]6ww!|_ tests/decimal128-3-valid-306.phptnu[PK.h]%'55!Dc tests/decimal128-3-valid-159.phptnu[PK.h]]]f tests/bson-timestamp-001.phptnu[PK.h]&m]  tj tests/datetime-valid-004.phptnu[PK.h]u*Dc c m tests/bug1274-003.phptnu[PK.h].II!w{ tests/decimal128-2-valid-129.phptnu[PK.h]! tests/decimal128-3-valid-090.phptnu[PK.h]pwVV!V tests/decimal128-4-valid-010.phptnu[PK.h]! tests/decimal128-1-valid-044.phptnu[PK.h]6_ tests/array-valid-004.phptnu[PK.h][_!7 tests/writeerror-getInfo-001.phptnu[PK.h]Է@!Q tests/decimal128-3-valid-096.phptnu[PK.h]<**! tests/decimal128-3-valid-053.phptnu[PK.h]L7  tests/bug1050-002.phptnu[PK.h]`&zz tests/cursor-001.phptnu[PK.h]:::!ڰ tests/decimal128-1-valid-027.phptnu[PK.h]E %e tests/bulkwrite-update_error-001.phptnu[PK.h]S`` tests/timestamp-valid-003.phptnu[PK.h]g|A tests/bson-toJSON-001.phptnu[PK.h]+W !N tests/causal-consistency-005.phptnu[PK.h] tests/bug0146-002.phptnu[PK.h]1o22!$ tests/causal-consistency-008.phptnu[PK.h] 拉, tests/server-executeBulkWrite_error-002.phptnu[PK.h]m! tests/decimal128-3-valid-259.phptnu[PK.h]y>>! tests/decimal128-2-valid-007.phptnu[PK.h]_! tests/decimal128-2-valid-051.phptnu[PK.h]$ !` tests/decimal128-3-valid-196.phptnu[PK.h]M+! tests/decimal128-1-valid-011.phptnu[PK.h] tests/command-ctor-001.phptnu[PK.h] tests/binary-valid-006.phptnu[PK.h]oG%%* tests/bson-objectid-jsonserialize-001.phptnu[PK.h]G~ tests/top-parseError-042.phptnu[PK.h]*w tests/bug1839-005.phptnu[PK.h]A%5 tests/bulkwrite-delete_error-001.phptnu[PK.h]kf! tests/decimal128-3-valid-160.phptnu[PK.h]|! tests/decimal128-1-valid-043.phptnu[PK.h]X'! tests/top-parseError-013.phptnu[PK.h]IB B 3U# tests/server-executeReadWriteCommand_error-001.phptnu[PK.h]j<- tests/int64-valid-002.phptnu[PK.h]٠) 3 tests/server-executeWriteCommand-003.phptnu[PK.h]#dd)F8 tests/bson-binary-get_properties-002.phptnu[PK.h]< : tests/retryable-writes-001.phptnu[PK.h]Z-C tests/session-startTransaction_error-007.phptnu[PK.h]'Y  UG tests/bug0545.phptnu[PK.h]Bp!S tests/symbol-decodeError-007.phptnu[PK.h]a>((U tests/timestamp-valid-001.phptnu[PK.h]2s**';Y tests/code_w_scope-decodeError-009.phptnu[PK.h]Zg>\\.[ tests/manager-executeReadWriteCommand-002.phptnu[PK.h]mҨHHvc tests/dbref-valid-006.phptnu[PK.h]Li tests/top-parseError-032.phptnu[PK.h]"l2&hk tests/decimal128-6-parseError-027.phptnu[PK.h]Pl--!Xm tests/decimal128-3-valid-181.phptnu[PK.h].>"ss'p tests/bson-regex-jsonserialize-004.phptnu[PK.h]9gII!s tests/decimal128-2-valid-128.phptnu[PK.h]Oc!! :w tests/cursorid-tostring-001.phptnu[PK.h]& x tests/int64-decodeError-001.phptnu[PK.h]rd88'z tests/code_w_scope-decodeError-008.phptnu[PK.h]ϔa} tests/datetime-valid-003.phptnu[PK.h]&R_..-V tests/commandexception-haserrorlabel-001.phptnu[PK.h] tests/bson-objectid-002.phptnu[PK.h]yN tests/bson-int64-001.phptnu[PK.h]t! tests/decimal128-3-valid-016.phptnu[PK.h]ZZ!> tests/decimal128-4-valid-008.phptnu[PK.h]\@bb& tests/server-executeBulkWrite-002.phptnu[PK.h]j#! tests/decimal128-2-valid-021.phptnu[PK.h]&%q tests/session-getClusterTime-001.phptnu[PK.h]! tests/decimal128-3-valid-089.phptnu[PK.h]w tests/regex-valid-008.phptnu[PK.h]N? VV tests/code-valid-005.phptnu[PK.h].׈vv$ tests/bson-decimal128_error-001.phptnu[PK.h]  '^ tests/monitoring-addSubscriber-002.phptnu[PK.h]ZuKK!շ tests/decimal128-5-valid-018.phptnu[PK.h]s&q tests/decimal128-7-parseError-057.phptnu[PK.h]! tests/bson-toRelaxedJSON-001.phptnu[PK.h]  ! tests/decimal128-3-valid-224.phptnu[PK.h]<e) tests/manager-executeReadCommand-002.phptnu[PK.h]u4(( tests/bug1151-003.phptnu[PK.h]k#QQQ tests/manager-ctor-003.phptnu[PK.h]".??! tests/decimal128-3-valid-203.phptnu[PK.h]bvv%} tests/manager-executeCommand-002.phptnu[PK.h]J!yy!H tests/decimal128-1-valid-023.phptnu[PK.h]y۵' tests/bson-timestamp-set_state-002.phptnu[PK.h]JII! tests/decimal128-2-valid-140.phptnu[PK.h]R_TT! tests/decimal128-3-valid-262.phptnu[PK.h]kn!] tests/decimal128-3-valid-147.phptnu[PK.h]9 & tests/decimal128-4-parseError-010.phptnu[PK.h]") tests/writeresult-isacknowledged-003.phptnu[PK.h]̼r+J tests/bson-dbpointer-serialization-001.phptnu[PK.h]IIHH!( tests/decimal128-1-valid-007.phptnu[PK.h]܃F  tests/binary-parseError-003.phptnu[PK.h]f! tests/decimal128-3-valid-294.phptnu[PK.h]^j.E tests/readconcern-serialization_error-001.phptnu[PK.h]>q tests/binary-valid-002.phptnu[PK.h] ! tests/decimal128-3-valid-283.phptnu[PK.h]t#) tests/readconcern-getlevel-001.phptnu[PK.h]L/ tests/top-parseError-014.phptnu[PK.h]TQ tests/binary-valid-007.phptnu[PK.h]Ct!8 tests/decimal128-1-valid-005.phptnu[PK.h]/"G2*/ tests/ini-mock_service_id-phpinfo-002.phptnu[PK.h]C!h tests/string-decodeError-007.phptnu[PK.h] tests/maxkey-valid-001.phptnu[PK.h];&} tests/decimal128-7-parseError-021.phptnu[PK.h]Zd! tests/bug1419-001.phptnu[PK.h] && tests/writeconcern-ctor_error-002.phptnu[PK.h]Q**!+ tests/decimal128-2-valid-031.phptnu[PK.h]!-j.}. tests/bson-binary-serialization_error-006.phptnu[PK.h]n8!4 tests/decimal128-5-valid-030.phptnu[PK.h]֘fhh079 tests/bson-objectid-serialization_error-003.phptnu[PK.h]) (; tests/readconcern-serialization-002.phptnu[PK.h]99D tests/bug0274.phptnu[PK.h]qaJ tests/manager-ctor-ssl-002.phptnu[PK.h]  !^L tests/decimal128-3-valid-141.phptnu[PK.h]bl((1P tests/session-advanceOperationTime_error-001.phptnu[PK.h]#V&CY tests/decimal128-4-parseError-015.phptnu[PK.h]![ tests/decimal128-1-valid-048.phptnu[PK.h]Q!)!_ tests/decimal128-3-valid-192.phptnu[PK.h].6d tests/bson-binary-serialization_error-001.phptnu[PK.h]Q$)4i tests/manager-ctor-write_concern-002.phptnu[PK.h]S`;)'p tests/manager-executeBulkWrite-006.phptnu[PK.h]EsS*x tests/bson-objectid-serialization-001.phptnu[PK.h]Z<&{ tests/decimal128-7-parseError-074.phptnu[PK.h]vfn} tests/cursor-getmore-008.phptnu[PK.h]HҢ% tests/manager-executeCommand-006.phptnu[PK.h]d#: tests/document-decodeError-004.phptnu[PK.h]gmm tests/code-valid-004.phptnu[PK.h]Ⱦtj!G tests/decimal128-3-valid-263.phptnu[PK.h]( =II! tests/decimal128-2-valid-135.phptnu[PK.h]fzG tests/bug1839-002.phptnu[PK.h]2"? tests/bson-objectid_error-003.phptnu[PK.h]ʃNCC!8 tests/decimal128-5-valid-047.phptnu[PK.h] ;ZZ ̡ tests/readconcern-debug-001.phptnu[PK.h]`Z'HH$v tests/bson-decimal128-clone-001.phptnu[PK.h]_[[ tests/cursor-iterator-003.phptnu[PK.h]h**! tests/decimal128-3-valid-041.phptnu[PK.h]s#6 tests/bson-maxkeyinterface-001.phptnu[PK.h] i& tests/decimal128-7-parseError-062.phptnu[PK.h] Ó'˳ tests/bson-javascript-tostring-001.phptnu[PK.h]▯& tests/decimal128-7-parseError-007.phptnu[PK.h]!t  !̷ tests/decimal128-3-valid-252.phptnu[PK.h]C&' tests/decimal128-6-parseError-018.phptnu[PK.h]e{3 tests/commandexception-haserrorlabel_error-001.phptnu[PK.h] tests/top-parseError-031.phptnu[PK.h]ٍFH 4 tests/manager-executeReadWriteCommand_error-001.phptnu[PK.h]Ł! tests/decimal128-5-valid-031.phptnu[PK.h]T3;;! tests/decimal128-2-valid-041.phptnu[PK.h]^t  ! tests/decimal128-3-valid-285.phptnu[PK.h]h tests/oid-decodeError-001.phptnu[PK.h]/D' tests/cursor-iterator_handlers-001.phptnu[PK.h]&&!t tests/decimal128-1-valid-015.phptnu[PK.h](%R~~) tests/writeresult-isacknowledged-002.phptnu[PK.h]=隥' tests/bson-int64-jsonserialize-001.phptnu[PK.h]u tests/command_error-001.phptnu[PK.h]@  tests/bson-toJSON_error-003.phptnu[PK.h]v tests/server-constants.phptnu[PK.h]+% tests/bson-utcdatetime_error-002.phptnu[PK.h]{""&N tests/decimal128-4-parseError-016.phptnu[PK.h]s>>! tests/decimal128-2-valid-144.phptnu[PK.h]{||#tests/session-debug-006.phptnu[PK.h]|0̬)tests/bson-utcdatetime-set_state-002.phptnu[PK.h]B! tests/decimal128-5-valid-028.phptnu[PK.h]8T=Qtests/manager-ctor-005.phptnu[PK.h] #tests/bson-undefined-clone-001.phptnu[PK.h]ۉ$wwtests/bug0923-001.phptnu[PK.h]!x5(ktests/readpreference-ctor_error-005.phptnu[PK.h]$.t"t"*etests/multi-type-deprecated-valid-001.phptnu[PK.h]4%!<<+3:tests/bson-timestamp-jsonserialize-001.phptnu[PK.h]CY  !;tests/decimal128-1-valid-017.phptnu[PK.h]8??;?tests/query-ctor_error-004.phptnu[PK.h]KK!Gtests/decimal128-5-valid-043.phptnu[PK.h]ӸN!eLtests/string-decodeError-003.phptnu[PK.h] 077+Ntests/bson-timestamp-serialization-002.phptnu[PK.h]n,||!0Ttests/decimal128-2-valid-053.phptnu[PK.h]F##!Wtests/decimal128-3-valid-112.phptnu[PK.h] )q\tests/writeconcern-bsonserialize-001.phptnu[PK.h]atests/bulkwrite-debug-002.phptnu[PK.h]HxFLftests/session-debug-005.phptnu[PK.h]x6oomtests/double-valid-006.phptnu[PK.h]Ѡ\\!rtests/decimal128-3-valid-130.phptnu[PK.h]Aj !Xvtests/causal-consistency-003.phptnu[PK.h]Z4ctests/manager-ctor-disableClientPersistence-002.phptnu[PK.h](R(;;$tests/server-executeCommand-002.phptnu[PK.h]šbb!@tests/decimal128-2-valid-150.phptnu[PK.h]}Z!tests/decimal128-3-valid-161.phptnu[PK.h]Yp%%!Atests/decimal128-5-valid-062.phptnu[PK.h]:Z!tests/writeconcern-debug-002.phptnu[PK.h]_O 33!tests/decimal128-2-valid-105.phptnu[PK.h]VL??!tests/decimal128-3-valid-205.phptnu[PK.h]?99!tests/decimal128-2-valid-091.phptnu[PK.h]r|/?$2tests/writeerror-getMessage-001.phptnu[PK.h]A !ptests/bson-fromPHP_error-004.phptnu[PK.h]&&Q>qq2Ltests/bson-javascript-serialization_error-004.phptnu[PK.h]33!tests/decimal128-2-valid-117.phptnu[PK.h]n{{-tests/manager-executeBulkWrite_error-002.phptnu[PK.h]\P33{tests/query-ctor_error-006.phptnu[PK.h]yu5tests/query-errors.phptnu[PK.h]"xbxx!!tests/decimal128-2-valid-055.phptnu[PK.h]!XX!tests/decimal128-2-valid-071.phptnu[PK.h]q. . tests/retryable-writes-003.phptnu[PK.h]n+tests/writeresult-getupsertedcount-001.phptnu[PK.h]}*Ptests/bson-binary-set_state_error-002.phptnu[PK.h]w  !tests/decimal128-3-valid-284.phptnu[PK.h]" !tests/decimal128-3-valid-154.phptnu[PK.h]Q(Ltests/writeconcernerror-getinfo-003.phptnu[PK.h]JDDEtests/cursor-tailable-001.phptnu[PK.h]e]%tests/bson-utcdatetime_error-001.phptnu[PK.h]rQ!tests/decimal128-3-valid-037.phptnu[PK.h]"\:.M tests/bson-symbol-serialization_error-004.phptnu[PK.h]:00-tests/bson-decimal128-003.phptnu[PK.h]v;-tests/manager-executeBulkWrite_error-011.phptnu[PK.h]B0!tests/decimal128-3-valid-059.phptnu[PK.h]zz+tests/bson-timestamp-jsonserialize-002.phptnu[PK.h]%z! tests/decimal128-3-valid-031.phptnu[PK.h]u_%tests/top-decodeError-010.phptnu[PK.h]  b'tests/bson-toPHP_error-004.phptnu[PK.h]+ْ!/tests/decimal128-3-valid-295.phptnu[PK.h]O%1 4tests/bson-timestamp-serialization_error-002.phptnu[PK.h]&e:tests/bson-timestampinterface-001.phptnu[PK.h]v !;tests/decimal128-3-valid-266.phptnu[PK.h]LQQ!(@tests/decimal128-5-valid-040.phptnu[PK.h], *Dtests/session-getTransactionState-001.phptnu[PK.h]a--Ntests/document-valid-004.phptnu[PK.h]ԛ&#Rtests/decimal128-6-parseError-026.phptnu[PK.h]~o!Ttests/decimal128-3-valid-156.phptnu[PK.h]p22!aXtests/decimal128-3-valid-018.phptnu[PK.h]^bb#[tests/manager-executeQuery-001.phptnu[PK.h]22ctests/query-sort-003.phptnu[PK.h]:qltests/server-construct-001.phptnu[PK.h]eO{{!tests/decimal128-5-valid-024.phptnu[PK.h];xkk4ftests/manager-ctor-disableClientPersistence-001.phptnu[PK.h])cc!5tests/decimal128-3-valid-005.phptnu[PK.h]d! tests/writeresult-debug-001.phptnu[PK.h]ӻ_  !tests/decimal128-3-valid-222.phptnu[PK.h]?tests/top-parseError-024.phptnu[PK.h]J6Ldd!Etests/decimal128-2-valid-004.phptnu[PK.h]0UUtests/readconcern-002.phptnu[PK.h]tests/code-decodeError-007.phptnu[PK.h]ytests/top-parseError-026.phptnu[PK.h]xmtests/session-constants.phptnu[PK.h]'H!Atests/decimal128-5-valid-034.phptnu[PK.h]k/tests/commandStartedEvent-getServiceId-002.phptnu[PK.h]֚MMtests/query-ctor-006.phptnu[PK.h]bϜww!^tests/causal-consistency-007.phptnu[PK.h]ܳ1&tests/manager-ctor-auto_encryption-error-002.phptnu[PK.h]be:00!Htests/decimal128-2-valid-029.phptnu[PK.h]88!tests/decimal128-2-valid-023.phptnu[PK.h]q"u  Rtests/bug1266.phptnu[PK.h]e#tests/bson-undefined_error-001.phptnu[PK.h]5BB&tests/server-executeBulkWrite-004.phptnu[PK.h]-;;!tests/decimal128-2-valid-024.phptnu[PK.h];Ζ55!tests/decimal128-2-valid-138.phptnu[PK.h]+q͢#tests/serverApi-var_export-001.phptnu[PK.h]m2__!tests/decimal128-3-valid-242.phptnu[PK.h]'GG!>tests/decimal128-5-valid-045.phptnu[PK.h]!tests/decimal128-3-valid-143.phptnu[PK.h];!)tests/decimal128-3-valid-150.phptnu[PK.h] ^$$%| tests/bulkwrite-update_error-002.phptnu[PK.h]@R:tests/array-valid-003.phptnu[PK.h]qjD&tests/decimal128-4-parseError-008.phptnu[PK.h]yOL &tests/transaction-integration-001.phptnu[PK.h]c 1!tests/manager-ctor-read_preference-error-002.phptnu[PK.h]4#/tests/manager-selectServer-001.phptnu[PK.h]Z``27tests/bson-decimal128-serialization_error-004.phptnu[PK.h]Gvv!:tests/decimal128-2-valid-056.phptnu[PK.h]V55!b>tests/decimal128-2-valid-124.phptnu[PK.h](f+Atests/bson-int64-clone-001.phptnu[PK.h]5!Dtests/decimal128-3-valid-293.phptnu[PK.h]$**Itests/bson-fromPHP-005.phptnu[PK.h]IAu$|Ktests/commandSucceededEvent-002.phptnu[PK.h]PT*pQtests/code-valid-002.phptnu[PK.h].L22Ttests/findAndModify-001.phptnu[PK.h]"|&\tests/decimal128-7-parseError-050.phptnu[PK.h]Ҽnn'X^tests/bson-regex-jsonserialize-003.phptnu[PK.h]za)&atests/decimal128-7-parseError-058.phptnu[PK.h]ӷ%]%`ctests/bulkwrite-update_error-003.phptnu[PK.h]~1!ktests/decimal128-3-valid-282.phptnu[PK.h] otests/regex-decodeError-002.phptnu[PK.h]h*!rtests/decimal128-3-valid-267.phptnu[PK.h]#ovtests/readpreference-constants.phptnu[PK.h]*GDu(ztests/commandStartedEvent-debug-001.phptnu[PK.h]W&tests/decimal128-6-parseError-024.phptnu[PK.h]+;(ҁtests/bson-maxkey-serialization-002.phptnu[PK.h]]Z,tests/bson-objectid-set_state_error-001.phptnu[PK.h]i:tests/bug1151-004.phptnu[PK.h]95.tests/bson-binary-serialization_error-005.phptnu[PK.h] DJJ,tests/bson-javascript-jsonserialize-001.phptnu[PK.h]"!tests/decimal128-4-valid-005.phptnu[PK.h]4KBB.-tests/bson-binary-serialization_error-002.phptnu[PK.h]s2>-tests/bson-utcdatetime-serialization-001.phptnu[PK.h]  Etests/array-valid-002.phptnu[PK.h]&tests/decimal128-7-parseError-063.phptnu[PK.h]D?))#tests/bson-timestamp-clone-001.phptnu[PK.h]Q`ō-Z tests/bson-int64-serialization_error-002.phptnu[PK.h]A(422! tests/decimal128-1-valid-024.phptnu[PK.h]e!Ytests/decimal128-3-valid-194.phptnu[PK.h]=!tests/decimal128-3-valid-050.phptnu[PK.h],M  %tests/bulkwrite-delete_error-002.phptnu[PK.h] I!Rtests/bson-toRelaxedJSON-002.phptnu[PK.h]m4>!tests/manager-ctor-disableClientPersistence-009.phptnu[PK.h]!L L -5)tests/server-executeReadWriteCommand-002.phptnu[PK.h]礸f  2tests/writeerror_error-001.phptnu[PK.h]# 64tests/bson-binary_error-001.phptnu[PK.h]i0S9tests/server-002.phptnu[PK.h],e44#?tests/bson-regex-set_state-001.phptnu[PK.h]"N%%+Atests/bson-dbpointer-jsonserialize-003.phptnu[PK.h]q҃#Dtests/manager-executeQuery-007.phptnu[PK.h]U!Htests/decimal128-3-valid-043.phptnu[PK.h]r 4bb-Ltests/manager-executeBulkWrite_error-008.phptnu[PK.h]\'!Otests/manager-getservers-002.phptnu[PK.h]2Zk.Utests/bson-javascript-set_state_error-002.phptnu[PK.h]!-Xtests/decimal128-3-valid-268.phptnu[PK.h]t'&\tests/decimal128-7-parseError-031.phptnu[PK.h]FV0*^tests/writeresult-getdeletedcount-002.phptnu[PK.h]˿`&"btests/decimal128-6-parseError-031.phptnu[PK.h] $&dtests/decimal128-7-parseError-040.phptnu[PK.h] N  ]ftests/double-valid-008.phptnu[PK.h]zT$jtests/retryable-reads_error-001.phptnu[PK.h]\p __"qtests/server-executeQuery-010.phptnu[PK.h]c!N--&xtests/server-executeBulkWrite-005.phptnu[PK.h]55'*~tests/clientEncryption-encrypt-001.phptnu[PK.h] !tests/manager-ctor_error-004.phptnu[PK.h] 1ff$ӆtests/writeresult-getserver-001.phptnu[PK.h]22tests/manager-ctor-ssl-001.phptnu[PK.h]tyy!tests/decimal128-3-valid-134.phptnu[PK.h]cH#55!ؐtests/decimal128-3-valid-120.phptnu[PK.h]QQ%^tests/manager-executeCommand-004.phptnu[PK.h]fƯ)tests/standalone-ssl-verify_cert-001.phptnu[PK.h]i|Atests/cursorid-debug-002.phptnu[PK.h]8xu>>+wtests/bson-timestamp-serialization-003.phptnu[PK.h]`utests/bulkwrite-update-004.phptnu[PK.h]ee!Ptests/decimal128-3-valid-212.phptnu[PK.h]gwtests/bug0974-001.phptnu[PK.h]55!tests/decimal128-1-valid-013.phptnu[PK.h]eqZ" tests/bson-symbol-compare-001.phptnu[PK.h]m!tests/decimal128-3-valid-108.phptnu[PK.h]ss/tests/bson-toPHP-009.phptnu[PK.h]ʿ//-tests/bson-utcdatetime-serialization-003.phptnu[PK.h]dD!wtests/code_w_scope-valid-004.phptnu[PK.h]Atests/datetime-valid-002.phptnu[PK.h]aDtt!qtests/decimal128-5-valid-003.phptnu[PK.h]",6tests/bson-decimal128-serialization-001.phptnu[PK.h]Q~'Ttests/readpreference-set_state-001.phptnu[PK.h]%}!+tests/decimal128-1-valid-012.phptnu[PK.h]a"'tests/manager-executeBulkWrite-014.phptnu[PK.h]W4UU!Stests/decimal128-5-valid-038.phptnu[PK.h]>G,,&tests/writeconcernerror_error-001.phptnu[PK.h]$F܋){tests/manager-ctor-write_concern-001.phptnu[PK.h]N㈔,_tests/bson-decimal128-serialization-002.phptnu[PK.h]qj!`tests/decimal128-3-valid-093.phptnu[PK.h]X6. tests/bson-binary-serialization_error-004.phptnu[PK.h]l(qq)tests/bson-symbol-get_properties-002.phptnu[PK.h]!tests/bson-fromPHP_error-005.phptnu[PK.h]I8tests/server_error-001.phptnu[PK.h]'[Lxtests/bug0667.phptnu[PK.h]"NN!utests/decimal128-3-valid-246.phptnu[PK.h]d**! tests/decimal128-3-valid-118.phptnu[PK.h]QG#tests/cursor_error-001.phptnu[PK.h]cE$tests/server-getTags-001.phptnu[PK.h]̕ehh!'tests/decimal128-1-valid-022.phptnu[PK.h]p::!*tests/decimal128-2-valid-012.phptnu[PK.h]S.].tests/manager-executeReadWriteCommand-003.phptnu[PK.h]֌@@x4tests/cursor-destruct-001.phptnu[PK.h]pǵ&;tests/decimal128-7-parseError-038.phptnu[PK.h]-Rbb!K=tests/decimal128-2-valid-151.phptnu[PK.h]! I!@tests/decimal128-5-valid-066.phptnu[PK.h]x\lEtests/bug0671-001.phptnu[PK.h]w4vv!?Htests/bson-fromPHP_error-008.phptnu[PK.h]!Ntests/decimal128-3-valid-167.phptnu[PK.h] ZRtests/query-ctor_error-002.phptnu[PK.h]Y![tests/decimal128-3-valid-281.phptnu[PK.h]9@++!_tests/decimal128-3-valid-028.phptnu[PK.h]QT*!xdtests/decimal128-3-valid-124.phptnu[PK.h]{^3htests/bson-utcdatetime-serialization_error-002.phptnu[PK.h]vķ^""ktests/symbol-valid-001.phptnu[PK.h]p!Motests/double-decodeError-001.phptnu[PK.h])]]0qqtests/manager-executeWriteCommand_error-003.phptnu[PK.h]7!.utests/decimal128-3-valid-082.phptnu[PK.h]w)II1uytests/bson-timestamp-serialization_error-007.phptnu[PK.h]3dt'~tests/code_w_scope-decodeError-003.phptnu[PK.h]_~&tests/decimal128-7-parseError-028.phptnu[PK.h]u`ϧ!ǂtests/decimal128-4-valid-011.phptnu[PK.h]5!.tests/decimal128-5-valid-027.phptnu[PK.h]N%tests/retryable-writes_error-001.phptnu[PK.h]dk( tests/writeresult-debug-002.phptnu[PK.h]<@)~tests/bson-objectid-getTimestamp-002.phptnu[PK.h]ej&&%tests/bulkwrite-update_error-008.phptnu[PK.h];=N'^^!!tests/decimal128-5-valid-014.phptnu[PK.h]0w Цtests/standalone-plain-0001.phptnu[PK.h]!!<tests/decimal128-1-valid-037.phptnu[PK.h]S@  !tests/decimal128-3-valid-291.phptnu[PK.h]m%%'tests/clientEncryption-decrypt-001.phptnu[PK.h]@__!wtests/decimal128-3-valid-241.phptnu[PK.h]pjj!'tests/decimal128-2-valid-062.phptnu[PK.h]=$tests/manager-addSubscriber-006.phptnu[PK.h]G&tests/serverApi-serialization-001.phptnu[PK.h] qqtests/timestamp-valid-004.phptnu[PK.h]tests/code-decodeError-004.phptnu[PK.h]BB&tests/bson-utcdatetime-002.phptnu[PK.h]&ani i "tests/commandStartedEvent-001.phptnu[PK.h]-K~,&rtests/decimal128-4-parseError-017.phptnu[PK.h]^{`!tests/decimal128-3-valid-057.phptnu[PK.h]Wtests/bson-encode-004.phptnu[PK.h]FXtests/bug0430-003.phptnu[PK.h],ک] 7tests/writeconcern-ctor-002.phptnu[PK.h] 5$YY1tests/commandSucceededEvent-getServiceId-002.phptnu[PK.h]tests/bug0671-002.phptnu[PK.h]"nG00tests/bug0851-001.phptnu[PK.h]B][[$ tests/writeerror-debug-001.phptnu[PK.h]H eF&tests/decimal128-7-parseError-056.phptnu[PK.h].!tests/decimal128-3-valid-068.phptnu[PK.h]433_tests/bson-utcdatetime-001.phptnu[PK.h]K!tests/decimal128-3-valid-300.phptnu[PK.h]2b:tests/bug0341.phptnu[PK.h]p#~$"tests/bson-javascript-clone-001.phptnu[PK.h]uu/%tests/standalone-x509-extract_username-002.phptnu[PK.h]9Xdd&+tests/writeconcern-ctor_error-001.phptnu[PK.h]ָ$H.tests/server-executeCommand-005.phptnu[PK.h]n$)) T4tests/bson-symbol-clone-001.phptnu[PK.h]vtS666tests/bug0623.phptnu[PK.h]h)))E=tests/manager-executeQuery_error-001.phptnu[PK.h] AA#Atests/manager-ctor-appname-001.phptnu[PK.h][Dtests/bson-fromPHP-002.phptnu[PK.h]q] oFtests/binary-parseError-004.phptnu[PK.h]HHHtests/bson-toJSON-002.phptnu[PK.h]99!1Ntests/decimal128-2-valid-084.phptnu[PK.h]Y /Qtests/manager-ctor-write_concern-error-005.phptnu[PK.h]uu]tests/serverApi-debug.phptnu[PK.h]P -atests/manager-executeBulkWrite_error-001.phptnu[PK.h]TQMM!gtests/decimal128-5-valid-042.phptnu[PK.h]JJltests/cursor-isDead-002.phptnu[PK.h]gUN,ptests/timestamp-valid-002.phptnu[PK.h]x!Wcc!}ttests/decimal128-3-valid-006.phptnu[PK.h]z11xtests/bson-timestamp-serialization_error-005.phptnu[PK.h]YԒ&etests/decimal128-6-parseError-021.phptnu[PK.h]NO/::!btests/decimal128-2-valid-122.phptnu[PK.h]GG!tests/decimal128-3-valid-062.phptnu[PK.h]2&3tests/decimal128-7-parseError-077.phptnu[PK.h]P !{tests/decimal128-3-valid-249.phptnu[PK.h].?n00!͏tests/decimal128-1-valid-001.phptnu[PK.h]ء!Ntests/decimal128-3-valid-168.phptnu[PK.h]Iʆ2tests/manager-ctor-directconnection-error-002.phptnu[PK.h]itests/top-parseError-037.phptnu[PK.h]) tests/array-decodeError-002.phptnu[PK.h]3Ҟ&tests/decimal128-6-parseError-011.phptnu[PK.h] C!١tests/decimal128-3-valid-098.phptnu[PK.h]jKtests/bson-regex-003.phptnu[PK.h]!(tests/bson-symbol-serialization-002.phptnu[PK.h]3*ff!,tests/manager-ctor_error-005.phptnu[PK.h]744!tests/decimal128-5-valid-019.phptnu[PK.h]>/$htests/manager-addSubscriber-004.phptnu[PK.h]8tests/cursor-getmore-006.phptnu[PK.h]Ftests/top-parseError-043.phptnu[PK.h] T( tests/bson-javascript-set_state-001.phptnu[PK.h]>c)tests/regex-valid-006.phptnu[PK.h]Ȫd6!tests/decimal128-3-valid-217.phptnu[PK.h]m2ttests/bson-decimal128-serialization_error-002.phptnu[PK.h]Iot``!tests/decimal128-1-valid-039.phptnu[PK.h]z8v++!wtests/decimal128-3-valid-036.phptnu[PK.h]O<2tests/top-parseError-023.phptnu[PK.h]!tests/decimal128-1-valid-010.phptnu[PK.h]oUy&tests/decimal128-7-parseError-030.phptnu[PK.h]mT\ \ #Xtests/readpreference-debug-001.phptnu[PK.h]4ZB)tests/manager-ctor-write_concern-005.phptnu[PK.h]BpFF!tests/decimal128-2-valid-080.phptnu[PK.h]Htests/top-parseError-001.phptnu[PK.h]4բ!tests/decimal128-3-valid-078.phptnu[PK.h]`R͈!tests/decimal128-2-valid-022.phptnu[PK.h]fcc(tests/bson-binary-serialization-001.phptnu[PK.h]yyo! tests/decimal128-3-valid-269.phptnu[PK.h]#`1XXtests/bug1839-001.phptnu[PK.h]a33!tests/decimal128-2-valid-119.phptnu[PK.h]!3!(tests/decimal128-3-valid-086.phptnu[PK.h]+g g mtests/bug1529-001.phptnu[PK.h]35+tests/bug0672.phptnu[PK.h]1gp6 6 $.tests/writeresult-getserver-002.phptnu[PK.h]e&7tests/decimal128-7-parseError-079.phptnu[PK.h]aRTT9tests/bug1839-004.phptnu[PK.h]c\\=tests/typemap-007.phptnu[PK.h]hJ&"Stests/decimal128-6-parseError-022.phptnu[PK.h]^  $Utests/commandSucceededEvent-001.phptnu[PK.h]\KKl_tests/exception-001.phptnu[PK.h]69PP*`tests/ini-mock_service_id-ini_get-002.phptnu[PK.h]K|H[[-btests/bson-utcdatetime-jsonserialize-001.phptnu[PK.h]1#adtests/bson-minkeyinterface-001.phptnu[PK.h]AP P !etests/bson-fromPHP_error-007.phptnu[PK.h]QAc!Qrtests/decimal128-3-valid-066.phptnu[PK.h]!. . vtests/write-0001.phptnu[PK.h]p tests/bug0146-001.phptnu[PK.h]k#֒tests/manager-invalidnamespace.phptnu[PK.h].k`@/tests/server-executeWriteCommand_error-001.phptnu[PK.h](C$ɞtests/server-executeCommand-010.phptnu[PK.h]J!tests/decimal128-2-valid-018.phptnu[PK.h]-بtests/session-startTransaction_error-005.phptnu[PK.h]E  +tests/writeresult-getmodifiedcount-002.phptnu[PK.h]޽'#Ktests/bson-dbpointer-clone-001.phptnu[PK.h]!Ǻ\tests/string-valid-001.phptnu[PK.h]gY!Xtests/decimal128-3-valid-014.phptnu[PK.h]55!tests/decimal128-5-valid-054.phptnu[PK.h]'ڃv22'tests/int64-valid-005.phptnu[PK.h]n-ll!tests/decimal128-2-valid-061.phptnu[PK.h]e$$!`tests/decimal128-2-valid-033.phptnu[PK.h]%0(tests/serverApi-set_state_error-001.phptnu[PK.h]N̺,tests/bson-javascript-jsonserialize-003.phptnu[PK.h]6EE+tests/bson-undefined-jsonserialize-001.phptnu[PK.h]:'',ytests/transaction-integration_error-002.phptnu[PK.h]NVtests/typemap-003.phptnu[PK.h]f__!3tests/decimal128-3-valid-208.phptnu[PK.h]H))!tests/decimal128-5-valid-060.phptnu[PK.h])-dd/]tests/bson-utcdatetime-set_state_error-002.phptnu[PK.h]}& tests/writeconcernerror-debug-002.phptnu[PK.h]K !?tests/decimal128-3-valid-017.phptnu[PK.h]N (tests/readpreference-ctor_error-007.phptnu[PK.h]pu4tests/top-parseError-020.phptnu[PK.h] ܽ0tests/symbol-valid-004.phptnu[PK.h]EٳS #@tests/manager-selectserver-001.phptnu[PK.h]nn2 tests/bson-decimal128-serialization_error-003.phptnu[PK.h]drXX!otests/manager-ctor_error-001.phptnu[PK.h]1``!tests/decimal128-3-valid-301.phptnu[PK.h]D"!tests/decimal128-3-valid-122.phptnu[PK.h]LK+tests/writeresult-getmodifiedcount-001.phptnu[PK.h]<00!Ttests/decimal128-3-valid-020.phptnu[PK.h]n&tests/decimal128-4-parseError-002.phptnu[PK.h] ;,,!tests/bson-regex-004.phptnu[PK.h]0f'a#tests/standalone-ssl-no_verify-002.phptnu[PK.h]*$x(tests/manager-addSubscriber-005.phptnu[PK.h]g33!.tests/decimal128-2-valid-109.phptnu[PK.h] oxbb!,2tests/decimal128-2-valid-149.phptnu[PK.h] ;5tests/oid-valid-001.phptnu[PK.h]䈋 ,F9tests/bson-javascript-serialization-002.phptnu[PK.h]p'Dtests/bson-timestamp-set_state-001.phptnu[PK.h]OGtests/bson-decode-001.phptnu[PK.h]]44!Otests/decimal128-3-valid-001.phptnu[PK.h]C*_Ttests/writeresult-getmatchedcount-001.phptnu[PK.h]w* Wtests/command-aggregate-001.phptnu[PK.h]Ʈ<<&[tests/transaction-integration-003.phptnu[PK.h]tww!&dtests/decimal128-3-valid-129.phptnu[PK.h]I!gtests/decimal128-3-valid-296.phptnu[PK.h]4T(Eltests/bson-maxkey-jsonserialize-002.phptnu[PK.h]2Y!{ntests/decimal128-3-valid-218.phptnu[PK.h])rtests/code-valid-001.phptnu[PK.h] Zutests/bug1274-004.phptnu[PK.h]_K~tests/manager-debug-002.phptnu[PK.h]?]] tests/double-valid-011.phptnu[PK.h]XȄtests/manager-ctor-008.phptnu[PK.h]1!tests/decimal128-3-valid-035.phptnu[PK.h]uk&tests/decimal128-7-parseError-073.phptnu[PK.h]) )Ytests/manager-executeQuery_error-002.phptnu[PK.h]̓tests/oid-valid-003.phptnu[PK.h]p&/tests/decimal128-4-parseError-004.phptnu[PK.h]MBL3Htests/bson-utcdatetime-serialization_error-004.phptnu[PK.h]&tests/decimal128-4-parseError-009.phptnu[PK.h]F{!tests/decimal128-3-valid-166.phptnu[PK.h]Y/ /Htests/manager-executeReadCommand_error-001.phptnu[PK.h])(tests/bson-toCanonicalJSON_error-001.phptnu[PK.h]G4W-tests/bson-int64-serialization_error-001.phptnu[PK.h]S@,,tests/session-002.phptnu[PK.h])^tests/bson-toCanonicalJSON_error-003.phptnu[PK.h]'++*tests/manager-executeWriteCommand-001.phptnu[PK.h]n"tests/serverApi-set_state-001.phptnu[PK.h]I3tests/manager-createClientEncryption-error-001.phptnu[PK.h]TcYY!tests/decimal128-3-valid-153.phptnu[PK.h]Fv;22!tests/decimal128-5-valid-009.phptnu[PK.h] Dtests/binary-parseError-001.phptnu[PK.h]ތ鰓&jtests/bson-javascript-compare-002.phptnu[PK.h] 33!Stests/decimal128-2-valid-118.phptnu[PK.h]վ33!tests/decimal128-2-valid-110.phptnu[PK.h]F22'ڋtests/bson-regex-jsonserialize-001.phptnu[PK.h]@!ctests/decimal128-3-valid-077.phptnu[PK.h]gYc)tests/bson-toCanonicalJSON_error-002.phptnu[PK.h]]:!tests/decimal128-3-valid-288.phptnu[PK.h]K9 9 (7tests/server-executeReadCommand-002.phptnu[PK.h]-u.Ȣtests/top-decodeError-011.phptnu[PK.h] R!,tests/decimal128-3-valid-051.phptnu[PK.h]*!vtests/decimal128-3-valid-190.phptnu[PK.h]8ߝ2ͭtests/bson-decimal128-serialization_error-001.phptnu[PK.h]`  -tests/int32-decodeError-001.phptnu[PK.h]͊Otests/bug0720.phptnu[PK.h]- ||%tests/bulkwrite-update_error-006.phptnu[PK.h](vtests/readpreference-getTagSets-001.phptnu[PK.h]d!tests/decimal128-4-valid-002.phptnu[PK.h]!tests/decimal128-3-valid-270.phptnu[PK.h]Bֶ %ntests/writeconcern-isdefault-001.phptnu[PK.h]q |'ytests/manager-executeBulkWrite-007.phptnu[PK.h]#&X&Ytests/decimal128-4-parseError-012.phptnu[PK.h]J5'tests/code_w_scope-decodeError-011.phptnu[PK.h]d!@tests/bson-int64_error-001.phptnu[PK.h]P  $;tests/bson-objectid-compare-001.phptnu[PK.h]d#'tests/manager-ctor-auth_source-001.phptnu[PK.h])/!tests/decimal128-3-valid-055.phptnu[PK.h]~oz  +Ltests/writeresult-getupsertedcount-002.phptnu[PK.h]ڪ|ZZ-tests/manager-createClientEncryption-001.phptnu[PK.h],gtests/bson-regex_error-002.phptnu[PK.h]O00!tests/causal-consistency-011.phptnu[PK.h]=R!!tests/decimal128-3-valid-261.phptnu[PK.h]  tests/top-decodeError-004.phptnu[PK.h]@Ī&tests/decimal128-6-parseError-014.phptnu[PK.h]=xx1tests/bson-timestamp-serialization_error-001.phptnu[PK.h]̜55!tests/decimal128-2-valid-032.phptnu[PK.h]mmJtests/bson-symbol-001.phptnu[PK.h]F!tests/decimal128-3-valid-142.phptnu[PK.h]0,Z tests/manager-ctor-duplicate-option-004.phptnu[PK.h]M4CKK!rtests/decimal128-2-valid-025.phptnu[PK.h]Wtests/code-decodeError-005.phptnu[PK.h]g!Ntests/decimal128-3-valid-274.phptnu[PK.h]~R&tests/decimal128-6-parseError-025.phptnu[PK.h]Kܠ&tests/decimal128-7-parseError-049.phptnu[PK.h]atests/cursor-session-003.phptnu[PK.h]4ӣ#tests/top-valid-002.phptnu[PK.h]4,,1'tests/manager-ctor-auto_encryption-error-003.phptnu[PK.h]'V',tests/session-getOperationTime-001.phptnu[PK.h]Z!0tests/string-decodeError-001.phptnu[PK.h]T2tests/bson-encode-002.phptnu[PK.h]$-$Atests/bson-decimal128_error-002.phptnu[PK.h]?__!KCtests/decimal128-3-valid-243.phptnu[PK.h]q"Ftests/bulkwrite-countable-001.phptnu[PK.h]D(k((!"Htests/decimal128-3-valid-073.phptnu[PK.h]00-Ktests/server-executeReadWriteCommand-001.phptnu[PK.h]6u$BB!(Qtests/decimal128-2-valid-009.phptnu[PK.h](%"yLL"Ttests/bson-minkey-compare-001.phptnu[PK.h]x1YVtests/bson-timestamp-serialization_error-008.phptnu[PK.h]lz!Ztests/decimal128-3-valid-171.phptnu[PK.h]~gg(_tests/bson-fromPHP-001.phptnu[PK.h]wl dtests/bson-symbol_error-001.phptnu[PK.h]KXS2.ftests/bson-symbol-serialization_error-002.phptnu[PK.h]ۻPEhtests/top-parseError-012.phptnu[PK.h]Co|.jtests/commandFailedEvent-getServiceId-001.phptnu[PK.h]nn-qtests/bson-javascript-get_properties-001.phptnu[PK.h]OO&ttests/cursor-IteratorIterator-004.phptnu[PK.h]1)Ahh!lytests/decimal128-1-valid-033.phptnu[PK.h],=%}tests/bug1015.phptnu[PK.h]wP@*7tests/monitoring-removeSubscriber-002.phptnu[PK.h]*VxDtests/bug1151-002.phptnu[PK.h]V֋%tests/bulkwrite-insert_error-002.phptnu[PK.h] %&tests/decimal128-7-parseError-020.phptnu[PK.h] ~/O!$tests/decimal128-3-valid-223.phptnu[PK.h] PP&}tests/manager-set-uri-options-001.phptnu[PK.h]'j``)#tests/manager-executeReadCommand-001.phptnu[PK.h]uw1  'ܠtests/manager-executeBulkWrite-004.phptnu[PK.h]Mt//!?tests/decimal128-2-valid-089.phptnu[PK.h]e9(tests/readpreference-ctor_error-006.phptnu[PK.h]ٓ٪tests/manager-as-singleton.phptnu[PK.h]33!tests/decimal128-3-valid-179.phptnu[PK.h]!Z"",tests/serverApi-serialization_error-002.phptnu[PK.h]N&tests/writeconcern-getjournal-001.phptnu[PK.h]~##tests/manager-executeQuery-006.phptnu[PK.h])M!tests/decimal128-3-valid-219.phptnu[PK.h]͉99tests/bug0528.phptnu[PK.h],F ltests/query-ctor-003.phptnu[PK.h]v  ,gtests/bson-javascript-serialization-001.phptnu[PK.h]w!tests/decimal128-3-valid-193.phptnu[PK.h]X>3tests/bson-dbpointer-002.phptnu[PK.h]Iz??1tests/manager-wakeup.phptnu[PK.h]AkS  (tests/readconcern-serialization-001.phptnu[PK.h],> #,tests/document-decodeError-001.phptnu[PK.h]433!tests/decimal128-2-valid-101.phptnu[PK.h]$H&"tests/decimal128-7-parseError-001.phptnu[PK.h]f!9tests/decimal128-3-valid-206.phptnu[PK.h]zWaa!tests/decimal128-3-valid-133.phptnu[PK.h]dDE E Btests/cursor-rewind-001.phptnu[PK.h]p& tests/decimal128-6-parseError-006.phptnu[PK.h]̀G\\+ tests/manager-executeCommand_error-001.phptnu[PK.h]%+tests/manager-ctor-driver-metadata-001.phptnu[PK.h]Gs*tests/bson-binary-set_state_error-003.phptnu[PK.h]M ߆!tests/decimal128-2-valid-086.phptnu[PK.h]XFYY! tests/decimal128-5-valid-036.phptnu[PK.h]:yy1,%tests/readpreference-serialization_error-002.phptnu[PK.h]P55!*tests/decimal128-2-valid-037.phptnu[PK.h]/II!-tests/decimal128-2-valid-130.phptnu[PK.h]L,&1tests/serverApi-serialization_error-001.phptnu[PK.h]5@@'-6tests/monitoring-addSubscriber-004.phptnu[PK.h])v=tests/bulkwrite-debug-001.phptnu[PK.h]==!Dtests/decimal128-1-valid-025.phptnu[PK.h]ixUU.Htests/bson-utcdatetime-get_properties-002.phptnu[PK.h]~f::!9Jtests/decimal128-3-valid-094.phptnu[PK.h]k'~Ntests/manager-executeBulkWrite-005.phptnu[PK.h]^H&gRtests/decimal128-7-parseError-019.phptnu[PK.h]e"  'Ttests/manager-executeBulkWrite-010.phptnu[PK.h] ESS$ Ytests/readconcern-isdefault-001.phptnu[PK.h]`ՀP]tests/bson-timestamp-005.phptnu[PK.h]KI&btests/bson-javascript-compare-001.phptnu[PK.h]ҥ^!dtests/symbol-decodeError-005.phptnu[PK.h]dOftests/manager-var-dump-001.phptnu[PK.h]X\&ktests/cursor-IteratorIterator-002.phptnu[PK.h]™9jj& ptests/bson-dbpointer-tostring-001.phptnu[PK.h]r!R//+qtests/bson-timestamp-serialization-004.phptnu[PK.h]יpbb!Uwtests/decimal128-2-valid-154.phptnu[PK.h]#b%[[*{tests/bson-utcdatetime-todatetime-001.phptnu[PK.h]bXX!|tests/decimal128-2-valid-136.phptnu[PK.h]Ԁ[+ +ftests/manager-executeCommand_error-002.phptnu[PK.h]O!tests/decimal128-1-valid-054.phptnu[PK.h],g!7tests/decimal128-2-valid-088.phptnu[PK.h]S&tests/decimal128-7-parseError-024.phptnu[PK.h]bj ~ ~ )Ctests/server-executeWriteCommand-002.phptnu[PK.h]]?:II!tests/decimal128-5-valid-006.phptnu[PK.h]* tests/readconcern-constants.phptnu[PK.h]#ئtests/datetime-decodeError-001.phptnu[PK.h]uHqq-tests/bson-regex-serialization_error-002.phptnu[PK.h]!Ѭtests/decimal128-3-valid-105.phptnu[PK.h]W**! tests/decimal128-2-valid-038.phptnu[PK.h]7&tests/server-executeBulkWrite-003.phptnu[PK.h]4=}}!tests/decimal128-2-valid-085.phptnu[PK.h]M,,!}tests/decimal128-3-valid-042.phptnu[PK.h] !tests/decimal128-3-valid-081.phptnu[PK.h]22/?tests/bulkwriteexception-haserrorlabel-001.phptnu[PK.h]$HH!tests/cursorid-set_state-001.phptnu[PK.h]Q&itests/decimal128-6-parseError-029.phptnu[PK.h]_$$#^tests/document-decodeError-003.phptnu[PK.h]Q9tests/top-parseError-038.phptnu[PK.h]M!tests/decimal128-1-valid-002.phptnu[PK.h]伻YY!tests/decimal128-3-valid-101.phptnu[PK.h]!tests/decimal128-1-valid-049.phptnu[PK.h]Hdd!tests/decimal128-2-valid-005.phptnu[PK.h]lԻ>>!tests/code_w_scope-valid-001.phptnu[PK.h]k!+tests/decimal128-3-valid-213.phptnu[PK.h]CG,tests/transaction-integration_error-001.phptnu[PK.h]#8tests/top-decodeError-008.phptnu[PK.h]JR!:tests/decimal128-3-valid-119.phptnu[PK.h];G&tests/decimal128-7-parseError-037.phptnu[PK.h]s}88tests/bson-toPHP-007.phptnu[PK.h]3^^&Ktests/cursor-NoRewindIterator-001.phptnu[PK.h]3>1tests/bson-dbpointer-serialization_error-003.phptnu[PK.h] 4qtests/bson-int64-003.phptnu[PK.h],&]tests/bson-javascript-getCode-001.phptnu[PK.h]x&}tests/decimal128-4-parseError-006.phptnu[PK.h]'N99!tests/decimal128-5-valid-017.phptnu[PK.h]WB!H#tests/decimal128-5-valid-016.phptnu[PK.h]Y"'tests/manager-ctor-007.phptnu[PK.h]k(tests/array-valid-005.phptnu[PK.h])a`OOC.tests/bug0334-001.phptnu[PK.h]B?44!0tests/decimal128-3-valid-019.phptnu[PK.h]'lq!]4tests/decimal128-3-valid-033.phptnu[PK.h]qzz(8tests/readpreference-ctor_error-004.phptnu[PK.h]'d^*;tests/manager-ctor-auth_mechanism-002.phptnu[PK.h]?H<&^Atests/decimal128-7-parseError-060.phptnu[PK.h]!Ctests/decimal128-3-valid-085.phptnu[PK.h];;!Gtests/decimal128-3-valid-177.phptnu[PK.h]Ak  !yKtests/decimal128-3-valid-276.phptnu[PK.h]|fOtests/top-parseError-006.phptnu[PK.h]k!Qtests/decimal128-3-valid-097.phptnu[PK.h]k"!/Vtests/decimal128-3-valid-279.phptnu[PK.h]n  &Ztests/cursor-IteratorIterator-003.phptnu[PK.h])|22"^tests/bson-objectid_error-001.phptnu[PK.h]鉤S%%3latests/manager-createClientEncryption-error-002.phptnu[PK.h]ER'etests/writeconcern-getwtimeout-001.phptnu[PK.h]')Wtests/writeresult-isacknowledged-001.phptnu[PK.h]^**!9tests/decimal128-3-valid-109.phptnu[PK.h]/Pkk+tests/manager-executeCommand_error-004.phptnu[PK.h]`ztests/bug1274-001.phptnu[PK.h]ҿ" tests/server-executeQuery-009.phptnu[PK.h]eatests/bson-binary-001.phptnu[PK.h] \rrr%5 tests/bson-utcdatetime_error-004.phptnu[PK.h]|ZU-#tests/bson-timestamp-set_state_error-002.phptnu[PK.h]#'++!)tests/decimal128-5-valid-059.phptnu[PK.h]B!X.tests/decimal128-3-valid-075.phptnu[PK.h]MY&2tests/decimal128-6-parseError-001.phptnu[PK.h]04tests/binary-valid-001.phptnu[PK.h]o`pp7tests/datetime-valid-001.phptnu[PK.h]iX<tests/top-parseError-029.phptnu[PK.h]>att!?tests/decimal128-2-valid-057.phptnu[PK.h]刬+ + .Btests/server-executeReadCommand_error-001.phptnu[PK.h]6p%%\Mtests/server-001.phptnu[PK.h]VLnwwStests/bug1152-002.phptnu[PK.h]ftests/bug0531-001.phptnu[PK.h]>htests/bug1162-001.phptnu[PK.h]977%ltests/bson-utcdatetime_error-003.phptnu[PK.h]sݒ//Qotests/top-parseError-040.phptnu[PK.h]kfXXqtests/bug0924-002.phptnu[PK.h]~W&kytests/decimal128-4-parseError-014.phptnu[PK.h]!{tests/string-decodeError-002.phptnu[PK.h] LI~SS'}tests/manager-executeBulkWrite-002.phptnu[PK.h]>tests/update-multi-001.phptnu[PK.h] !itests/decimal128-3-valid-172.phptnu[PK.h]z{O(tests/bson-utcdatetime-int-size-002.phptnu[PK.h]wXX!tests/decimal128-2-valid-132.phptnu[PK.h]@Ntests/null-valid-001.phptnu[PK.h]s{ TT!)tests/decimal128-2-valid-073.phptnu[PK.h]Ʒ'Ωtests/commandFailedEvent-debug-001.phptnu[PK.h]2j00tests/session-004.phptnu[PK.h]ƞ66$]tests/manager-addSubscriber-003.phptnu[PK.h]MM(tests/bson-regex-get_properties-002.phptnu[PK.h]l#88#tests/standalone-x509-auth-002.phptnu[PK.h])33!tests/decimal128-2-valid-120.phptnu[PK.h] !tests/writeconcern-constants.phptnu[PK.h]]e(tests/bson-maxkey-jsonserialize-001.phptnu[PK.h]ZII!tests/decimal128-5-valid-044.phptnu[PK.h]1h&&tests/regex-valid-001.phptnu[PK.h]][!tests/decimal128-3-valid-253.phptnu[PK.h]7aa!Ntests/decimal128-2-valid-014.phptnu[PK.h]$'tests/manager-executeBulkWrite-011.phptnu[PK.h]ڵ tests/dbref-valid-002.phptnu[PK.h]rq., tests/bson-dbpointer-get_properties-001.phptnu[PK.h]X7gg-/tests/bson-int64-serialization_error-003.phptnu[PK.h]h JJ!tests/decimal128-1-valid-008.phptnu[PK.h]?ٌ[[tests/bug0671-003.phptnu[PK.h]:%<,/tests/bson-decimal128-jsonserialize-002.phptnu[PK.h]V6XX1]tests/bson-dbpointer-serialization_error-001.phptnu[PK.h]KG!tests/decimal128-3-valid-145.phptnu[PK.h] \*itests/bson-timestamp-getIncrement-001.phptnu[PK.h]+Z3 3 $tests/cursor-tailable_error-002.phptnu[PK.h]YӬ!* tests/bson-fromPHP_error-001.phptnu[PK.h]jrfII!'tests/decimal128-2-valid-126.phptnu[PK.h]~&&tests/decimal128-6-parseError-003.phptnu[PK.h](7&tests/decimal128-7-parseError-046.phptnu[PK.h]X  !tests/decimal128-3-valid-238.phptnu[PK.h]uatests/dbref-valid-009.phptnu[PK.h]AA!"tests/decimal128-5-valid-048.phptnu[PK.h]>m@AA"'tests/bson-fromJSON_error-001.phptnu[PK.h]ϩ2!(tests/decimal128-3-valid-138.phptnu[PK.h]?" -tests/bson-objectid_error-002.phptnu[PK.h]4T.tests/manager-ctor-disableClientPersistence-008.phptnu[PK.h]*+E6tests/readpreference-getModeString-001.phptnu[PK.h]^2#9tests/bson-javascript-serialization_error-006.phptnu[PK.h]xCC, <tests/manager-ctor-duplicate-option-001.phptnu[PK.h]##!=tests/decimal128-1-valid-018.phptnu[PK.h]l&Atests/decimal128-7-parseError-041.phptnu[PK.h]lh4Ctests/bson-fromPHP-003.phptnu[PK.h]%5Htests/cursorid-serialization-001.phptnu[PK.h]é[¾IMtests/manager-ctor-002.phptnu[PK.h]~wYRNtests/top-valid-001.phptnu[PK.h]!Qtests/decimal128-3-valid-250.phptnu[PK.h]1 Vtests/binary-parseError-005.phptnu[PK.h]snn2Xtests/binary-valid-012.phptnu[PK.h]&C[tests/session-debug-003.phptnu[PK.h]Z&!`tests/decimal128-7-parseError-009.phptnu[PK.h]rg*v,,dbtests/document-valid-006.phptnu[PK.h]"n?&etests/decimal128-7-parseError-023.phptnu[PK.h]E'htests/manager-executeBulkWrite-009.phptnu[PK.h]733!tltests/decimal128-2-valid-111.phptnu[PK.h]A&otests/decimal128-7-parseError-042.phptnu[PK.h]FD>rtests/cursorid-002.phptnu[PK.h]8#-&xtests/decimal128-7-parseError-034.phptnu[PK.h]dMH11',ztests/code_w_scope-decodeError-005.phptnu[PK.h]/,|tests/manager-ctor-directconnection-001.phptnu[PK.h]b%%!tests/decimal128-3-valid-040.phptnu[PK.h]2(qtests/bson-int64-get_properties-002.phptnu[PK.h]qa>>(~tests/bson-binary-jsonserialize-001.phptnu[PK.h]j88#tests/manager-executeQuery-002.phptnu[PK.h]{H tests/bug0592.phptnu[PK.h]] 3ܝtests/bson-utcdatetime-serialization_error-003.phptnu[PK.h]kHDTT+tests/readpreference-serialization-001.phptnu[PK.h]tests/document-valid-001.phptnu[PK.h]I!tests/decimal128-3-valid-067.phptnu[PK.h]kr!1tests/bson-timestamp-serialization_error-004.phptnu[PK.h]qD#tests/bson-timestamp_error-006.phptnu[PK.h]f(!|tests/decimal128-3-valid-163.phptnu[PK.h]$S!tests/decimal128-3-valid-087.phptnu[PK.h]ptests/cursor-iterator-002.phptnu[PK.h]@N(etests/readpreference-ctor_error-001.phptnu[PK.h]$''!Dtests/decimal128-3-valid-083.phptnu[PK.h]k_II!tests/decimal128-2-valid-011.phptnu[PK.h]2+ee.Vtests/readconcern-serialization_error-002.phptnu[PK.h]q{  !tests/decimal128-3-valid-251.phptnu[PK.h]nammttests/retryable-reads-001.phptnu[PK.h]4]>33!/tests/decimal128-3-valid-302.phptnu[PK.h]}$!tests/decimal128-3-valid-054.phptnu[PK.h]NE!tests/decimal128-3-valid-148.phptnu[PK.h]RٕRRRtests/bug0923-002.phptnu[PK.h]!tests/bson-fromPHP_error-002.phptnu[PK.h]|&tests/server-executeBulkWrite-008.phptnu[PK.h]1p  !tests/decimal128-3-valid-140.phptnu[PK.h]`!Ztests/decimal128-3-valid-047.phptnu[PK.h]4ߞDD!tests/decimal128-1-valid-029.phptnu[PK.h]b?!7tests/decimal128-2-valid-017.phptnu[PK.h]' tests/document-valid-002.phptnu[PK.h]u$!g"tests/decimal128-2-valid-098.phptnu[PK.h]!΢7&tests/query_error-001.phptnu[PK.h]hf#q'tests/bson-dbpointer_error-002.phptnu[PK.h] 3bb!(tests/code_w_scope-valid-002.phptnu[PK.h]Q33!u,tests/decimal128-5-valid-055.phptnu[PK.h]us$0tests/dbpointer-decodeError-002.phptnu[PK.h]62  !S3tests/decimal128-3-valid-199.phptnu[PK.h] 7tests/binary-parseError-002.phptnu[PK.h]6<\\!9tests/decimal128-2-valid-069.phptnu[PK.h]<|\!=tests/binary-decodeError-003.phptnu[PK.h]>l#?tests/readpreference_error-001.phptnu[PK.h]J /3&/Atests/decimal128-6-parseError-005.phptnu[PK.h]>>!+Ctests/decimal128-2-valid-019.phptnu[PK.h]][]]'Ftests/manager-executeBulkWrite-003.phptnu[PK.h][&].nKtests/bson-binary-serialization_error-003.phptnu[PK.h]N5kQtests/binary-valid-009.phptnu[PK.h]5!RUtests/decimal128-3-valid-233.phptnu[PK.h]ke((!Ytests/decimal128-3-valid-049.phptnu[PK.h]3!.^tests/decimal128-3-valid-052.phptnu[PK.h]$T,btests/bson-objectid-set_state_error-002.phptnu[PK.h]p&etests/decimal128-7-parseError-017.phptnu[PK.h]͎PNN$gtests/cursor-tailable_error-001.phptnu[PK.h]Pm&ptests/decimal128-7-parseError-022.phptnu[PK.h]B /rtests/manager-ctor-write_concern-error-007.phptnu[PK.h]fsCutests/bson-toPHP_error-002.phptnu[PK.h]&RKK+:xtests/bson-objectid-get_properties-002.phptnu[PK.h]jytests/bug0894-001.phptnu[PK.h]e!J'|tests/bson-toRelaxedJSON_error-002.phptnu[PK.h] Gq!!!tests/decimal128-5-valid-064.phptnu[PK.h]{앉+tests/bson-dbpointer-serialization-002.phptnu[PK.h]x[`(etests/server-executeQuery_error-001.phptnu[PK.h]u|tests/bson-toPHP-010.phptnu[PK.h]3s.tests/undefined-valid-001.phptnu[PK.h]/ &tests/top-parseError-007.phptnu[PK.h]w!Xtests/manager-ctor_error-002.phptnu[PK.h]fAA!tests/decimal128-3-valid-189.phptnu[PK.h]XttBtests/cursor-isDead-004.phptnu[PK.h]X @  !tests/decimal128-3-valid-226.phptnu[PK.h]s s $^tests/manager-addSubscriber-002.phptnu[PK.h]E޶ %tests/readconcern_error-001.phptnu[PK.h]J-tests/bson-int64-serialization_error-004.phptnu[PK.h]potests/string-valid-002.phptnu[PK.h]@!wtests/decimal128-3-valid-221.phptnu[PK.h]>!tests/decimal128-3-valid-022.phptnu[PK.h]ytests/bug1067.phptnu[PK.h]&tests/cursor-setTypeMap_error-002.phptnu[PK.h]F~!'tests/writeconcern_error-001.phptnu[PK.h]"Χ~!tests/bson-regex-compare-002.phptnu[PK.h]~O!tests/decimal128-3-valid-289.phptnu[PK.h]&'tests/manager-executeBulkWrite-012.phptnu[PK.h](tests/bson-minkey-serialization-001.phptnu[PK.h]ѸȬ+tests/query-ctor-001.phptnu[PK.h]} } 2tests/bulkwrite-insert-004.phptnu[PK.h]k<33'tests/code_w_scope-decodeError-010.phptnu[PK.h]}DXXtests/bug0357.phptnu[PK.h]ō55!"tests/decimal128-2-valid-039.phptnu[PK.h]1Lq tests/server-getLatency-001.phptnu[PK.h] |uu& tests/serverApi-serialization-002.phptnu[PK.h]{Gf==+ tests/bson-undefined-serialization-001.phptnu[PK.h]5D tests/bson-dbpointer-001.phptnu[PK.h]E/22-! tests/clientEncryption-createDataKey-001.phptnu[PK.h]" tests/server-executeQuery-012.phptnu[PK.h]wi! tests/decimal128-3-valid-231.phptnu[PK.h]oj>>X! tests/bson-objectid-004.phptnu[PK.h]pkUU#" tests/bson-regex-set_state-002.phptnu[PK.h]vVDT$ tests/session-003.phptnu[PK.h]t&, tests/decimal128-4-parseError-018.phptnu[PK.h])  ). tests/bson-regex-set_state_error-002.phptnu[PK.h]M!Gw tests/decimal128-3-valid-275.phptnu[PK.h]=#{ tests/bson-timestamp_error-003.phptnu[PK.h]~  ! tests/session-endSession-002.phptnu[PK.h]ťi! tests/decimal128-3-valid-298.phptnu[PK.h]ץu tests/bson-utcdatetime-005.phptnu[PK.h]3==-ˋ tests/manager-executeBulkWrite_error-010.phptnu[PK.h]= e tests/bson-regex_error-001.phptnu[PK.h]7dV&5 tests/decimal128-7-parseError-026.phptnu[PK.h]iNҍ##'q tests/manager-executeBulkWrite-001.phptnu[PK.h]bb! tests/decimal128-2-valid-066.phptnu[PK.h]' tests/manager-executeBulkWrite-008.phptnu[PK.h]Y966! tests/decimal128-5-valid-005.phptnu[PK.h]q tests/int32-valid-001.phptnu[PK.h]c&!q tests/decimal128-3-valid-202.phptnu[PK.h]ȴ tests/string-valid-007.phptnu[PK.h]O  %" tests/bulkwrite-insert_error-003.phptnu[PK.h]>nXX! tests/decimal128-2-valid-137.phptnu[PK.h]!ա/+ tests/manager-ctor-write_concern-error-002.phptnu[PK.h]!.==!+ tests/decimal128-3-valid-169.phptnu[PK.h]~ tests/bson-undefined-001.phptnu[PK.h]M- tests/top-parseError-017.phptnu[PK.h][nh@@! tests/decimal128-2-valid-123.phptnu[PK.h]>nN!! tests/decimal128-3-valid-063.phptnu[PK.h]! tests/decimal128-3-valid-060.phptnu[PK.h]!* tests/decimal128-3-valid-044.phptnu[PK.h]R(p tests/bson-utcdatetime-tostring-001.phptnu[PK.h]K]  tests/bson-minkey-001.phptnu[PK.h] \ָuu! tests/decimal128-3-valid-308.phptnu[PK.h]K**!Y tests/decimal128-2-valid-036.phptnu[PK.h] tests/int32-valid-005.phptnu[PK.h]^) tests/manager-ctor-appname_error-001.phptnu[PK.h]!(jEE+# tests/manager-ctor-auto_encryption-001.phptnu[PK.h]l& tests/decimal128-4-parseError-003.phptnu[PK.h]<! tests/decimal128-3-valid-271.phptnu[PK.h]33!1!tests/decimal128-2-valid-106.phptnu[PK.h]{!!tests/decimal128-3-valid-137.phptnu[PK.h],`55! !tests/decimal128-3-valid-272.phptnu[PK.h]aWu@@ !tests/multi-type-valid-001.phptnu[PK.h]_"2$!tests/bson-javascript-serialization_error-001.phptnu[PK.h]3  !&!tests/decimal128-3-valid-277.phptnu[PK.h]-&*!tests/decimal128-6-parseError-023.phptnu[PK.h] bbb!,!tests/decimal128-3-valid-003.phptnu[PK.h]@f)0!tests/manager-startSession_error-001.phptnu[PK.h]ʢϘ\\A!tests/bson-decimal128-004.phptnu[PK.h]kbb!D!tests/decimal128-2-valid-152.phptnu[PK.h]GKD%:H!tests/bulkwrite-update_error-007.phptnu[PK.h]addL!tests/top-parseError-027.phptnu[PK.h]'N!tests/cursorid-set_state_error-001.phptnu[PK.h]Zy44P!tests/cursor-getmore-007.phptnu[PK.h]!&'&PW!tests/decimal128-7-parseError-015.phptnu[PK.h]reH'Y!tests/bson-regex-serialization-005.phptnu[PK.h]o_XX!\!tests/decimal128-2-valid-133.phptnu[PK.h]D,,!G`!tests/decimal128-3-valid-029.phptnu[PK.h]݆q  !c!tests/decimal128-3-valid-227.phptnu[PK.h]v&ff+!h!tests/manager-executeCommand_error-003.phptnu[PK.h]n'!j!tests/decimal128-1-valid-038.phptnu[PK.h]fa)Ko!tests/update-001.phptnu[PK.h]"uu!av!tests/decimal128-3-valid-131.phptnu[PK.h]+4ZVV)'z!tests/bson-symbol-get_properties-001.phptnu[PK.h]OOO'{!tests/bson-utcdatetime-compare-001.phptnu[PK.h]gdX EE!|~!tests/causal-consistency-001.phptnu[PK.h]U&!tests/decimal128-7-parseError-070.phptnu[PK.h]W!tests/typemap-002.phptnu[PK.h]qun&D!tests/decimal128-6-parseError-012.phptnu[PK.h]x!A!tests/decimal128-3-valid-070.phptnu[PK.h]6o;(!tests/readconcern-bsonserialize-002.phptnu[PK.h] KQ!!tests/decimal128-3-valid-104.phptnu[PK.h]3:(4!tests/writeconcernerror-getcode-001.phptnu[PK.h]B88q!tests/binary-valid-005.phptnu[PK.h] 55!!tests/decimal128-3-valid-247.phptnu[PK.h][Iz!tests/query-ctor_error-005.phptnu[PK.h]cm77!!tests/decimal128-3-valid-136.phptnu[PK.h]-n&!tests/decimal128-7-parseError-052.phptnu[PK.h]oݞZ!tests/bson-javascript-002.phptnu[PK.h]mYY'F!tests/monitoring-addSubscriber-001.phptnu[PK.h]T*!tests/commandSucceededEvent-debug-001.phptnu[PK.h]%)774!tests/bson-timestamp-002.phptnu[PK.h]1;!!tests/decimal128-3-valid-079.phptnu[PK.h]oc!!tests/symbol-decodeError-002.phptnu[PK.h]ִ!!!tests/decimal128-3-valid-026.phptnu[PK.h]Ja!tests/bug0325.phptnu[PK.h]q)55(j!tests/bson-utcdatetime-int-size-001.phptnu[PK.h]عG !tests/bson-minkey_error-001.phptnu[PK.h]naa6!tests/bug0430-001.phptnu[PK.h]7?J!tests/bug0430-002.phptnu[PK.h]_0$!tests/server-executeCommand-007.phptnu[PK.h]x//#.!tests/bson-timestamp_error-001.phptnu[PK.h]- z.!tests/bson-symbol-serialization_error-001.phptnu[PK.h]VO# !tests/manager-executeQuery-004.phptnu[PK.h]}O!tests/bug0849-001.phptnu[PK.h]>GG!tests/bug0940-002.phptnu[PK.h]Fン*!tests/bson-objectid-serialization-002.phptnu[PK.h]xR!tests/document-valid-003.phptnu[PK.h]##!tests/manager-destruct-001.phptnu[PK.h]"tests/bson-symbol-serialization_error-003.phptnu[PK.h]T""tests/serverApi-construct-001.phptnu[PK.h]>$l1"tests/query-sort-004.phptnu[PK.h]~m"tests/bson-regex-clone-001.phptnu[PK.h]qMM!"tests/decimal128-2-valid-026.phptnu[PK.h]Y"a"tests/boolean-decodeError-002.phptnu[PK.h]Id! "tests/decimal128-5-valid-026.phptnu[PK.h]USS!$"tests/decimal128-1-valid-014.phptnu[PK.h]Kw,;;!("tests/decimal128-2-valid-043.phptnu[PK.h]$$"("tests/bson-int64-tostring-001.phptnu[PK.h]]//"tests/query-sort-001.phptnu[PK.h]n4)"tests/writeconcern-serialization-001.phptnu[PK.h];n  !"tests/decimal128-4-valid-006.phptnu[PK.h]B'&"tests/decimal128-6-parseError-017.phptnu[PK.h]!CC+"tests/bson-undefined-serialization-002.phptnu[PK.h]6R,--!""tests/decimal128-3-valid-038.phptnu[PK.h]ų!"tests/string-decodeError-004.phptnu[PK.h]i zz-"tests/session-startTransaction_error-002.phptnu[PK.h]#X88!#tests/decimal128-2-valid-100.phptnu[PK.h]ԇ,%J#tests/manager-executeCommand-005.phptnu[PK.h]&@#tests/decimal128-7-parseError-013.phptnu[PK.h]o  !#tests/decimal128-3-valid-225.phptnu[PK.h]QC&#tests/decimal128-7-parseError-004.phptnu[PK.h]%?:!!!$#tests/decimal128-3-valid-110.phptnu[PK.h]B2v,,4#tests/manager-ctor-disableClientPersistence-003.phptnu[PK.h])(& #tests/bson-decimal128-set_state-001.phptnu[PK.h]ଧ!$#tests/decimal128-3-valid-039.phptnu[PK.h]!KP  !P(#tests/decimal128-3-valid-146.phptnu[PK.h]%Žkk#,#tests/standalone-x509-auth-001.phptnu[PK.h]5p33!k0#tests/decimal128-2-valid-099.phptnu[PK.h]j3#tests/top-parseError-030.phptnu[PK.h]ɓ6& 6#tests/decimal128-7-parseError-014.phptnu[PK.h](RY1P8#tests/bson-dbpointer-serialization_error-004.phptnu[PK.h]<#tests/top-parseError-010.phptnu[PK.h]Q->#tests/readpreference-set_state_error-002.phptnu[PK.h]SW A#tests/array-decodeError-003.phptnu[PK.h]tZ&C#tests/decimal128-7-parseError-044.phptnu[PK.h]M#=F#tests/manager-executeQuery-003.phptnu[PK.h]4K)L#tests/standalone-ssl-verify_cert-002.phptnu[PK.h]a33! S#tests/decimal128-2-valid-114.phptnu[PK.h];!V#tests/bson-int64-compare-001.phptnu[PK.h]S*Y#tests/manager-ctor-auth_mechanism-001.phptnu[PK.h]t;&]#tests/decimal128-6-parseError-007.phptnu[PK.h]Ir'%_#tests/bson-objectidinterface-001.phptnu[PK.h]Y*!`#tests/decimal128-4-valid-003.phptnu[PK.h]C  ++e#tests/session-advanceOperationTime-001.phptnu[PK.h]fY92j#tests/manager-ctor-directconnection-error-001.phptnu[PK.h]v.&n#tests/decimal128-7-parseError-036.phptnu[PK.h];u[ [ *p#tests/server-executeCommand_error-001.phptnu[PK.h]{3}#tests/runtimeexception-haserrorlabel_error-001.phptnu[PK.h](#22#tests/int64-valid-004.phptnu[PK.h].0Shh!#tests/decimal128-3-valid-305.phptnu[PK.h]7]/0J#tests/bson-objectid-serialization_error-002.phptnu[PK.h]Q9P!‹#tests/decimal128-1-valid-041.phptnu[PK.h]nǺ  #tests/server-errors.phptnu[PK.h]RA0MM+#tests/bson-timestamp-serialization-001.phptnu[PK.h]}$#tests/server-executeCommand-006.phptnu[PK.h]..!u#tests/decimal128-3-valid-023.phptnu[PK.h]{{N#tests/datetime-valid-005.phptnu[PK.h] f ff!߳#tests/decimal128-3-valid-304.phptnu[PK.h]WOx#tests/manager_error-001.phptnu[PK.h]PZvܸ#tests/query-ctor_error-003.phptnu[PK.h]9n!#tests/decimal128-3-valid-200.phptnu[PK.h]4!t#tests/decimal128-5-valid-023.phptnu[PK.h]!^BFF!#tests/decimal128-3-valid-128.phptnu[PK.h]S&u#tests/decimal128-6-parseError-015.phptnu[PK.h]5B11!u#tests/decimal128-2-valid-097.phptnu[PK.h])#tests/writeresult-getupsertedids-002.phptnu[PK.h]i] %!#tests/decimal128-3-valid-255.phptnu[PK.h]ѻhhN#tests/bug0912-001.phptnu[PK.h]W#tests/bson-utcdatetime-003.phptnu[PK.h]]9!#tests/decimal128-5-valid-065.phptnu[PK.h]ڼ500!#tests/decimal128-3-valid-126.phptnu[PK.h]n``-#tests/session-startTransaction_error-004.phptnu[PK.h]~g!#tests/decimal128-3-valid-273.phptnu[PK.h]]Y9!#tests/decimal128-3-valid-157.phptnu[PK.h]w!\#tests/decimal128-1-valid-042.phptnu[PK.h]_''!#tests/decimal128-5-valid-061.phptnu[PK.h]!;;! $tests/decimal128-2-valid-090.phptnu[PK.h]5]]$tests/bulkwrite_error-002.phptnu[PK.h]X=  !W $tests/decimal128-1-valid-052.phptnu[PK.h]aUU!$tests/decimal128-2-valid-028.phptnu[PK.h]"m55!W$tests/decimal128-2-valid-044.phptnu[PK.h]Sl쎴!$tests/causal-consistency-004.phptnu[PK.h]Ĝ'$tests/document-valid-007.phptnu[PK.h]0%K+$tests/bson-timestamp-compare-001.phptnu[PK.h]s !/$tests/bug1163-001.phptnu[PK.h] rXX!E9$tests/decimal128-2-valid-142.phptnu[PK.h] ::(<$tests/bson-symbol-jsonserialize-001.phptnu[PK.h]P\00!>$tests/decimal128-2-valid-042.phptnu[PK.h]c&+B$tests/manager-executeCommand_error-005.phptnu[PK.h]C-,F$tests/transaction-integration_error-004.phptnu[PK.h]J4!JO$tests/decimal128-3-valid-236.phptnu[PK.h]&S$tests/int64-valid-001.phptnu[PK.h]raX$tests/readconcern-ctor-001.phptnu[PK.h]ӳQQ\$tests/bug1598-001.phptnu[PK.h]R!^$tests/decimal128-3-valid-210.phptnu[PK.h]@|c$tests/cursor-session-002.phptnu[PK.h]!h$tests/decimal128-2-valid-049.phptnu[PK.h] &l$tests/decimal128-7-parseError-048.phptnu[PK.h]& n$tests/compression_error-001.phptnu[PK.h]{  0 q$tests/manager-ctor-auth_mechanism-error-001.phptnu[PK.h]"}}$tests/server-executeQuery-008.phptnu[PK.h]b&$tests/decimal128-7-parseError-066.phptnu[PK.h]B$ׅ$tests/dbpointer-decodeError-006.phptnu[PK.h]B!/$tests/symbol-decodeError-003.phptnu[PK.h]-ԓh$tests/query-sort-002.phptnu[PK.h]HގD$tests/bson-regex-002.phptnu[PK.h]8[[!$tests/decimal128-3-valid-011.phptnu[PK.h]8P;;!X$tests/decimal128-2-valid-040.phptnu[PK.h]h((%$tests/bson-utcdatetime-clone-001.phptnu[PK.h];xTBB!a$tests/decimal128-2-valid-082.phptnu[PK.h]Q__!$tests/decimal128-3-valid-008.phptnu[PK.h]2||1$tests/bson-dbpointer-serialization_error-002.phptnu[PK.h]xx$tests/dbpointer-valid-002.phptnu[PK.h]Zn{  !G$tests/decimal128-3-valid-230.phptnu[PK-$