From 3ea850be91c4929945f1878b0070a2f944be1b82 Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Fri, 26 Jul 2024 13:22:31 +0100 Subject: [PATCH] Fixed unreasonable failing test for RUCSS --- .../JobManager/Cron/Subscriber/checkJobStatus.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/checkJobStatus.php b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/checkJobStatus.php index e990c5c918..e3087becfc 100644 --- a/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/checkJobStatus.php +++ b/tests/Integration/inc/Engine/Common/JobManager/Cron/Subscriber/checkJobStatus.php @@ -14,10 +14,22 @@ class Test_CheckJobStatus extends FilesystemTestCase { protected $config; + public static function set_up_before_class() { + parent::set_up_before_class(); + + // Install in set_up_before_class because of exists() requiring not temporary table. + self::installUsedCssTable(); + } + + public static function tear_down_after_class() { + self::uninstallUsedCssTable(); + + parent::tear_down_after_class(); + } + public function set_up() { parent::set_up(); - self::installUsedCssTable(); self::installPreloadCacheTable(); add_filter( 'pre_http_request', [ $this, 'mock_http' ], 10, 3 ); @@ -25,7 +37,6 @@ public function set_up() { } public function tear_down() { - self::uninstallUsedCssTable(); self::uninstallPreloadCacheTable(); remove_filter( 'rocket_rucss_hash', [ $this, 'rucss_hash' ] );