[Phpmyadmin-devel] PHPUnit and our error handler
Marc Delisle
marc at infomarc.info
Mon Jan 14 19:34:24 CET 2013
Rouslan Placella a écrit :
> On 01/14/2013 06:00 PM, Marc Delisle wrote:
>> Hi,
>> I want to modify a test to fit with a modification I am working on. In
>> this modification, the tested function uses $GLOBALS['error_handler'].
>> How can I define this global inside my test?
>
> How about the below code? Totally untested, off the top of my head, but
> should work....
>
> protected function setUp()
> {
> $GLOBALS['error_handler'] = new PMA_Error_Handler();
> }
Thanks. I added this (plus the "require" for the error class) but now I get
Failed asserting that exception of type "PHPUnit_Framework_Error" is
thrown. See attached patch.
--
Marc Delisle
http://infomarc.info
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: marc.diff
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20130114/4dc940f1/attachment.ksh>
More information about the Developers
mailing list