Skip to content

Tests: Various harness improvements, especially on Windows#326

Merged
swissspidy merged 22 commits intomainfrom
try/windows-logging
Mar 31, 2026
Merged

Tests: Various harness improvements, especially on Windows#326
swissspidy merged 22 commits intomainfrom
try/windows-logging

Conversation

@swissspidy
Copy link
Copy Markdown
Member

@swissspidy swissspidy commented Mar 27, 2026

Also adds some hardening when downloading WP core for tests fails due to timeouts or so.

@github-actions

This comment was marked as resolved.

gemini-code-assist[bot]

This comment was marked as resolved.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Context/FeatureContext.php 0.00% 34 Missing ⚠️
src/Context/GivenStepDefinitions.php 0.00% 2 Missing ⚠️
src/Context/ThenStepDefinitions.php 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

This prevents cmd.exe from misinterpreting %...% as undefined environment variables and stripping them.
@swissspidy swissspidy added this to the 5.1.7 milestone Mar 28, 2026
@swissspidy

This comment was marked as resolved.

gemini-code-assist[bot]

This comment was marked as resolved.

@swissspidy swissspidy changed the title Misc Windows improvements Tests: Various harness improvements, especially on Windows Mar 30, 2026
@swissspidy swissspidy marked this pull request as ready for review March 30, 2026 20:50
@swissspidy swissspidy requested a review from a team as a code owner March 30, 2026 20:50
Copilot AI review requested due to automatic review settings March 30, 2026 20:50
Copy link
Copy Markdown
Contributor

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 improves the Behat test harness with a focus on Windows compatibility and adds extra resiliency around downloading WordPress core for tests.

Changes:

  • Propagate additional Windows environment variables to subprocesses and add a Windows-specific PHAR invocation adjustment.
  • Harden WP core download caching by checking a more reliable “cache present” marker and retrying downloads on failure.
  • Normalize several path constructions using DIRECTORY_SEPARATOR / rtrim(..., '/\\'), plus add a feature scenario to validate temp dir behavior in subprocesses.

Reviewed changes

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

File Description
src/Context/ThenStepDefinitions.php Adjusts directory listing output to use \n for more consistent cross-platform comparisons.
src/Context/FeatureContext.php Adds Windows env propagation, download retry logic, and multiple Windows path handling fixes.
features/testing.feature Adds a scenario intended to validate temp dir handling in subprocess execution.

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

Copy link
Copy Markdown
Contributor

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.


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

@swissspidy swissspidy merged commit 2cde4e3 into main Mar 31, 2026
7 checks passed
@swissspidy swissspidy deleted the try/windows-logging branch March 31, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants