Skip to content

Commit

Permalink
Fix the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-vlasenko authored and Anton Vlasenko committed Nov 19, 2024
1 parent 9aa4912 commit 47c2eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/phpunit/tests/rest-api/rest-users-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -3226,7 +3226,7 @@ public function test_get_items_returns_only_fetches_ids_for_head_requests( $meth

global $wpdb;
$users_table = preg_quote( $wpdb->users, '/' );
$pattern = '/SELECT SQL_CALC_FOUND_ROWS wptests_users.ID\n\s+FROM\s+' . $users_table . '\n\s+WHERE 1=1/is';
$pattern = '/SELECT SQL_CALC_FOUND_ROWS wptests_users.ID\n\s+FROM\s+' . $users_table . '/is';

// Assert that the SQL query only fetches the id column.
$this->assertMatchesRegularExpression( $pattern, $query->request, 'The SQL query does not match the expected string.' );
Expand Down

0 comments on commit 47c2eb2

Please sign in to comment.