Skip to content

Commit

Permalink
AHHH LINT
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum committed Jan 28, 2025
1 parent e990232 commit c2dafad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 3 additions & 4 deletions tests/files/test-wp-filesystem-vip.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,9 @@ public function test_move_with_no_filesystem(): void {
self::assertInstanceOf( WP_Filesystem_VIP::class, $wp_filesystem );
/** @var WP_Filesystem_Base $wp_filesystem */

$tmp = get_temp_dir();
$source = $tmp . 'source.txt';
$dest = $tmp . 'dest.txt';
g.
$tmp = get_temp_dir();
$source = $tmp . 'source.txt';
$dest = $tmp . 'dest.txt';
$original = error_reporting();
try {
$actual = $wp_filesystem->move( $source, $dest );
Expand Down
9 changes: 6 additions & 3 deletions tests/search/includes/classes/test-class-queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,15 +743,15 @@ public function test_ratelimit_indexing_cache_count_should_not_exists_if_early_r
* Ensure that the queue isn't populated if ratelimiting isn't triggered
*/
public function test_ratelimit_indexing_queue_should_be_empty_if_no_ratelimiting() {
$this->queue::$max_indexing_op_count = PHP_INT_MAX; // Ensure ratelimiting is disabled
$post_ids = range( 10, 20 );

global $wpdb;

$table_name = $this->queue->schema->get_table_name();

$this->add_posts_to_queue( range( 3, 9 ) );

// phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found
$this->queue::$max_indexing_op_count = PHP_INT_MAX; // Ensure ratelimiting is disabled

$this->queue->ratelimit_indexing( true, $this->sync_manager, 'post' );

$this->assertEquals( 7, wp_cache_get( $this->queue::INDEX_COUNT_CACHE_KEY, $this->queue::INDEX_COUNT_CACHE_GROUP ), 'indexing ops count should be 7' );
Expand All @@ -769,6 +769,8 @@ public function test_ratelimit_indexing_queue_should_be_empty_if_no_ratelimiting

$this->sync_manager->reset_sync_queue();

// phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found
$post_ids = range( 10, 20 );
$this->add_posts_to_queue( $post_ids );

$this->queue->ratelimit_indexing( true, $this->sync_manager, 'post' );
Expand Down Expand Up @@ -804,6 +806,7 @@ public function test_ratelimit_indexing_queue_should_be_populated_if_ratelimitin
$post_ids = range( 3, 9 );
$this->add_posts_to_queue( $post_ids );

// phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found
$this->queue::$max_indexing_op_count = 0; // Ensure ratelimiting is enabled

$this->queue->ratelimit_indexing( true, $this->sync_manager, 'post' );
Expand Down

0 comments on commit c2dafad

Please sign in to comment.