Add missing hard-stops and parentheses for new objects being instantiated, enabling tests/unit-tests/api/system-status.php to pass coding standard checks
This commit is contained in:
parent
fa42eb0edf
commit
86c449accf
|
@ -76,10 +76,10 @@ class WC_Tests_REST_System_Status extends WC_REST_Unit_Test_Case {
|
|||
$data = $response->get_data();
|
||||
$environment = (array) $data['environment'];
|
||||
|
||||
// Make sure all expected data is present
|
||||
// Make sure all expected data is present.
|
||||
$this->assertEquals( 30, count( $environment ) );
|
||||
|
||||
// Test some responses to make sure they match up
|
||||
// Test some responses to make sure they match up.
|
||||
$this->assertEquals( get_option( 'home' ), $environment['home_url'] );
|
||||
$this->assertEquals( get_option( 'siteurl' ), $environment['site_url'] );
|
||||
$this->assertEquals( WC()->version, $environment['version'] );
|
||||
|
@ -226,7 +226,7 @@ class WC_Tests_REST_System_Status extends WC_REST_Unit_Test_Case {
|
|||
public function test_get_system_tools() {
|
||||
wp_set_current_user( $this->user );
|
||||
|
||||
$tools_controller = new WC_REST_System_Status_Tools_Controller;
|
||||
$tools_controller = new WC_REST_System_Status_Tools_Controller();
|
||||
$raw_tools = $tools_controller->get_tools();
|
||||
|
||||
$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v2/system_status/tools' ) );
|
||||
|
@ -269,7 +269,7 @@ class WC_Tests_REST_System_Status extends WC_REST_Unit_Test_Case {
|
|||
public function test_get_system_tool() {
|
||||
wp_set_current_user( $this->user );
|
||||
|
||||
$tools_controller = new WC_REST_System_Status_Tools_Controller;
|
||||
$tools_controller = new WC_REST_System_Status_Tools_Controller();
|
||||
$raw_tools = $tools_controller->get_tools();
|
||||
$raw_tool = $raw_tools['recount_terms'];
|
||||
|
||||
|
@ -303,7 +303,7 @@ class WC_Tests_REST_System_Status extends WC_REST_Unit_Test_Case {
|
|||
public function test_execute_system_tool() {
|
||||
wp_set_current_user( $this->user );
|
||||
|
||||
$tools_controller = new WC_REST_System_Status_Tools_Controller;
|
||||
$tools_controller = new WC_REST_System_Status_Tools_Controller();
|
||||
$raw_tools = $tools_controller->get_tools();
|
||||
$raw_tool = $raw_tools['recount_terms'];
|
||||
|
||||
|
|
Loading…
Reference in New Issue