Tests
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user