Skip to content

Tests: improve Windows compatibility#100

Merged
swissspidy merged 10 commits intomainfrom
fix/windows-tests
Apr 14, 2026
Merged

Tests: improve Windows compatibility#100
swissspidy merged 10 commits intomainfrom
fix/windows-tests

Conversation

@swissspidy
Copy link
Copy Markdown
Member

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the test scenarios in features/server.feature. It updates the license check to verify STDOUT directly instead of using temporary files and streamlines the permalink configuration by using the wp rewrite structure command. A review comment suggests enhancing the curl command for the license check by explicitly including the protocol and the follow-redirects flag to ensure consistency with other tests.

@swissspidy swissspidy changed the title Tests hardening for Windows ests: improve Windows compatibility Apr 14, 2026
@swissspidy swissspidy changed the title ests: improve Windows compatibility Tests: improve Windows compatibility Apr 14, 2026
@swissspidy swissspidy added this to the 2.0.19 milestone Apr 14, 2026
@swissspidy swissspidy marked this pull request as ready for review April 14, 2026 13:52
@swissspidy swissspidy requested a review from a team as a code owner April 14, 2026 13:52
Copilot AI review requested due to automatic review settings April 14, 2026 13:52
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

Improves Windows compatibility for the wp server router and its Behat coverage, reducing reliance on Unix-specific paths/commands and normalizing filesystem paths.

Changes:

  • Normalize request-derived filesystem paths in router.php using DIRECTORY_SEPARATOR for Windows-safe file_exists(), chdir(), and require_once.
  • Improve “pretty permalinks” routing by setting $_SERVER['PATH_INFO'] when routing to index.php.
  • Update Behat scenarios to avoid /tmp + cmp and to use a Windows-friendlier permalink structure setup.

Reviewed changes

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

File Description
router.php Normalizes filesystem paths and sets PATH_INFO for better Windows/pretty-permalink behavior.
features/server.feature Adjusts acceptance tests to be less Unix-dependent and more Windows-CI compatible.

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

@swissspidy swissspidy merged commit c5c64ee into main Apr 14, 2026
66 checks passed
@swissspidy swissspidy deleted the fix/windows-tests branch April 14, 2026 15:30
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