Skip to content

Commit

Permalink
Use the constants when able
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmx-dev committed Jul 10, 2024
1 parent e2456a1 commit 9039375
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/unit/test-class-wc-payment-gateway-wcpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -2905,7 +2905,7 @@ public function process_payment_for_order_afterpay_clearpay_provider() {
],
'locale_data' => [
// A missing `required` attribute means that the field will be required.
'US' => [ 'state' => [ 'label' => 'State' ] ],
Country_Code::UNITED_STATES => [ 'state' => [ 'label' => 'State' ] ],
],
'expected_exception' => Invalid_Address_Exception::class,
],
Expand All @@ -2917,10 +2917,9 @@ public function process_payment_for_order_afterpay_clearpay_provider() {
'country' => Country_Code::UNITED_KINGDOM,
],
'locale_data' => [
'GB' => [ 'state' => [ 'required' => false ] ],
Country_Code::UNITED_KINGDOM => [ 'state' => [ 'required' => false ] ],
],
'expected_exception' => null,

],
'without city, GB' => [
'address' => [
Expand All @@ -2930,10 +2929,9 @@ public function process_payment_for_order_afterpay_clearpay_provider() {
'country' => Country_Code::UNITED_KINGDOM,
],
'locale_data' => [
'GB' => [ 'state' => [ 'required' => false ] ],
Country_Code::UNITED_KINGDOM => [ 'state' => [ 'required' => false ] ],
],
'expected_exception' => Invalid_Address_Exception::class,

],
];
}
Expand Down

0 comments on commit 9039375

Please sign in to comment.