|
From: Jason S. <jsw...@ya...> - 2004-02-14 00:43:05
|
--- Jeff Moore <je...@pr...> wrote:
> Hello,
>
> I'm having some trouble writing tests for some code that uses the error
> suppression operator (@).
>
> My problem is that simpletest records ALL errors, even ones that the
> code explicitly suppresses using the error suppression operator.
IIRC, this is a problem with _ALL_ custom error handlers. All errors are
passed, even with the suppresion operator in place. I recall this came up on
the smarty list a while back, but I do not remember the resolution. Might try
to google and see if you can find anything regarding error suppression and
custom error handlers.
>
> I am getting cascades of unimportant errors that cause my test to
> indicate failure when I don't consider it to have failed.
>
> Adding the following to simpleTestErrorHandler clears up the problem
> and the test passes.
>
> if ( ( $severity & error_reporting() ) != $severity ) {
> return; // Ignore this error because of error suppression
> }
>
> Any suggestions on how to proceed?
>
> Jeff
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Simpletest-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simpletest-support
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
|