Skip to content

Commit

Permalink
Disable VIP's alloptions protections during unit testing (#532)
Browse files Browse the repository at this point in the history
* Disable VIPs alloptions protections during unit testing

* Testing CI

* Swap the order to disable alloptions first
  • Loading branch information
srtfisher authored Apr 18, 2024
1 parent 87f24c8 commit 31c8c65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mantle/testing/wordpress-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@
$_SERVER['REQUEST_TIME_FLOAT'] = (float) $_SERVER['REQUEST_TIME_FLOAT'];
}

// Disable VIP's alloptions protections during unit testing.
remove_filter( 'pre_wp_load_alloptions', 'Automattic\\VIP\\Core\\OptionsAPI\\pre_wp_load_alloptions_protections', 999 );

// Delete any default posts & related data.
if ( is_blog_installed() ) {
Utils::delete_all_posts();
Expand Down

0 comments on commit 31c8c65

Please sign in to comment.