diff --git a/tests/Unit/API/Site/Controllers/CountryCodeTraitTest.php b/tests/Unit/API/Site/Controllers/CountryCodeTraitTest.php index e39d35bbf2..7675c91efc 100644 --- a/tests/Unit/API/Site/Controllers/CountryCodeTraitTest.php +++ b/tests/Unit/API/Site/Controllers/CountryCodeTraitTest.php @@ -127,10 +127,7 @@ public function test_all_get_validate_callbacks_with_rest_validate_request_arg() * Test a sanitized country code with a string. */ public function test_get_country_code_sanitize_callback_with_string() { - $callback = $this->trait->get_country_code_sanitize_callback(); - $result = $callback( 'us' ); - - $this->assertEquals( 'US', $result ); + $this->assertEquals( 'US', $this->trait->get_country_code_sanitize_callback()( 'us' ) ); } /**