diff --git a/tests/unit-tests/plugins/woocommerce-subscriptions/class-subscriptions-meta.php b/tests/unit-tests/plugins/woocommerce-subscriptions/class-subscriptions-meta.php index 5c07a12cfd..3717bce7ac 100644 --- a/tests/unit-tests/plugins/woocommerce-subscriptions/class-subscriptions-meta.php +++ b/tests/unit-tests/plugins/woocommerce-subscriptions/class-subscriptions-meta.php @@ -16,7 +16,7 @@ class Newspack_Test_Subscriptions_Meta extends WP_UnitTestCase { * Setup for the tests. */ public function set_up() { - define( WooCommerce_Subscriptions::NEWSPACK_SUBSCRIPTIONS_EXPIRATION_FEATURE_FLAG, true ); + define( 'NEWSPACK_SUBSCRIPTIONS_EXPIRATION', true ); WooCommerce_Subscriptions::init(); } diff --git a/tests/unit-tests/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php b/tests/unit-tests/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php index 13a80ff005..159c31626a 100644 --- a/tests/unit-tests/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php +++ b/tests/unit-tests/plugins/woocommerce-subscriptions/class-woocommerce-subscriptions.php @@ -22,11 +22,14 @@ public function test_is_active() { /** * Test WooCommerce_Subscriptions::is_enabled. + * + * @runInSeparateProcess + * @preserveGlobalState disabled */ public function test_is_enabled() { $is_active = WooCommerce_Subscriptions::is_enabled(); $this->assertFalse( $is_active, 'WooCommerce Subscriptions integration should be disabled when Feature Flag is not present.' ); - define( WooCommerce_Subscriptions::NEWSPACK_SUBSCRIPTIONS_EXPIRATION_FEATURE_FLAG, true ); + define( 'NEWSPACK_SUBSCRIPTIONS_EXPIRATION', true ); $is_active = WooCommerce_Subscriptions::is_enabled(); $this->assertTrue( $is_active, 'WooCommerce Subscriptions integration should be enabled when Feature Flag is present.' ); }