Re: How to EXPECT _error

From: Date: Fri, 17 Apr 2009 10:23:20 +0000
Subject: Re: How to EXPECT _error
References: 1 2  Groups: php.qa 
Request: Send a blank email to php-qa+get-64781@lists.php.net to get a copy of this message
Hi Igor
Hello Alex, From http://qa.php.net/write-test.php (section "Error reporting in tests"): "If your test intentionally generates a PHP warning message use $php_errormsg variable, which you can then output. This will result in a consistent error message output across all platforms and PHP configurations, preventing your test from failing due inconsistencies in the error message content." Weirdly I had never noticed this section before, and now that you point to it I'm not quite sure what it means. I think what Alex had was essentially correct and it is how most of the error case tests are coded. I'm sure I'm missing something obvious....can you (or anyone else) explain the intention of "use $php_errormsg variable..."?
Zoe

« previous php.qa (#64781) next »