tests now check for empty arrays first

This commit is contained in:
Nicola Mustone 2015-04-09 16:56:45 +02:00
parent 5815b5f155
commit b8850724d3
1 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,10 @@ class Functions extends \WC_Unit_Test_Case {
* @since 2.4
*/
public function test_wc_get_product_ids_on_sale() {
$this->assertEquals( array(), wc_get_product_ids_on_sale() );
delete_transient( 'wc_products_onsale' );
// Create product
$product = \WC_Helper_Product::create_simple_product();
@ -70,6 +74,10 @@ class Functions extends \WC_Unit_Test_Case {
* @since 2.4
*/
public function test_wc_get_featured_product_ids() {
$this->assertEquals( array(), wc_get_featured_product_ids() );
delete_transient( 'wc_featured_products' );
// Create product
$product = \WC_Helper_Product::create_simple_product();