Skip to content

Fix PHPCS errors in Behat test files - #151

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

Fix PHPCS errors in Behat test files#151
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 PHP code in cron-related test fixtures for improved readability and consistent indentation.
    • Corrected indentation in a shutdown-function fixture.
  • Tests
    • No test scenarios, assertions, or behavior were changed.

Copilot AI lite review requested due to automatic review settings September 1, 2026 10:34
@swissspidy
swissspidy requested a review from a team as a code owner September 1, 2026 10:34
@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: 5c7ae818-d0cf-4b8f-8e73-170e8c299c41

📥 Commits

Reviewing files that changed from the base of the PR and between 61687ca and 05aaf75.

📒 Files selected for processing (2)
  • features/cron-event.feature
  • features/cron.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 fixtures in features/cron-event.feature and features/cron.feature. It changes indentation and adds trailing commas without changing scenarios, assertions, logic, or fixture values.

Changes

Cron fixture formatting

Layer / File(s) Summary
Reformat embedded PHP fixtures
features/cron-event.feature, features/cron.feature
Reformats cron action callbacks, shutdown functions, filter callbacks, class methods, and the cron option array into multi-line PHP style. No behavior changes are included.

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

Merge Risk: ⚪ Minimal · up to 05aaf

This change only reformats Behat test fixtures without changing behavior, dependencies, or runtime configuration. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: copilot

🚥 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 identifies the main change: correcting PHPCS issues in the Behat test fixture 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. (2 skipped: 2 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 inside the WP-CLI Behat feature tests to satisfy PHPCS/WP coding style requirements without changing test behavior. It keeps the test scenarios and assertions intact while making the inline fixtures more consistently formatted.

Changes:

  • Reformatted add_filter() blocks in features/cron.feature to multi-line style with consistent indentation.
  • Reformatted add_action() / register_shutdown_function() fixtures and a small test class/function fixture in features/cron-event.feature.
  • Normalized array formatting in an update_option( 'cron', ... ) fixture to consistent indentation and trailing commas.

Reviewed changes

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

File Description
features/cron.feature PHPCS-oriented reformatting of embedded PHP fixtures used by cron-related scenarios.
features/cron-event.feature PHPCS-oriented reformatting of embedded PHP fixtures for shutdown-function and action-listing scenarios.

💡 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.1 milestone Sep 1, 2026
@swissspidy
swissspidy merged commit c047cac 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