Skip to content

Fix PHPCS errors in Behat test files - #344

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

Fix PHPCS errors in Behat test files#344
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 fixture code to follow consistent coding standards.
    • Improved readability of hook registrations, update fixtures, and WordPress configuration examples.
    • Updated object instantiation and formatting without changing test scenarios, assertions, or behavior.

@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: 50cf9425-ce92-44cc-8026-bb0bde752ca0

📥 Commits

Reviewing files that changed from the base of the PR and between 3a718f6 and 492baeb.

📒 Files selected for processing (5)
  • features/core-check-update-db.feature
  • features/core-check-update.feature
  • features/core-update-db.feature
  • features/core-update.feature
  • features/core.feature

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


📝 Walkthrough

Walkthrough

The feature files update embedded PHP fixtures to use consistent formatting and syntax. The changes do not alter scenarios, assertions, mocked data, or test behavior.

Changes

Feature fixture formatting

Layer / File(s) Summary
Align embedded PHP fixture syntax
features/core-check-update.feature, features/core-check-update-db.feature, features/core-update-db.feature, features/core-update.feature, features/core.feature
Hook callbacks, mocked update data, wp-config.php, and stdClass instantiation now follow the updated formatting style. Test behavior remains unchanged.

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

Merge Risk: ⚪ Minimal · up to 492ba

This change only fixes formatting in Behat test files and does not alter product behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: 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 accurately summarizes the changes. The pull request reformats Behat test fixtures to address PHPCS errors without changing test behavior.
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. (5 skipped: 5 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 pull request updates embedded PHP snippets inside Behat .feature files to satisfy PHPCS/WP coding standards without changing the intended test behavior.

Changes:

  • Reformat define(), require_once, and ABSPATH bootstrap snippets to WP-style spacing/bracing (including __DIR__ usage).
  • Reformat multi-line hook/filter registrations (add_filter(), WP_CLI::add_wp_hook(), WP_CLI::add_hook()) for consistent indentation and argument layout.
  • Update object instantiation style in a fixture (new stdClass()).

Reviewed changes

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

Show a summary per file
File Description
features/core.feature Reformat wp-config fixture snippet (defines/ABSPATH/require_once) to WP coding standards.
features/core-update.feature Reformat add_filter() override fixture for consistent multi-line layout.
features/core-update-db.feature Reformat WP_CLI::add_wp_hook() / WP_CLI::add_hook() fixtures for consistent indentation.
features/core-check-update.feature Update fixture to new stdClass() for PHPCS compliance.
features/core-check-update-db.feature Reformat WP_CLI::add_wp_hook() fixture blocks for consistent indentation.

💡 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 d4c4175 into main Sep 1, 2026
58 checks passed
@swissspidy
swissspidy deleted the fix/tests-lint branch September 1, 2026 10:48
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