This commit is contained in:
Almira Krdzic
2018-09-19 10:52:59 +02:00
parent cae148ebce
commit 85deb1d9f8
11 changed files with 798 additions and 14 deletions

View File

@@ -13,12 +13,12 @@ class Wiaas_Countries_Test extends Wiaas_Unit_Test_Case {
# set admin as current user
wp_set_current_user(1);
$this->product = $this->insertNewProduct();
$this->product = $this->create_new_product();
wp_set_object_terms($this->product->get_id(), $this->current_country, 'product_country', false);
clean_object_term_cache( $this->product->get_id(), 'product_country' );
$this->package = $this->insertNewPackage();
$this->package = $this->create_new_package();
wp_set_object_terms($this->package->get_id(), $this->current_country, 'product_country', false);
clean_object_term_cache( $this->package->get_id(), 'product_country' );
}
@@ -39,9 +39,9 @@ class Wiaas_Countries_Test extends Wiaas_Unit_Test_Case {
$this->assertNotEmpty($country_names);
$this->assertTrue(in_array('Sweden', $country_names));
$this->assertTrue(in_array('Denmark', $country_names));
$this->assertTrue(in_array('Finland', $country_names));
$this->assertContains('Sweden', $country_names);
$this->assertContains('Denmark', $country_names);
$this->assertContains('Finland', $country_names);
}
/**