Skip to content

Commit 5d4f935

Browse files
committed
Fix flaky logging test
As documented in [RunningTests], tests have to be written to be independent of any php.ini file. Without specifying that no errors should be logged, the php cli server invocation with the invalid address provokes additional diagnostic PHP Warning messages on the diagnostic channel which invalidates the EXPECTF section. This renders the test-case flaky and will make it fail unless `log_errors` is `0`. Fix is to set the directive on the command line. [RunningTests]: docs/source/miscellaneous/running-tests.rst
1 parent 56835cc commit 5d4f935

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sapi/cli/tests/php_cli_server_ipv4_error_message.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $descriptorspec = array(
1919
);
2020

2121
$process = proc_open(
22-
PHP_BINARY . ' -S "192.168.1.999:8080"',
22+
PHP_BINARY . ' -dlog_errors=0 -S "192.168.1.999:8080"',
2323
$descriptorspec,
2424
$pipes
2525
);

0 commit comments

Comments
 (0)