Fixed wrong tests for Italian postcodes
This commit is contained in:
parent
e2dd7504d0
commit
cba442283c
|
@ -48,12 +48,11 @@ class WC_Tests_Validation extends WC_Unit_Test_Case {
|
|||
* @since 2.4
|
||||
*/
|
||||
public function data_provider_test_is_postcode() {
|
||||
$generic = array(
|
||||
$it = array(
|
||||
array( true, WC_Validation::is_postcode( '99999', 'IT' ) ),
|
||||
array( true, WC_Validation::is_postcode( '99999', 'IT' ) ),
|
||||
array( true, WC_Validation::is_postcode( '9999', 'IT' ) ),
|
||||
array( true, WC_Validation::is_postcode( 'ABC 999', 'IT' ) ),
|
||||
array( true, WC_Validation::is_postcode( 'ABC-999', 'IT' ) ),
|
||||
array( false, WC_Validation::is_postcode( '9999', 'IT' ) ),
|
||||
array( false, WC_Validation::is_postcode( 'ABC 999', 'IT' ) ),
|
||||
array( false, WC_Validation::is_postcode( 'ABC-999', 'IT' ) ),
|
||||
array( false, WC_Validation::is_postcode( 'ABC_123', 'IT' ) ),
|
||||
);
|
||||
|
||||
|
@ -92,7 +91,7 @@ class WC_Tests_Validation extends WC_Unit_Test_Case {
|
|||
array( false, WC_Validation::is_postcode( '0A0A0A', 'CA' ) ),
|
||||
);
|
||||
|
||||
return array_merge( $generic, $gb, $us, $ch, $br, $ca );
|
||||
return array_merge( $it, $gb, $us, $ch, $br, $ca );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue