Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the hardcoded table name in WP_Test_REST_Users_Controller::test_get_items_only_fetches_ids_for_head_requests. #8614

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -3300,7 +3300,7 @@ public function test_get_items_only_fetches_ids_for_head_requests( $method ) {

global $wpdb;
$users_table = preg_quote( $wpdb->users, '/' );
$pattern = '/SELECT SQL_CALC_FOUND_ROWS wptests_users.ID\n\s+FROM\s+' . $users_table . '/is';
$pattern = '/^SELECT\s+SQL_CALC_FOUND_ROWS\s+' . $users_table . '\.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
Loading