Tests: improve Windows compatibility#100
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.phpusingDIRECTORY_SEPARATORfor Windows-safefile_exists(),chdir(), andrequire_once. - Improve “pretty permalinks” routing by setting
$_SERVER['PATH_INFO']when routing toindex.php. - Update Behat scenarios to avoid
/tmp+cmpand 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.
No description provided.