Description
Minimal theme preparation will ensure that the plugin being checked is in as much isolation as possible.
Acceptance Criteria
- Class
Use_Minimal_Theme_Preparation should be created and exists at includes/Checker/Preparations
- Class
Use_Minimal_Theme_Preparation should extend Preparation interface
- Protected property
$theme_slug and $theme_dir should be there
- Constructor should receive
$theme_slug and $theme_dir as an arguments
prepare() must be implemented from Preparation interface
prepare() method should add necessary hooks/filters to remove theme supports and return cleanups
get_theme_slug() method should be created to get theme slug $theme_slug
get_theme_name() method should use wp_get_theme() to get theme name using $theme_slug & $theme_dir
get_theme_root() method should use get_raw_theme_root() using $theme_slug
Test Coverage
Use_Minimal_Theme_Preparation instance expected to be implementing of Preparation interface
get_theme_slug() method expected to return theme slug provided as argument for class
get_theme_name() method expected to return theme name
get_theme_root() method expected to return theme root dir
prepare() method expected to remove all unnecessary theme features and templates with hooks/filters
Description
Minimal theme preparation will ensure that the plugin being checked is in as much isolation as possible.
Acceptance Criteria
Use_Minimal_Theme_Preparationshould be created and exists atincludes/Checker/PreparationsUse_Minimal_Theme_Preparationshould extendPreparationinterface$theme_slugand$theme_dirshould be there$theme_slugand$theme_diras an argumentsprepare()must be implemented fromPreparationinterfaceprepare()method should add necessary hooks/filters to remove theme supports and return cleanupsget_theme_slug()method should be created to get theme slug$theme_slugget_theme_name()method should usewp_get_theme()to get theme name using$theme_slug&$theme_dirget_theme_root()method should useget_raw_theme_root()using$theme_slugTest Coverage
Use_Minimal_Theme_Preparationinstance expected to be implementing ofPreparationinterfaceget_theme_slug()method expected to return theme slug provided as argument for classget_theme_name()method expected to return theme nameget_theme_root()method expected to return theme root dirprepare()method expected to remove all unnecessary theme features and templates with hooks/filters