Files
mongo-php-driver/tests/ini/ini-debug-ini_get-002.phpt
T
Jeremy Mikola cfc6bbbe5d PHPC-1978: Expose mongoc_global_mock_service_id as INI option
This also consolidates INI functions (and trace logging) into a separate file and ensure that mongoc logging is disabled during GSHUTDOWN (avoiding a potential segfault).

Enable service ID mocking when testing load balancers with HAProxy.
2021-10-15 13:44:30 -04:00

25 lines
559 B
PHP

--TEST--
ini_get() reports mongodb.debug (master and local)
--INI--
mongodb.debug=stderr
--FILE--
<?php
/* Note: on Linux, trace logs for _mongoc_linux_distro_scanner_get_distro are
* emitted when mongoc_init is called. We echo an additional line here to avoid
* having "%A" consume the first var_dump() output on Windows. */
echo "mongodb.debug\n";
var_dump(ini_get('mongodb.debug'));
ini_set('mongodb.debug', 'stdout');
var_dump(ini_get('mongodb.debug'));
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
%A
string(6) "stderr"
string(6) "stdout"
===DONE===