[Phpmyadmin-devel] writing unit tests to libraries/sql.lib.php

adam adamgsoc2013 at gmail.com
Wed Jul 24 04:04:52 CEST 2013


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/ed36426b8863645076a3bc6ed6bf88b7de7b6973/test/classes/PMA_TableSearch_test.php#L46

>other better approach to do this.
>Regards Supun.
>

--------------
adam


More information about the Developers mailing list