@@ -743,15 +743,15 @@ public function test_ratelimit_indexing_cache_count_should_not_exists_if_early_r
743
743
* Ensure that the queue isn't populated if ratelimiting isn't triggered
744
744
*/
745
745
public function test_ratelimit_indexing_queue_should_be_empty_if_no_ratelimiting () {
746
- $ this ->queue ::$ max_indexing_op_count = PHP_INT_MAX ; // Ensure ratelimiting is disabled
747
- $ post_ids = range ( 10 , 20 );
748
-
749
746
global $ wpdb ;
750
747
751
748
$ table_name = $ this ->queue ->schema ->get_table_name ();
752
749
753
750
$ this ->add_posts_to_queue ( range ( 3 , 9 ) );
754
751
752
+ // phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found
753
+ $ this ->queue ::$ max_indexing_op_count = PHP_INT_MAX ; // Ensure ratelimiting is disabled
754
+
755
755
$ this ->queue ->ratelimit_indexing ( true , $ this ->sync_manager , 'post ' );
756
756
757
757
$ this ->assertEquals ( 7 , wp_cache_get ( $ this ->queue ::INDEX_COUNT_CACHE_KEY , $ this ->queue ::INDEX_COUNT_CACHE_GROUP ), 'indexing ops count should be 7 ' );
@@ -769,6 +769,8 @@ public function test_ratelimit_indexing_queue_should_be_empty_if_no_ratelimiting
769
769
770
770
$ this ->sync_manager ->reset_sync_queue ();
771
771
772
+ // phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found
773
+ $ post_ids = range ( 10 , 20 );
772
774
$ this ->add_posts_to_queue ( $ post_ids );
773
775
774
776
$ this ->queue ->ratelimit_indexing ( true , $ this ->sync_manager , 'post ' );
@@ -804,6 +806,7 @@ public function test_ratelimit_indexing_queue_should_be_populated_if_ratelimitin
804
806
$ post_ids = range ( 3 , 9 );
805
807
$ this ->add_posts_to_queue ( $ post_ids );
806
808
809
+ // phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found
807
810
$ this ->queue ::$ max_indexing_op_count = 0 ; // Ensure ratelimiting is enabled
808
811
809
812
$ this ->queue ->ratelimit_indexing ( true , $ this ->sync_manager , 'post ' );
0 commit comments