Hi
Dne Fri, 22 Jul 2011 12:08:22 +0100 Rouslan Placella rouslan@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.