Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sathyapulse committed Nov 29, 2024
1 parent 4b294b9 commit 9c0c3db
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/search/includes/classes/test-class-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,13 @@ public function test__ep_skip_post_meta_sync_filter_should_return_false_if_meta_

$this->init_es();

$this->assertFalse( apply_filters( 'ep_skip_post_meta_sync', false, $post, 40, 'random_key', 'random_value' ) );
add_filter( 'ep_do_intercept_request', [ $this, 'filter_ok_es_requests' ], PHP_INT_MAX, 5 );

$result = apply_filters( 'ep_skip_post_meta_sync', false, $post, 40, 'random_key', 'random_value' );

remove_filter( 'ep_do_intercept_request', [ $this, 'filter_ok_es_requests' ], PHP_INT_MAX );

$this->assertFalse( $result );
}

public function test__ep_skip_post_meta_sync_filter_should_return_true_if_a_previous_filter_is_true() {
Expand Down

0 comments on commit 9c0c3db

Please sign in to comment.