Re: RFC: run-tests.php & errors/warnings

From: Date: Tue, 29 Oct 2002 15:49:02 +0000
Subject: Re: RFC: run-tests.php & errors/warnings
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-90267@lists.php.net to get a copy of this message
At 16:14 29.10.2002, Ilia A. wrote:
On October 29, 2002 09:52 am, Marcus Boerger wrote: 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. Agreed, however in 99% of the cases the data which is being outputted is what matters. As long as it is the same data as the one we expect, all the warnings/notices are irrelevant, imho. That said, ideally the tests should not cause warnings/notices, unless of course, the purpose of the test is to see if a warning/notice message will be generated. In the event a needed warning is generated, the track_errors & $php_errormsg facility should be used to display the error (we already enable tracking of errors by default). Adding @ to block the errors is not a good approach imho, the warning should be displayed and accounted for in the expected output. Remark 1: "auto_append_file=" & "auto_prepend_file=" currently do not work but that is another thread. Seems to work just fine here.
Try looking at some generated messages. I allways get <font...>message</font> which is the default. And looking into the source i saw that OnUpdateStringUnempty is used.
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. The tests can only be performed using the cgi/cli sapis since they require a command line PHP binary. So, this is a non-issue. If we must display error messages then I would prefer using display_errors=1 instead of log_errors=1. Ilia


« previous php.dev (#90267) next »