Added unit tests for #27244

This commit is contained in:
Claudio Sanches 2020-08-12 18:50:25 -03:00
parent 7340c9af44
commit 1839feae91
1 changed files with 9 additions and 1 deletions

View File

@ -123,7 +123,15 @@ class WC_Tests_Validation extends WC_Unit_Test_Case {
array( false, WC_Validation::is_postcode( '7850', 'BA' ) ),
);
return array_merge( $it, $gb, $us, $ch, $br, $ca, $nl, $si, $ba );
$jp = array(
array( true, WC_Validation::is_postcode( '1340088', 'JP' ) ),
array( true, WC_Validation::is_postcode( '134-0088', 'JP' ) ),
array( false, WC_Validation::is_postcode( '1340-088', 'JP' ) ),
array( false, WC_Validation::is_postcode( '12345', 'JP' ) ),
array( false, WC_Validation::is_postcode( '0123', 'JP' ) ),
);
return array_merge( $it, $gb, $us, $ch, $br, $ca, $nl, $si, $ba, $jp );
}
/**