- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.6k
 
Notes: Fix PHPUnit tests #72781
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
Notes: Fix PHPUnit tests #72781
Conversation
| 
           The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the  If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.  | 
    
| * @package Gutenberg | ||
| */ | ||
| class WP_Test_REST_Comments_Controller_Gutenberg extends WP_Test_REST_Controller_Testcase { | ||
| class WP_Test_REST_Comments_Controller_Gutenberg extends WP_Test_REST_TestCase { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this back to WP_Test_REST_TestCase. The controller testcase has a couple of abstract methods that we don't need for testing.
| self::$user_ids = array( | ||
| 'administrator' => self::$admin_id, | ||
| 'editor' => self::$editor_id, | ||
| 'contributor' => self::$contributor_id, | ||
| 'subscriber' => self::$subscriber_id, | ||
| 'author' => self::$author_id, | ||
| ); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This map was missing and failing tests.
| 
          
 Flaky tests detected in 29c3d8a. 🔍  Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18907863337 
  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
| 
           Thanks, @adamsilverstein! Going to merge this.  | 
    
What?
Noticed while testing WordPress/wordpress-develop#10430.
The PHPUnit tests weren't running after changes were backported from core. The test files in this repo require a
-test.phpsuffix.Testing Instructions