Merge pull request #672 from woocommerce/PCP-681-refund-failed-no-country-given-f

When creating `Address` do not throw but set empty string when no country code is received
This commit is contained in:
Emili Castells 2022-06-14 16:08:17 +02:00 committed by GitHub
commit ceb95952a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 21 deletions

View file

@ -127,21 +127,6 @@ class AddressFactoryTest extends TestCase
$this->assertEquals($expectedPostalCode, $result->postal_code());
}
public function testFromPayPalRequestThrowsError()
{
$testee = new AddressFactory();
$data = (object) [
'address_line_1' => 'shipping_address_1',
'address_line_2' => 'shipping_address_2',
'admin_area_1' => 'shipping_admin_area_1',
'admin_area_2' => 'shipping_admin_area_2',
'postal_code' => 'shipping_postcode',
];
$this->expectException(RuntimeException::class);
$testee->from_paypal_response($data);
}
public function dataFromPayPalRequest() : array
{
return [