Repository navigation
Repair wp/6.0 branch Actions: Use assertStringContainsString() for string haystacks - #84284
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
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. |
99d5835 to
d4ea102
Compare
d4ea102 to
b850728
Compare
|
Size Change: 0 B Total Size: 1.23 MB ℹ️ View Unchanged
|
b850728 to
58f32eb
Compare
|
Size Change: 0 B Total Size: 1.23 MB ℹ️ View Unchanged
|
wp/6.0 branch Actions: Use assertStringContainsString() in WP_Webfonts_Testwp/6.0 branch Actions: Use assertStringContainsString() for string haystacks
58f32eb to
4c47f71
Compare
ramonjd
left a comment
There was a problem hiding this comment.
| PR | Before (base PR) | After |
|---|---|---|
#84284 wp/6.0 (2 calls in class-wp-webfonts-test.php) |
#84283, PHP 8.1: both WP_Webfonts_Test tests error with assertContains(): Argument #2 ($haystack) must be of type Traversable|array |
Top of stack #85149: all 10 PHP jobs pass; the webfonts test file is unchanged from this PR |
4c47f71 to
471efe3
Compare
Part of #82933.
What?
Replaces two
assertContains()calls that use a string haystack withassertStringContainsString()inphpunit/class-wp-webfonts-test.php(test_generate_and_enqueue_stylesandtest_generate_and_enqueue_editor_styles).Why?
assertContains()with a string haystack was deprecated in PHPUnit 7.5 and removed in PHPUnit 9, where it throws aTypeError, so both tests error on the8.0/8.1legs.yoast/phpunit-polyfills(already a dependency and wired into the test case base class) providesassertStringContainsString()on the older PHPUnit versions the5.6/7.0legs run.wp/6.1's copy of this test already uses it.Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.
🤖 Generated with Claude Code