diff --git a/plugins/woocommerce/tests/legacy/unit-tests/formatting/functions.php b/plugins/woocommerce/tests/legacy/unit-tests/formatting/functions.php index 5c918148eea..e613d9341ed 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/formatting/functions.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/formatting/functions.php @@ -801,12 +801,6 @@ class WC_Tests_Formatting_Functions extends WC_Unit_Test_Case { // JP postcode. $this->assertEquals( '999-9999', wc_format_postcode( '9999999', 'JP' ) ); - // Test LV postcode without mandatory country code. - $this->assertEquals( 'LV-1337', wc_format_postcode( '1337', 'LV' ) ); - - // Test LV postcode with incorrect format (no dash). - $this->assertEquals( 'LV-1337', wc_format_postcode( 'lv1337', 'LV' ) ); - // Test empty NL postcode. $this->assertEquals( '', wc_format_postcode( '', 'NL' ) ); } diff --git a/plugins/woocommerce/tests/php/includes/wc-formatting-functions-test.php b/plugins/woocommerce/tests/php/includes/wc-formatting-functions-test.php index 9252e6e3d55..6670e65de0f 100644 --- a/plugins/woocommerce/tests/php/includes/wc-formatting-functions-test.php +++ b/plugins/woocommerce/tests/php/includes/wc-formatting-functions-test.php @@ -43,6 +43,12 @@ class WC_Formatting_Functions_Test extends \WC_Unit_Test_Case { // JP postcode. $this->assertEquals( '999-9999', wc_format_postcode( '9999999', 'JP' ) ); + // Test LV postcode without mandatory country code. + $this->assertEquals( 'LV-1337', wc_format_postcode( '1337', 'LV' ) ); + + // Test LV postcode with incorrect format (no dash). + $this->assertEquals( 'LV-1337', wc_format_postcode( 'lv1337', 'LV' ) ); + // Test empty NL postcode. $this->assertEquals( '', wc_format_postcode( '', 'NL' ) ); }