Skip to content

test: refine unit test linting#2

Merged
rbcorrales merged 3 commits into
mainfrom
test/refine-scripts-unit-linting
May 18, 2026
Merged

test: refine unit test linting#2
rbcorrales merged 3 commits into
mainfrom
test/refine-scripts-unit-linting

Conversation

@rbcorrales
Copy link
Copy Markdown
Owner

Updates the scripts test harness to keep PHPUnit naming compatible with PHPUnit 12, keep fixture specific PHPCS disables next to the code that needs them, and keep the shared ruleset focused on repo structure.

Co-authored-by: Codex <noreply@openai.com>
Copy link
Copy Markdown

Copilot AI left a comment

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 refines the repo’s test/lint harness to better align with PHPUnit 12 expectations and to keep PHPCS configuration focused on repo structure while moving certain suppressions closer to where the restricted functions are used.

Changes:

  • Update PHPUnit testsuite discovery to explicitly include .php files under tests/Unit (PHPUnit 12 compatibility).
  • Adjust PHPCS ruleset to lint tests/Unit, exclude tests/bootstrap.php, and relax file-naming sniffs for *Test.php files.
  • Add PHPCS suppressions in the bump script and unit test to replace previously global ruleset exclusions.

Reviewed changes

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

File Description
tests/Unit/BumpPluginVersionTest.php Adds headers/docs and refactors assertions; introduces file-level PHPCS suppressions and a fixture file reader helper.
scripts/bump-plugin-version.php Moves PHPCS suppressions into the script file (instead of global ruleset excludes).
phpunit.xml.dist Tweaks unit testsuite directory config for PHPUnit 12 file discovery behavior.
phpcs.xml Removes global exclusions for certain restricted-function sniffs; adds test-targeted filename exclusions and includes tests/Unit in lint targets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/Unit/BumpPluginVersionTest.php Outdated
Comment thread tests/Unit/BumpPluginVersionTest.php Outdated
Comment thread tests/Unit/BumpPluginVersionTest.php Outdated
Comment thread scripts/bump-plugin-version.php Outdated
Co-authored-by: Codex <noreply@openai.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread tests/Unit/BumpPluginVersionTest.php Outdated
Co-authored-by: Codex <noreply@openai.com>
@rbcorrales rbcorrales merged commit d155c07 into main May 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants