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 87b62cc commit 83abbc4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/unit-tests/util/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ public function test_install() {
* Test - install.
*/
public function test_install_non_built_in_providers() {
// Make sure the DHL Package loads - Base country should equal DE.
tests_add_filter( 'woocommerce_gzd_dhl_base_country', function () {
return 'AT';
} );

// clean existing installation first
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
define( 'WP_UNINSTALL_PLUGIN', true );
Expand All @@ -99,10 +104,6 @@ public function test_install_non_built_in_providers() {

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() );

Expand Down

0 comments on commit 83abbc4

Please sign in to comment.