Skip to content

Commit

Permalink
Fixed unreasonable failing test for RUCSS
Browse files Browse the repository at this point in the history
  • Loading branch information
jeawhanlee committed Jul 26, 2024
1 parent f450e8f commit 3ea850b
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,29 @@ 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 );
add_filter( 'rocket_rucss_hash', [ $this, 'rucss_hash' ] );
}

public function tear_down() {
self::uninstallUsedCssTable();
self::uninstallPreloadCacheTable();

remove_filter( 'rocket_rucss_hash', [ $this, 'rucss_hash' ] );
Expand Down

0 comments on commit 3ea850b

Please sign in to comment.