Skip to content

Fix PHPCS errors in Behat test files - #259

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

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

    • Standardized formatting and indentation in media-related test fixtures and inline plugin examples.
    • Expanded compact callback and image-size registration code for improved readability.
    • Updated cosmetic quoting and layout without changing behavior.
  • Tests

    • Confirmed that media pruning and regeneration scenarios retain their existing functionality.

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
@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: 361835d7-571c-4243-aa8e-b93ad281d4a6

📥 Commits

Reviewing files that changed from the base of the PR and between b3dcb83 and 2e8d8fb.

📒 Files selected for processing (3)
  • features/media-image-size.feature
  • features/media-prune.feature
  • features/media-regenerate.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 three Behat feature files. It changes indentation, callback layout, and one regex quote delimiter. Test logic and behavior remain unchanged.

Changes

Media fixture formatting

Layer / File(s) Summary
Image size fixture formatting
features/media-image-size.feature
Re-indents the custom image size callback.
Prune fixture formatting
features/media-prune.feature
Expands the abandoned image size callbacks in both prune scenarios.
Regenerate fixture formatting
features/media-regenerate.feature
Reformats embedded action and filter callbacks and the simulated edit fixture without changing logic.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 2e8d8

This change only cleans up formatting in Behat test fixtures without altering product behavior, so no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: brianhenryie, ernilambar, janw-me

🚥 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 and concisely describes the main change: correcting PHPCS issues 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. (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.

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 standardizes the formatting of inline PHP snippets embedded in Behat .feature files, aligning them with the project’s PHPCS expectations while preserving test behavior.

Changes:

  • Reformats inline add_action() / add_filter() blocks into multi-line, consistently indented calls across media-related scenarios.
  • Normalizes minor PHP style details (e.g., preg_replace() quoting) and indentation within embedded helper scripts.

Reviewed changes

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

File Description
features/media-regenerate.feature Re-indents and expands inline PHP used in regenerate scenarios (actions/filters, helper script snippet).
features/media-prune.feature Reformats inline PHP that registers the temporary custom image size used by prune scenarios.
features/media-image-size.feature Re-indents the inline plugin example used to register a custom image size for listing tests.

💡 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 8fe0bf7 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