From 86c449accfd45c716c00f100dc0c6e510f242f29 Mon Sep 17 00:00:00 2001 From: Steve Grunwell Date: Wed, 17 Jan 2018 22:13:57 +0000 Subject: [PATCH] Add missing hard-stops and parentheses for new objects being instantiated, enabling tests/unit-tests/api/system-status.php to pass coding standard checks --- tests/unit-tests/api/system-status.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit-tests/api/system-status.php b/tests/unit-tests/api/system-status.php index faf4d5dadd7..0fb8b07fae8 100644 --- a/tests/unit-tests/api/system-status.php +++ b/tests/unit-tests/api/system-status.php @@ -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'];