Reset notices at the start of each test

This commit is contained in:
Jonathan Sadowski 2020-04-24 14:21:03 -05:00
parent 3f47608228
commit c0a72c9185
1 changed files with 3 additions and 0 deletions

View File

@ -2059,6 +2059,7 @@ class WC_Tests_Cart extends WC_Unit_Test_Case {
add_filter( 'woocommerce_add_to_cart_redirect', '__return_false' );
update_option( 'woocommerce_cart_redirect_after_add', 'no' );
WC()->cart->empty_cart();
WC()->session->set( 'wc_notices', null );
$product = WC_Helper_Product::create_variation_product();
$variations = $product->get_available_variations();
@ -2109,6 +2110,7 @@ class WC_Tests_Cart extends WC_Unit_Test_Case {
add_filter( 'woocommerce_add_to_cart_redirect', '__return_false' );
update_option( 'woocommerce_cart_redirect_after_add', 'no' );
WC()->cart->empty_cart();
WC()->session->set( 'wc_notices', null );
$product = WC_Helper_Product::create_variation_product();
$variations = $product->get_available_variations();
@ -2139,6 +2141,7 @@ class WC_Tests_Cart extends WC_Unit_Test_Case {
add_filter( 'woocommerce_add_to_cart_redirect', '__return_false' );
update_option( 'woocommerce_cart_redirect_after_add', 'no' );
WC()->cart->empty_cart();
WC()->session->set( 'wc_notices', null );
$product = WC_Helper_Product::create_variation_product();
$variations = $product->get_available_variations();