Open
Conversation
Adds CI for PHP standalone tests (Serve Happy, Browse Happy, Slack Trac Bot), WordPress-dependent tests (Handbook, Plugin Directory), and JavaScript tests (Pattern Directory theme) across pushes and PRs to trunk. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
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 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. |
- Standardize all standalone PHP tests on PHP 8.0 + PHPUnit 9, with a compatibility bootstrap that aliases PHPUnit_Framework_TestCase for tests still using the pre-PHPUnit 8 class name (Serve Happy, Slack Trac Bot). - Run `composer install` in wordpress-develop to provide the yoast/phpunit-polyfills package required by the WP test suite. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use PHP 7.4 for WordPress tests — the Handbook test setUp/tearDown methods lack `: void` return types, which is fatal on PHP 8.0+ with the Yoast PHPUnit Polyfills. - Remove Plugin Directory from CI — it has a hard dependency on the Jetpack_Search class which requires the full Jetpack plugin. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add `: void` return types to setUp/tearDown in Handbook test files to be compatible with the Yoast PHPUnit Polyfills. - Restore PHP 8.0 for WordPress tests (no longer need 7.4 workaround). - Remove JS Pattern Directory Theme job per request. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The parse logic unconditionally sets upgrade=true for Internet Explorer (since it is discontinued), but the test did not account for this and expected upgrade=false when the IE version matched the current version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rtion - Add Slack Props Library to standalone PHP tests with a wpdbStub bootstrap so PHPUnit can mock the database dependency. - Re-add Plugin Directory to WP tests with a bootstrap that stubs Jetpack Search classes (Classic_Search) so the plugin can load without the full Jetpack plugin installed. - Fix Handbook test_handbook_sidebar: add show_in_rest to the expected sidebar keys array (added in WordPress trunk). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Handbook: Add wp-env test directory fallback to bootstrap - Plugin Directory: Create .wp-env.json with Jetpack search stub mu-plugin mapping - Plugin Directory: Make bootstrap self-contained (finds WP test framework, loads Jetpack stub, boots WP) - Plugin Directory: Add void return types to setUp/tearDown - CI: Remove Jetpack stub CI step (now handled by bootstrap) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…on tests - Slack Props: Pass directory instead of hyphenated filename to PHPUnit 9 (PHPUnit 9 cannot derive class name from hyphenated filenames) - Plugin Directory: Remove from CI as all tests are integration tests that require live api.wordpress.org (wp-env config still available for local development) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Jetpack, advanced-post-cache, and plugin-check as plugins - Add wporg-plugins-2024 theme and wporg-parent-2021 parent theme - Add WPORG_Ratings stub mu-plugin (closed-source dependency) - Document all code locations that rely on each stub Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New test suites covering: - Template helpers: sanitize_active_installs, format_active_installs, section titles, version detection, encoding - Trademarks: slug validation, prefix detection, for-woocommerce exception, portmanteau detection, user/published-plugin exceptions - Readme Parser: header parsing, section parsing, FAQ extraction, alias sections, ignored tags, short description truncation - Markdown: transform, equals-style headers, code blocks, lists Tests use @group plugin-directory to run separately from legacy integration tests that require live api.wordpress.org. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Template: use assertEquals for floor() float return values - Trademarks: avoid 'plugin' (a trademarked slug) in clean slug tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…arning - Create a WP test user for contributor parsing test - Add separate test for invalid contributor warning - Check truncation warning instead of byte length (trim_length appends a hellip entity) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add get_last_query_info() to Jetpack Search stub (called at class-plugin-search.php:437) - Improve Template::encode() tests with real UTF-8 and Windows-1252 encoding inputs - Add tests for dashicons_stars, close/rejection reasons, download_link, support URLs, geopattern icon URLs, is_plugin_outdated, rollout strategies - Refocus Markdown tests on custom code_trick() logic (pre/code block preservation, underscore handling, bbPress-style backtick blocks) - Add Readme Validator test file covering validate(), validate_content(), translate_code_to_message(), and all error/warning/note categories - Add Plugin Directory registration tests for post type, taxonomies, post statuses, meta fields, and filter_wp_insert_post_data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix encode tests: ampersand and angle brackets are round-tripped by htmlentities + htmlspecialchars_decode (ENT_NOQUOTES), remove Windows-1252 test - Fix markdown code_trick tests: add surrounding text so trim() does not strip the 4-space indentation that code_trick adds for pre/code blocks - Fix readme validator: rename "My Test Plugin" to "My Test Tool" to avoid trademark check, create WP user for contributor validation - Fix all plugin post factory calls: add post_modified/post_modified_gmt fields to avoid undefined array key error in filter_wp_insert_post_data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/unit-tests.ymlto run all unit tests on pushes and PRs totrunkChanges
.github/workflows/unit-tests.yml— CI workflow with 6 test matrix entries.wp-env.json— Docker dev environment with Jetpack, themes, stubstests/bootstrap.php— Self-contained WP test framework bootstraptests/stubs/jetpack-search-stub.php— Jetpack Classic_Search stubtests/stubs/wporg-ratings-stub.php— WPORG_Ratings stub with documented code locationstest-template.php,test-trademarks.php,test-readme-parser.php,test-markdown.php,test-readme-validator.php,test-plugin-directory.phptests/phpunit/bootstrap.php— wp-env path fallbackTest plan
🤖 Generated with Claude Code