Hi,
On Tue, Jun 3, 2014 at 5:11 PM, Chirayu Chiripal <chirayu.chiripal(a)gmail.com
wrote:
> Hi,
>
>
>
> On Tue, Jun 3, 2014 at 12:15 PM, Dhananjay Nakrani <
> dhananjaynakrani(a)gmail.com
wrote:
>
>> Hello everyone,
>>
>> I'm trying to fix the failing tests for the code I developed. I need a
>> little help from the community in it.
>>
>> I am providing appropriate new data in the data provider in
>> 'PMA_Error_Handler_Test::providerForTestHandleError()' [0]. That data
>> contains a string with empty single quotes ('') in it (see, Line#98 [1]
>> ). So, I escaped it with backslash (\) and passed it as (\'\'). But that
>> gives a very weird behavior. See Line#342 [2] of the log where it starts
>> repeating the string again in itself. It seems to be going in recursion
>> somewhere.
>>
>> Am I doing anything wrong Or is it just a bug in PHPUnit?
>> Is there anyway I can fix this??
>>
>>
>> [0]:
>>
https://github.com/dhananjay92/phpmyadmin/blob/dhananjay-gsoc-dev/test/clas…
>> [1]:
>>
https://github.com/dhananjay92/phpmyadmin/blob/dhananjay-gsoc-dev/test/clas…
>> [2]:
https://travis-ci.org/dhananjay92/phpmyadmin/jobs/26636648#L342
>>
>>
>> Thanks,
>> Dhananjay Nakrani.
>>
>>
> I don't think its a bug in PHPUnit. Its happening because of backtrace
> information part in error handler due to which whatever parameters you are
> passing to testGetDispErrorsForDisplayFalse() will reappear in $output in
> backtrace section. Moreover, the parameters will be converted using
> htmlspecialchars(). As the 6th parameter ($output_hide) of the function
> contains html tags it will get converted by htmlspecialchars and then added
> to the $output (this is the thing that appears at L342 of [2] you mentioned
> before). So, you have to change your 6th parameter of data set #0 so that
> it does not contain html tags. Note that you cannot even replace your
> parameter with htmlspecialchars() equivalent string like string containing
> < or > because each '&' of that string will again be
replaced by
> & again and again. Hence, change your test data accordingly.
>
>
Ohh, Okay. Now understood the problem. Thank you very much.
--
Regards,
Chirayu Chiripal
phpMyAdmin Intern - Google Summer of Code 2014
https://chirayuchiripal.wordpress.com/
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Phpmyadmin-devel mailing list
Phpmyadmin-devel(a)lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Thanks,
Dhananjay Nakrani.