[Phpmyadmin-devel] writing unit tests to libraries/sql.lib.php
adamgsoc2013 at gmail.com
Wed Jul 24 07:36:24 CEST 2013
>On Wed, Jul 24, 2013 at 7:34 AM, adam <adamgsoc2013 at gmail.com> wrote:
>> Hi Supun,
>> >I am trying to write unit tests sql.lib.php. In that I want to create an
>> >instance of the database interface (GLOBALS['dbi']) to test methods by
>> >executing queries. I tried to do it by including
>> >"libraries/database_interface.inc.php" but I get an error telling
>> >"Undefined index: Server". Am I doing something wrong here or is there any
>> It is because UT has a more strict syntax.
>> see this to fix the "Undefined index: Server"
>> Hi Adam,
>I tried your suggestion. But still I am getting the same error. The link
>for the example code that I am trying to implement is . I would
>appreciate if you can check it.
> - http://pastebin.com/v6dnJUNt
I just gave you a example to fix this kind of error about "undefine index".
look at the error when I run your case:
the code is here: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/DatabaseInterface.class.php#L792
so you should define "$GLOBALS['cfg']['Server']['DisableIS']" on the setup function.
More information about the Developers