Skip to content

Commit 9345ea7

Browse files
committed
Use zero for pre-flighting the RTC option, see get_option().
1 parent 558257b commit 9345ea7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/phpunit/tests/rest-api/rest-autosaves-controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ public function test_rest_autosave_published_post() {
570570
}
571571

572572
public function test_rest_autosave_draft_post_same_author() {
573-
add_filter( 'pre_option_wp_enable_real_time_collaboration', '__return_false' );
573+
add_filter( 'pre_option_wp_enable_real_time_collaboration', '__return_zero' ); // Zero as false doesn't work for pre-flight options.
574574

575575
wp_set_current_user( self::$editor_id );
576576

@@ -746,7 +746,7 @@ public function test_get_item_sets_up_postdata() {
746746
}
747747

748748
public function test_update_item_draft_page_with_parent() {
749-
add_filter( 'pre_option_wp_enable_real_time_collaboration', '__return_false' );
749+
add_filter( 'pre_option_wp_enable_real_time_collaboration', '__return_zero' ); // Zero as false doesn't work for pre-flight options.
750750

751751
wp_set_current_user( self::$editor_id );
752752
$request = new WP_REST_Request( 'POST', '/wp/v2/pages/' . self::$child_draft_page_id . '/autosaves' );

0 commit comments

Comments
 (0)