Skip to content

Commit

Permalink
Added non-built-in shipping provider update test.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisnissle committed Apr 11, 2024
1 parent ded3d22 commit 87b62cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/unit-tests/util/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,15 @@ public function test_install_non_built_in_providers() {

include( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/uninstall.php' );

\Vendidero\Germanized\Shipments\ShippingProvider\Helper::instance()->shipping_providers = null;
remove_all_filters( 'woocommerce_gzd_shipping_provider_class_names' );

update_option( 'woocommerce_gzd_shipments_shipper_address_country', 'AT' );
update_option( 'woocommerce_gzd_dhl_version', '1.0' );
update_option( 'woocommerce_default_country', 'AT' );

var_dump( \Vendidero\Germanized\Shipments\Package::get_base_country() );
var_dump( \Vendidero\Germanized\DHL\Package::has_dependencies() );

WC_GZD_Install::install();

$this->assertEquals( false, wc_gzd_get_shipping_provider( 'dhl' ) );
Expand Down

0 comments on commit 87b62cc

Please sign in to comment.