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

Try/60642 fixture tests #6723

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'trunk' into try/60642-fixture-tests
  • Loading branch information
anton-vlasenko committed Jun 4, 2024
commit e20fc00bf046274d6abea2ca102eeae0a04ba9d3
1 change: 0 additions & 1 deletion tests/phpunit/tests/rest-api/rest-schema-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -762,18 +762,17 @@
$datetime_keys = array( 'date', 'date_gmt', 'modified', 'modified_gmt' );

global $wpdb;
$posts = $wpdb->get_results("SELECT id, post_title, post_name as slug FROM $wpdb->posts");

Check failure on line 765 in tests/phpunit/tests/rest-api/rest-schema-setup.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Expected 1 spaces after opening parenthesis; 0 found

Check failure on line 765 in tests/phpunit/tests/rest-api/rest-schema-setup.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Expected 1 spaces before closing parenthesis; 0 found

//Save all titles
$post_data = array();
foreach( $posts as $post ) {

Check failure on line 769 in tests/phpunit/tests/rest-api/rest-schema-setup.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Space after opening control structure is required

Check failure on line 769 in tests/phpunit/tests/rest-api/rest-schema-setup.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

No space before opening parenthesis is prohibited

Check failure on line 769 in tests/phpunit/tests/rest-api/rest-schema-setup.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Expected 1 space after FOREACH keyword; 0 found
$post_data[] = $post->id;
$post_data[] = $post->post_title;
$post_data[] = $post->slug;
}

$post_data = implode(',', $post_data);

Check failure on line 775 in tests/phpunit/tests/rest-api/rest-schema-setup.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Expected 1 spaces after opening parenthesis; 0 found

Check failure on line 775 in tests/phpunit/tests/rest-api/rest-schema-setup.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Expected 1 spaces before closing parenthesis; 0 found

foreach ( $data as $key => $value ) {
if ( is_string( $value ) ) {
if ( in_array( $key, $datetime_keys, true ) ) {
Expand Down
12 changes: 6 additions & 6 deletions tests/qunit/fixtures/wp-api-generated.js
Original file line number Diff line number Diff line change
Expand Up @@ -12323,7 +12323,7 @@ mockedApiResponse.PostsCollection = [
],
"tags": [],
"class_list": [
"post-2390",
"post-1073",
"post",
"type-post",
"status-publish",
Expand Down Expand Up @@ -12432,7 +12432,7 @@ mockedApiResponse.PostModel = {
],
"tags": [],
"class_list": [
"post-2390",
"post-1073",
"post",
"type-post",
"status-publish",
Expand Down Expand Up @@ -12632,7 +12632,7 @@ mockedApiResponse.PagesCollection = [
"meta_key": ""
},
"class_list": [
"post-2393",
"post-1073",
"page",
"type-page",
"status-publish",
Expand Down Expand Up @@ -12723,7 +12723,7 @@ mockedApiResponse.PageModel = {
"meta_key": ""
},
"class_list": [
"post-2393",
"post-1073",
"page",
"type-page",
"status-publish",
Expand Down Expand Up @@ -12911,7 +12911,7 @@ mockedApiResponse.MediaCollection = [
"meta_key": ""
},
"class_list": [
"post-2396",
"post-1073",
"attachment",
"type-attachment",
"status-inherit",
Expand Down Expand Up @@ -12980,7 +12980,7 @@ mockedApiResponse.MediaModel = {
"meta_key": ""
},
"class_list": [
"post-2396",
"post-1073",
"attachment",
"type-attachment",
"status-inherit",
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.