mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-03-25 17:32:28 +01:00
28 lines
409 B
PHP
28 lines
409 B
PHP
--TEST--
|
|
PHPC-430: Query constructor arguments are modified
|
|
--FILE--
|
|
<?php
|
|
|
|
function buildQuery($filter, $options)
|
|
{
|
|
$options["cursorFlags"] = 0;
|
|
return new MongoDB\Driver\Query($filter, $options);
|
|
}
|
|
|
|
$filter = [];
|
|
$options = ['sort' => []];
|
|
$query = buildQuery($filter, $options);
|
|
|
|
var_dump($options);
|
|
|
|
?>
|
|
===DONE===
|
|
<?php exit(0); ?>
|
|
--EXPECT--
|
|
array(1) {
|
|
["sort"]=>
|
|
array(0) {
|
|
}
|
|
}
|
|
===DONE===
|