[Phpmyadmin-devel] problem in PMA_ConfigTest

In the setUp() of the test class *PMA_ConfigTest *( ./test/classes/PMA_ConfigTest.php ) two objects are created one for testing purpose ($object variable of class) and other as a global variable the test object is initialized with no parameter, while the global one is initialized with "*config.inc.php*" as a parameter, Although it should be initialized with *"config.sample.inc.php" *as this file exist in codebase while former does not. I have pulled a request for the same at https://github.com/phpmyadmin/phpmyadmin/pull/994 But there is a problem I'm facing here, for the global version the assertion for permissions is failing, while it should not .... I can't understand this. Can anyone help? Minhaz cistoner.org

Hi Dne Wed, 5 Mar 2014 17:49:54 +0530 Minhaz A V <minhazav@gmail.com> napsal(a):
In the setUp() of the test class *PMA_ConfigTest *( ./test/classes/PMA_ConfigTest.php ) two objects are created one for testing purpose ($object variable of class) and other as a global variable
the test object is initialized with no parameter, while the global one is initialized with "*config.inc.php*" as a parameter, Although it should be initialized with *"config.sample.inc.php" *as this file exist in codebase while former does not.
Why do you think it should be initialized with existing file? It should be IMHO working configuration, not the sample one.
But there is a problem I'm facing here, for the global version the assertion for permissions is failing, while it should not .... I can't understand this. Can anyone help?
I think that doing assertions on global version is simply wrong. -- Michal Čihař | http://cihar.com | http://phpmyadmin.net

Hi, config.inc.php does not exist in pMA by default so what's the purpose of testing for the same? If we replace it by config.sample.inc.php which exists, we can test for file permissions! behavior of config.sample.inc.php will be similar to how config.inc.php will behave in real scenario! Minhaz cistoner.org On Wed, Mar 5, 2014 at 6:43 PM, Michal Čihař <michal@cihar.com> wrote:
Hi
Dne Wed, 5 Mar 2014 17:49:54 +0530 Minhaz A V <minhazav@gmail.com> napsal(a):
In the setUp() of the test class *PMA_ConfigTest *( ./test/classes/PMA_ConfigTest.php ) two objects are created one for testing purpose ($object variable of class) and other as a global variable
the test object is initialized with no parameter, while the global one is initialized with "*config.inc.php*" as a parameter, Although it should be initialized with *"config.sample.inc.php" *as this file exist in codebase while former does not.
Why do you think it should be initialized with existing file? It should be IMHO working configuration, not the sample one.
But there is a problem I'm facing here, for the global version the assertion for permissions is failing, while it should not .... I can't understand this. Can anyone help?
I think that doing assertions on global version is simply wrong.
-- Michal Čihař | http://cihar.com | http://phpmyadmin.net
------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel

Hi Dne Wed, 5 Mar 2014 20:20:37 +0530 Minhaz A V <minhazav@gmail.com> napsal(a):
config.inc.php does not exist in pMA by default so what's the purpose of testing for the same?
It does not have to exist - phpMyAdmin is supposed to work even without it. So it's valid scenario to test.
If we replace it by config.sample.inc.php which exists, we can test for file permissions! behavior of config.sample.inc.php will be similar to how config.inc.php will behave in real scenario!
Yes, this can be another thing to test. Still it should not be done on global object, but local one which you create for testing. -- Michal Čihař | http://cihar.com | http://phpmyadmin.net

So what do you think shall we have two test objects one with config file / while one without it OR There should be only one test object with config file loaded? Minhaz cistoner.org On Wed, Mar 5, 2014 at 9:30 PM, Michal Čihař <michal@cihar.com> wrote:
Hi
Dne Wed, 5 Mar 2014 20:20:37 +0530 Minhaz A V <minhazav@gmail.com> napsal(a):
config.inc.php does not exist in pMA by default so what's the purpose of testing for the same?
It does not have to exist - phpMyAdmin is supposed to work even without it. So it's valid scenario to test.
If we replace it by config.sample.inc.php which exists, we can test for file permissions! behavior of config.sample.inc.php will be similar to how config.inc.php will behave in real scenario!
Yes, this can be another thing to test. Still it should not be done on global object, but local one which you create for testing.
-- Michal Čihař | http://cihar.com | http://phpmyadmin.net
------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel

Hi, I applied the modifications you were suggesting, but got the same error! What I was basically asking is: *why is no permission being returned in case of Travis Test while it is in my local system?*
participants (2)
-
Michal Čihař
-
Minhaz A V