From fb9aa71b336b04183b27a1cce8cb2a041fe4c18c Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Thu, 19 Jul 2018 09:59:39 -0300 Subject: [PATCH] Undoing DB changes on tearDown() is not necessary WP test suite starts a transaction when the test starts and roll it back when the test finishes. So it is not necessary to undo database changes using tearDown(). --- tests/unit-tests/formatting/functions.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/unit-tests/formatting/functions.php b/tests/unit-tests/formatting/functions.php index dd71af63365..7040792e49e 100644 --- a/tests/unit-tests/formatting/functions.php +++ b/tests/unit-tests/formatting/functions.php @@ -12,12 +12,6 @@ */ class WC_Tests_Formatting_Functions extends WC_Unit_Test_Case { - public function tearDown() { - update_option( 'woocommerce_price_num_decimals', '2' ); - update_option( 'woocommerce_price_decimal_sep', '.' ); - update_option( 'woocommerce_price_thousand_sep', ',' ); - } - /** * Test wc_string_to_bool(). *