[Phpmyadmin-devel] Continuous integration

Michal Čihař michal at cihar.com
Fri Jul 22 14:50:09 CEST 2011


Hi

Dne Fri, 22 Jul 2011 12:08:22 +0100
Rouslan Placella <rouslan at placella.com> napsal(a):

> Now, as far as the tests themselves, there is an issue in a few tests
> where I had to use some hackish code to get the tests to run. For
> example, in PMA_RTN_getQueryFromRequest_test.php I have this piece of
> art:
> 
> ------ >% ------
> $cfg['ShowFunctionFields'] = false;
> eval(substr(file_get_contents('libraries/data_mysql.inc.php'), 5, -3));
> ------ >% ------
> 
> Here's what I think is the problem here: data_mysql.inc.php is included
> in some other file before this test is run and then $cfg['ColumnTypes']
> is also unset in some other test. So when it's my turn to run a test,
> simply using require_once does nothing since that file was already
> executed before :(
> 
> Again, not sure if this can/should be fixed, but I thought that it's
> worth a mention.

I think better solution would be to use setup() method for this and
include (not include_once), possibly with unset before to ensure you
have clean environment. This is always problem with php files defining
data rather than code.

-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20110722/0ab64448/attachment.sig>


More information about the Developers mailing list