<br><br><div class="gmail_quote">On Mon, May 14, 2012 at 5:30 PM, Chanaka Dharmarathna <span dir="ltr"><<a href="mailto:pe.chanaka.ck@gmail.com" target="_blank">pe.chanaka.ck@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br><br><div class="gmail_quote"><div><div>On Mon, May 14, 2012 at 4:32 PM, Michal Čihař <span dir="ltr"><<a href="mailto:michal@cihar.com" target="_blank">michal@cihar.com</a>></span> wrote:<br></div></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hi<br>
<br>
First of all please try to remove useless quoting in the email, it<br>
makes them easier to read.<br>
<br>
Dne Sun, 13 May 2012 16:04:17 +0530<br>
Chanaka Dharmarathna <<a href="mailto:pe.chanaka.ck@gmail.com" target="_blank">pe.chanaka.ck@gmail.com</a>> napsal(a):<br>
<div><br>
> I set up the testing environment in my machine and now evolving with the<br>
> improvements of unit tests for some modified function.<br>
><br>
> When I run unit test for "PMA_showMessage" function in "common.lib.php"<br>
> file, it gives me some fatal errors. (Call to undefined function<br>
> PMA_warnMissingExtension() ...)<br>
> I used the command : $phpunit<br>
> test/libraries/common/PMA_showMessage_test_disabled.php<br>
><br>
> Do you have any idea on this ?<br>
<br>
</div>Probably the test is missing some includes, many of tests were not<br>
really tested standalone.<br>
<div><div><br>
--<br>
        Michal Čihař | <a href="http://cihar.com" target="_blank">http://cihar.com</a> | <a href="http://blog.cihar.com" target="_blank">http://blog.cihar.com</a><br>
</div></div><br></div></div><div>------------------------------------------------------------------------------<br>
Live Security Virtual Conference<br>
Exclusive live event will cover all the ways today's security and<br>
threat landscape has changed and how IT managers can respond. Discussions<br>
will include endpoint security, mobile security and the latest in malware<br>
threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/" target="_blank">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</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></div></blockquote></div><br>Hi Michal,<br><br>I'll follow your instructions Marc.<br><br>Yes, that is the case. I tried with including around three additional files, but again the error is due to not including some necessary files.<br>


Is there any easier way to run this unit tests independent from the other tests ?<br><br>As well, I'm going to do some modifications regarding to improve readability of the code.<br>For functions which are not too small, I'm going to add one empty line, just after function declaration and just before the end of the function.<br>


<br>Ex :-<br>function PMA_setDisplayMode($params)<br>{<br><br>// function body after empty line<br>----<br>----<br>// end of the function body<br><br>} // end of the function after empty line<br><br>Hope this is more readable. Shall I use this ?<div>

<div><br>
<br clear="all">Regards !<br>-- <br>____________________________________<br><br>Chanaka Indrajith<br>Bsc.Computer Engineering Undergraduate<br>Faculty of Engineering<br>University of Peradeniya<br>Sri Lanka<br>____________________________________<br>


<br>
</div></div></blockquote></div><br>Hi Michal,<br><br>I have introduced two small functions to reduce the code repetition in PMA_getVerticalTable() function in display_tbl.lib.php file.<br>Both functions are using the global variable $vertical_display.<br>

<br>Now I'm trying to implement unit tests for those functions.<br>Since there is global variable, it represent null while run the test.<br>Is there any way to implement test cases for this kind of functions ?<br><br>
As well, is it possible to implement tests for functions like PMA_getTableNavigation() which is return a large string ?<br>If possible, Can you give me some guidance to implement tests for that kind of functions.<br><br>Please note that above function names used in my repository [0].<br>
<br>[0] : <a href="https://github.com/Chanaka/phpmyadmin">https://github.com/Chanaka/phpmyadmin</a><br><br>Regards !<br>-- <br>____________________________________<br><br>Chanaka Indrajith<br>Bsc.Computer Engineering Undergraduate<br>
Faculty of Engineering<br>
University of Peradeniya<br>Sri Lanka<br>____________________________________<br><br>