Skip to content

Fix PHPCS errors in Behat test files - #98

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

Fix PHPCS errors in Behat test files#98
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

  • Style
    • Reformatted embedded test snippets and callback registrations for improved readability.
    • Updated string formatting and expanded hash calculations across cache-related scenarios.
  • Tests
    • Preserved existing test behavior and coverage for embed handlers, provider filters, and cache functionality.

@swissspidy
swissspidy requested a review from a team as a code owner September 1, 2026 10:34
Copilot AI lite review requested due to automatic review settings September 1, 2026 10:34
@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: c9d337dc-5ec9-46ec-89d0-b0705c16e7b3

📥 Commits

Reviewing files that changed from the base of the PR and between 624c2e4 and c974a15.

📒 Files selected for processing (3)
  • features/cache.feature
  • features/handler.feature
  • features/provider.feature

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


📝 Walkthrough

Walkthrough

The pull request reformats embedded PHP snippets in cache, handler, and provider feature fixtures. It changes string quoting and expands selected statements across multiple lines. Test behavior remains unchanged.

Changes

Feature fixture formatting

Layer / File(s) Summary
PHP fixture reformatting
features/cache.feature, features/handler.feature, features/provider.feature
The fixtures use single-quoted strings and multiline PHP formatting. Cache-key inputs, embed handler registration, and provider hook registration remain unchanged.

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

Merge Risk: ⚪ Minimal · up to c974a

This change only fixes linting and formatting in Behat test files without changing production behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: schlessera

🚥 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 accurately describes the changes: PHPCS-related formatting fixes in Behat test files.
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. (3 skipped: 3 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.

@github-actions github-actions Bot added the scope:testing Related to testing label Sep 1, 2026
@swissspidy swissspidy added this to the 3.0.1 milestone Sep 1, 2026
@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!

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 focuses on resolving PHPCS/style violations within the package’s Behat .feature files by reformatting embedded PHP snippets used during test scenarios, without changing the underlying test intent or assertions.

Changes:

  • Reformatted embedded PHP hook registrations in provider.feature and handler.feature into multi-line, standards-compliant call layouts.
  • Normalized PHP string quoting and expanded a multi-line hash/serialize snippet in cache.feature for PHPCS compliance.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
features/provider.feature Reformats the embedded WP_CLI::add_wp_hook() snippet to a multi-line layout.
features/handler.feature Reformats the embedded WP_CLI::add_hook() / handler registration snippet to a multi-line layout.
features/cache.feature Normalizes embedded PHP quoting and formats the md5/serialize snippet across cache scenarios.

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

@swissspidy
swissspidy merged commit 224f78d into main Sep 1, 2026
58 checks passed
@swissspidy
swissspidy deleted the fix/tests-lint branch September 1, 2026 10:46
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