phpmyadmin/phpmyadmin — pull request #460 by ayushchd (2013-06-27 13:07:17+00:00)
Title: Test for Tracker.class.php

- I have added tests for most of the functions of Tracker.class.php

- Also, I haven't added the test case for handleQuery() as it uses calls to itself (self::) Trying to mock dbi for all the cases would again not be a very good idea because of the number of cases the method can generate. The best way around this would be to mock the PMA_Tracker class itself. That would make the test really efficient. However, as mentioned here http://sebastian-bergmann.de/archives/883-Stubbing-and-Mocking-Static-Methods.html .. it is only possible if we use static:: instead of self::