Rename WC_Rest_Settings_Controller to WC_Rest_Settings_Options_Controller.

This commit is contained in:
Jeff Stieler 2016-06-16 14:11:50 -06:00 committed by Justin Shreve
parent e14d77a987
commit f168f356bc
3 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
* @version 2.7.0
* @since 2.7.0
*/
class WC_Rest_Settings_Controller extends WC_REST_Settings_API_Controller {
class WC_Rest_Settings_Options_Controller extends WC_REST_Settings_API_Controller {
/**
* WP REST API namespace/version.

View File

@ -164,7 +164,7 @@ class WC_API extends WC_Legacy_API {
include_once( 'api/class-wc-rest-report-sales-controller.php' );
include_once( 'api/class-wc-rest-report-top-sellers-controller.php' );
include_once( 'api/class-wc-rest-reports-controller.php' );
include_once( 'api/class-wc-rest-settings-controller.php' );
include_once( 'api/class-wc-rest-settings-options-controller.php' );
include_once( 'api/class-wc-rest-settings-groups-controller.php' );
include_once( 'api/class-wc-rest-tax-classes-controller.php' );
include_once( 'api/class-wc-rest-taxes-controller.php' );
@ -194,7 +194,7 @@ class WC_API extends WC_Legacy_API {
'WC_REST_Report_Sales_Controller',
'WC_REST_Report_Top_Sellers_Controller',
'WC_REST_Reports_Controller',
'WC_Rest_Settings_Controller',
'WC_Rest_Settings_Options_Controller',
'WC_REST_Settings_Groups_Controller',
'WC_REST_Tax_Classes_Controller',
'WC_REST_Taxes_Controller',

View File

@ -17,7 +17,7 @@ class Settings extends WC_Unit_Test_Case {
global $wp_rest_server;
$this->server = $wp_rest_server = new WP_Test_Spy_REST_Server;
do_action( 'rest_api_init' );
$this->endpoint = new WC_Rest_Settings_Controller();
$this->endpoint = new WC_Rest_Settings_Options_Controller();
WC_Helper_Settings::register();
$this->user = $this->factory->user->create( array(
'role' => 'administrator',
@ -407,7 +407,7 @@ class Settings extends WC_Unit_Test_Case {
* Tests the GET single setting route handler encountering an invalid setting type.
*/
public function test_get_setting_invalid_setting_type() {
$controller = $this->getMock( 'WC_Rest_Settings_Controller', array( 'get_group_settings', 'is_setting_type_valid' ) );
$controller = $this->getMock( 'WC_Rest_Settings_Options_Controller', array( 'get_group_settings', 'is_setting_type_valid' ) );
$controller
->expects( $this->any() )
@ -463,7 +463,7 @@ class Settings extends WC_Unit_Test_Case {
/**
* Test updating a bad setting ID.
* @since 2.7.0
* @covers WC_Rest_Settings_Controller::update_item
* @covers WC_Rest_Settings_Options_Controller::update_item
*/
public function test_update_setting_bad_setting_id() {
wp_set_current_user( $this->user );