From 6deebfd80314a0d5b532fef654e278d412cc7787 Mon Sep 17 00:00:00 2001 From: Rasmy Nguyen Date: Mon, 25 Nov 2024 13:47:17 -0500 Subject: [PATCH] fix: remove ff constant --- .../woocommerce-subscriptions/class-subscriptions-meta.php | 2 +- .../class-woocommerce-subscriptions.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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.' ); }