On Monday, 8 July 2013 at 8:23 PM, Dieter Adriaenssens wrote:
2013/7/8 Ayush Chaudhary <ayushchd@gmail.com>:On Wednesday, 3 July 2013 at 8:41 PM, Madhura Jayaratne wrote:On Wed, Jul 3, 2013 at 1:59 PM, Ayush Chaudhary <ayushchd@gmail.com> wrote:Hi,On Wednesday, 3 July 2013 at 2:08 PM, Dieter Adriaenssens wrote:2013/7/3 Ayush Chaudhary <ayushchd@gmail.com>:Hi,Is there a reason why validation.lib.php is not a class with public staticmethod? Is it okay to convert it to a class with all methods' accessspecifier as public static?Did you mean the PMA_SQLValidator class inlibraries/sqlvalidator.class.php? I didn't find a validation.lib.php,or something similar, in the PMA codebase, that contains a class.(libraries/config/validate.lib.php doesn't contain a class)Sorry for not being clear. I was referring to the librarylibraries/config/validate.lib.php. I am currently writing tests forlibraries/config/FormDisplay.class.php, and there are numerous calls tofunctions from validate.lib.php which cannot be mocked because they are notcontained in a class. Also, the same issue holds forlibraries/config/FormDisplay.tpl.phpI am in favor of putting these functions into a class as static methods.Waiting for more confirmations :)I agree too.BTW : In an ideal world, everyone on this mailing list, or at leastthe core developers would have voted in favor or against. In practice,if nobody objects within a few days, it is a silent agreement. ;)Kind regards,Dieter Adriaenssens------------------------------------------------------------------------------This SF.net email is sponsored by Windows:Build for Windows Store._______________________________________________Phpmyadmin-devel mailing list