Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
burhandodhy committed Mar 22, 2024
1 parent f897b54 commit 739d73a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ function is_integrated_request( $context, $types = [] ) {
}

$is_admin_request = is_admin();
$is_ajax_request = defined( 'DOING_AJAX' ) && DOING_AJAX;
$is_ajax_request = wp_doing_ajax();
$is_rest_request = defined( 'REST_REQUEST' ) && REST_REQUEST;
$is_integrated_admin_request = false;
$is_integrated_ajax_request = false;
Expand Down
4 changes: 2 additions & 2 deletions tests/php/features/TestAutosuggest.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,11 @@ public function test_get_settings_schema() {
/**
* Test whether autosuggest ngram fields apply to the search query when AJAX integration and weighting is enabled.
*
* @since 5.1.o
* @since 5.1.0
* @group autosuggest
*/
public function test_autosuggest_ngram_fields_for_ajax_call() {
define( 'DOING_AJAX', true );
add_filter( 'wp_doing_ajax', '__return_true' );

$this->get_feature()->setup();

Expand Down

0 comments on commit 739d73a

Please sign in to comment.