mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-03-26 01:42:10 +01:00
41 lines
659 B
PHP
41 lines
659 B
PHP
--TEST--
|
|
MongoDB\Driver\Query debug output with let option
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump(new MongoDB\Driver\Query(
|
|
['$expr' => ['$eq' => ['$_id', '$$id']]],
|
|
['let' => ['id' => 1]]
|
|
));
|
|
|
|
?>
|
|
===DONE===
|
|
<?php exit(0); ?>
|
|
--EXPECTF--
|
|
object(MongoDB\Driver\Query)#%d (%d) {
|
|
["filter"]=>
|
|
object(stdClass)#%d (%d) {
|
|
["$expr"]=>
|
|
object(stdClass)#%d (%d) {
|
|
["$eq"]=>
|
|
array(2) {
|
|
[0]=>
|
|
string(4) "$_id"
|
|
[1]=>
|
|
string(4) "$$id"
|
|
}
|
|
}
|
|
}
|
|
["options"]=>
|
|
object(stdClass)#%d (%d) {
|
|
["let"]=>
|
|
object(stdClass)#%d (%d) {
|
|
["id"]=>
|
|
int(1)
|
|
}
|
|
}
|
|
["readConcern"]=>
|
|
NULL
|
|
}
|
|
===DONE===
|