Repository navigation
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
There was a problem hiding this comment.
🟡 Changes recommended
The test matches the plugin name anywhere in the output, so link attributes can satisfy it even when the visible card heading is missing.
1 open issue
What changed in this PR
Adds unit tests for WP_Plugin_Install_List_Table::display_rows() as part of ticket #66554, expanding coverage of plugin cards in the admin installer without changing production code.
Changes:
- Covers card content, sanitization, filters, grouping, and icon selection.
- Tests ratings, update age, installation counts, and compatibility indicators.
- Exercises incompatibility notices across update capabilities, using a fixed WordPress version for stable expectations.
| File | Description |
|---|---|
tests/phpunit/tests/admin/wpPluginInstallListTableDisplayRows.php |
Adds fixtures, data providers, and tests for plugin card rendering and compatibility notices. |
Review effort: Balanced
huzaifaalmesbah
left a comment
There was a problem hiding this comment.
Thanks for working on this, @hmbashar! Extensive test coverage for WP_Plugin_Install_List_Table::display_rows() including ratings, author links, and compatibility badges.
A couple of points to consider:
- Heading assertion (line ~136): Asserting the plugin title within the card heading (
<h3>or specific title container) rather than anywhere in$outputprevents false passes fromaria-labelordata-titleattributes. - Class name capitalization: In
tests/phpunit/tests/admin/wpPluginInstallListTableDisplayRows.php, changingTests_Admin_wpPluginInstallListTableDisplayRowstoTests_Admin_WpPluginInstallListTableDisplayRowsfixes a minor PHPCS naming notice.
All 96 CI checks pass cleanly!
AI Review: Gemini 3.8 Flash

Summary
Part 3 of the tests for
WP_Plugin_Install_List_Table(ticket #66554):display_rows(), the largest method of the class (162 lines were not covered). The other parts are separate pull requests, one for each area. The notice about the dependencies of a plugin already has its own tests.plugin_install_descriptionfilter, and a plugin without an author.plugin_install_action_linksfilter, and no list of actions when the filter removes them.update_coreandupdate_php, with the notice for WordPress, for PHP, and for both).Testing
Mutation check: 27 changes to
display_rows()(the object cast, the groups, the sanitizing, the filters, the icons, the notice and its capabilities, the active installations and the compatibility) were each caught by a test.$wp_versionis set to7.0in the tests, so the compatibility does not depend on the version of the checkout. The notice for a user who can update WordPress but not PHP (and the reverse) uses amap_meta_capfilter, becauseupdate_phpmaps toupdate_core.Trac ticket: https://core.trac.wordpress.org/ticket/66554
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 5.5
Used for: Written with AI and manually reviewed by me.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.