<div dir="ltr">Hi,<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 3, 2014 at 5:11 PM, Chirayu Chiripal <span dir="ltr"><<a href="mailto:chirayu.chiripal@gmail.com" target="_blank">chirayu.chiripal@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><div><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 3, 2014 at 12:15 PM, Dhananjay Nakrani <span dir="ltr"><<a href="mailto:dhananjaynakrani@gmail.com" target="_blank">dhananjaynakrani@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello everyone,<div><br></div><div>I'm trying to fix the failing tests for the code I developed. I need a little help from the community in it.</div>
<div><br></div><div>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 (<font face="courier new, monospace">''</font>) in it (see, Line#98 [1] ). So, I escaped it with backslash (\) and passed it as (<font face="courier new, monospace">\'\'</font>). 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. </div>
<div><br></div><div>Am I doing anything wrong Or is it just a bug in PHPUnit? </div><div>Is there anyway I can fix this??</div><div><br></div><div><br></div><div>[0]: <a href="https://github.com/dhananjay92/phpmyadmin/blob/dhananjay-gsoc-dev/test/classes/PMA_Error_Handler_test.php#L87" target="_blank">https://github.com/dhananjay92/phpmyadmin/blob/dhananjay-gsoc-dev/test/classes/PMA_Error_Handler_test.php#L87</a></div>
<div>[1]: <a href="https://github.com/dhananjay92/phpmyadmin/blob/dhananjay-gsoc-dev/test/classes/PMA_Error_Handler_test.php#L98" target="_blank">https://github.com/dhananjay92/phpmyadmin/blob/dhananjay-gsoc-dev/test/classes/PMA_Error_Handler_test.php#L98</a></div>
<div>[2]: <a href="https://travis-ci.org/dhananjay92/phpmyadmin/jobs/26636648#L342" target="_blank">https://travis-ci.org/dhananjay92/phpmyadmin/jobs/26636648#L342</a></div><div><br></div><div><br></div><div>Thanks,</div>
<div>
Dhananjay Nakrani.</div>
</div>
<br></blockquote></div><br clear="all"></div></div></div><div class="gmail_extra">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.<span><font color="#888888"><br>
<br></font></span></div></div></blockquote><div><br></div><div>Ohh, Okay. Now understood the problem. Thank you very much.</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><span><font color="#888888"></font></span></div><span><font color="#888888"><div class="gmail_extra">-- <br><div dir="ltr">Regards,<br>Chirayu Chiripal<br>phpMyAdmin Intern - Google Summer of Code 2014<br>
<a href="https://chirayuchiripal.wordpress.com/" target="_blank">https://chirayuchiripal.wordpress.com/</a><br>
</div>
</div></font></span></div>
<br>------------------------------------------------------------------------------<br>
Learn Graph Databases - Download FREE O'Reilly Book<br>
"Graph Databases" is the definitive new guide to graph databases and their<br>
applications. Written by three acclaimed leaders in the field,<br>
this first edition is now available. Download your free book today!<br>
<a href="http://p.sf.net/sfu/NeoTech" target="_blank">http://p.sf.net/sfu/NeoTech</a><br>_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net" target="_blank">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
<br></blockquote></div><div class="gmail_extra"><br></div>Thanks,</div><div class="gmail_extra">Dhananjay Nakrani.</div></div>