Skip to content

Commit

Permalink
Simplify test_get_country_code_sanitize_callback_with_string test c…
Browse files Browse the repository at this point in the history
…ase code to a single line.


Ref: #2004 (comment)

Co-authored-by: martynmjones <[email protected]>
  • Loading branch information
eason9487 and martynmjones authored Jul 4, 2023
1 parent 189fdfe commit 575d90e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/Unit/API/Site/Controllers/CountryCodeTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );
}

/**
Expand Down

0 comments on commit 575d90e

Please sign in to comment.