I think we need to discuss the behaviour of run-tests.php
according too error/warning handling a bit.

First question (let me know if i am wrong): Any error/warning/
notice in a test result is either expected or a real error.

To make that clear: Yes some tests failed after i made those
visible but then i fixed the real problem and now there are no
more warnings.

Solution:
Enable error reporting for any error/warning/notice etc. in
run-tests.php and use the following where necessary

a) Disable messages in --INI-- section of a test.
When notices are expected "E_ALL & ~ E_NOTICE" can
be set as error_reporting=2039

b) Use "@" in conjunction with $php_errormsg.
--INI--
track_errors=1
display_erros=1
log_errors=0
--FILE--
@erroneous_function_call();
echo "$php_errormsg\n";
--EXPECT--
Error message generated by error_prepend_string & error_append_string

c) Magically add "echo $php_errormsg;" after each --FILE-- section in run-tests.php
But this is already condidered a bad&dirty solution.

So my RFC is to use the following overwrites in run-test.phpt:

error_reporting=2047
display_errors=1
log_errors=0
html_errors=0
track_errors=1
report_memleaks=1
docref_root=/phpmanual/
docref_ext=.html
error_log=
error_prepend_string=
error_append_string=
auto_append_file=
auto_prepend_file=

Remark 1: "auto_append_file=" & "auto_prepend_file=" currently do not work but that is
another thread.

Remark 2: We could instead use the log_errors and direct them to the output
with the following changes to above settings:
display_errors=0
log_errors=1

The output would be nicer but when we go to test other sapis than CGI/CLI this won't
work anymore.

marcus


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to