Hi, 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 other better approach to do this. Regards Supun.
Hi Supun,
Hi, 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"
https://github.com/adamgsoc2013/phpmyadmin/blob/ed36426b8863645076a3bc6ed6bf...
other better approach to do this. Regards Supun.
-------------- adam
On Wed, Jul 24, 2013 at 7:34 AM, adam adamgsoc2013@gmail.com wrote:
Hi Supun,
Hi, 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"
https://github.com/adamgsoc2013/phpmyadmin/blob/ed36426b8863645076a3bc6ed6bf...
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 [1]. I would appreciate if you can check it.
[1] - http://pastebin.com/v6dnJUNt
other better approach to do this. Regards Supun.
adam
See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clk... _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Hi,
On Wed, Jul 24, 2013 at 7:34 AM, adam adamgsoc2013@gmail.com wrote:
Hi Supun,
Hi, 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"
https://github.com/adamgsoc2013/phpmyadmin/blob/ed36426b8863645076a3bc6ed6bf...
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 [1]. I would appreciate if you can check it.
I just gave you a example to fix this kind of error about "undefine index".
look at the error when I run your case: libraries\DatabaseInterface.class.php:792 the code is here: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/DatabaseInter...
so you should define "$GLOBALS['cfg']['Server']['DisableIS']" on the setup function.
adam