The OOP & refactor project weekly report 9

Hello everyone, during last week I almost finished my work on the TableSearch class and the Table class. A TableSearchController was created for handling table searching operations such as zoom search and replacing search. But unfortunately there still some test failures, I will comment it out and fix it later. Also, I must deeply apologise for lateness in respond to the community during last week.

Files Covered In This Week

  • libraries/controllers/TableSearchController.class.php
  • libraries/Table.class.php
  • libraries/TableSearch.class.php
  • tbl_find_replace.php
  • tbl_select.php
  • tbl_zoom_select.php

Outcomes In This Week

Create the TableSearchController
After analysing the PMA_TableSearch class, we decided to create a controller to handle requests for the search function of tables. I applied similar strategies used on controllers before for tbl_select.php, tbl_zoom_select.php and tbl_replace.php.

Change some member functions in PMA_Table class to non-static
Some static member functions in PMA_Table class like isView() and isMerge() is highly related with specific tables, so it should be associated with an instance of the PMA_Table class. Therefore I made them non-static.

Fix test failures in PMA_Table_test
Test failures came as I converted some member functions to the non-static version. I believe the problem is caused by fault in creating stubs for test, but I can’t still fix it yet since the lack of knowledge on mocking objects in phpunit. If I still cannot fix the test problem before 10:00 am, July 21st 2015, I may comment the tests out first and work on it again after I finish creating templates for structure.lib.php.

What Will I Do Next

I started working on refactoring structure.lib.php. A new PR was opened, and according to the timeline submitted before, I should get it done before July 25th 2015.

The OOP & refactor project weekly report 9

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s