Skip to content

Fix PHPCS errors in Behat test files - #244

Merged
swissspidy merged 1 commit into
mainfrom
fix/tests-lint
Sep 1, 2026
Merged

Fix PHPCS errors in Behat test files#244
swissspidy merged 1 commit into
mainfrom
fix/tests-lint

Conversation

@swissspidy

@swissspidy swissspidy commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Tests
    • Reformatted feature-test snippets for improved readability.
    • Preserved existing hook behavior and unserialization settings.

Copilot AI lite review requested due to automatic review settings September 1, 2026 10:35
@swissspidy
swissspidy requested a review from a team as a code owner September 1, 2026 10:35
@github-actions github-actions Bot added the scope:testing Related to testing label Sep 1, 2026
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 66ba2326-dc7a-46f1-897d-84959138d1ab

📥 Commits

Reviewing files that changed from the base of the PR and between f5db9c5 and 1822866.

📒 Files selected for processing (1)
  • features/search-replace.feature

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Two PHP snippets in the search-replace feature test now use multiline hook registration and callback formatting. Hook names, callback behavior, allowed_classes values, replacement values, and execution flow remain unchanged.

Changes

Feature test formatting

Layer / File(s) Summary
Reformat hook registrations and callbacks
features/search-replace.feature
The snippets use multiline WP_CLI::add_hook() calls, callback formatting, and serialized object construction without changing test behavior or configuration.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 18228

This PR only reformats Behat test code without changing test behavior or product functionality, so no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: copilot, brianhenryie

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: correcting PHPCS errors in Behat test files through formatting updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tests-lint

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates embedded PHP snippets in the Behat feature suite to comply with PHPCS expectations, helping keep the repository’s acceptance tests lint-clean.

Changes:

  • Reformat WP_CLI::add_hook( 'search_replace_unserialize_options', ... ) closure usage to match coding standards (spacing/line breaks).
  • Re-indent and reflow a nested serialize( new CaseInsensitiveDictionary( ... ) ) snippet for consistent style.
  • Adjust indentation in an embedded MyClass definition used by a hook-related scenario.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy added this to the 3.0.2 milestone Sep 1, 2026
@swissspidy
swissspidy merged commit 9a57bdb into main Sep 1, 2026
58 checks passed
@swissspidy
swissspidy deleted the fix/tests-lint branch September 1, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants