Unit test warnings
This commit is contained in:
parent
5ec8ef50e6
commit
98b79ddf5b
|
@ -30,7 +30,8 @@ class WC_API_Unit_Test_Case extends WC_Unit_Test_Case {
|
|||
$_SERVER['REQUEST_METHOD'] = null;
|
||||
|
||||
// mock the API server to prevent headers from being sent
|
||||
$this->mock_server = $this->getMock( 'WC_API_Server', array( 'header' ), array( '/' ) );
|
||||
// $this->mock_server = $this->getMock( 'WC_API_Server', array( 'header' ), array( '/' ) );
|
||||
$this->mock_server = $this->getMockBuilder( 'WC_API_Server' )->setMethods( array( 'header' ) )->disableOriginalConstructor()->getMock();
|
||||
|
||||
WC()->api->register_resources( $this->mock_server );
|
||||
}
|
||||
|
|
|
@ -373,7 +373,8 @@ class Settings extends WC_REST_Unit_Test_Case {
|
|||
* @since 2.7.0
|
||||
*/
|
||||
public function test_get_setting_invalid_setting_type() {
|
||||
$controller = $this->getMock( 'WC_Rest_Settings_Options_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 = $this->getMockBuilder( 'WC_Rest_Settings_Options_Controller' )->setMethods( array( 'get_group_settings', 'is_setting_type_valid' ) )->getMock();
|
||||
|
||||
$controller
|
||||
->expects( $this->any() )
|
||||
|
|
|
@ -21,7 +21,8 @@ class WC_Tests_Register_WP_Admin_Settings extends WC_Unit_Test_Case {
|
|||
public function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
$mock_page = $this->getMock( 'WC_Settings_General' );
|
||||
// $mock_page = $this->getMock( 'WC_Settings_General' );
|
||||
$mock_page = $this->getMockBuilder( 'WC_Settings_General' )->getMock();
|
||||
|
||||
$mock_page
|
||||
->expects( $this->any() )
|
||||
|
|
Loading…
Reference in New Issue