Make e2e php tests more reliable locally

they were depending on the current shop country and shipping settings
This commit is contained in:
Alex P 2023-03-01 16:21:46 +02:00
parent 33bfc32427
commit c08c028471
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -45,6 +45,10 @@ class PurchaseUnitTest extends TestCase
$this->puFactory = $this->container->get( 'api.factory.purchase-unit' );
assert($this->puFactory instanceof PurchaseUnitFactory);
add_filter('woocommerce_get_base_location', function () {
return 'AQ';
});
}
public function tearDown(): void
@ -195,6 +199,7 @@ class PurchaseUnitTest extends TestCase
$product->set_regular_price((string) $data['price']);
$product->set_tax_status('taxable');
$product->set_tax_class('');
$product->set_virtual(true);
$product->save();