Skip to content

Add output url to image diff renderer#29

Merged
frankdekker merged 6 commits intomasterfrom
Add-output-url-to-image-diff-renderer
Jul 29, 2025
Merged

Add output url to image diff renderer#29
frankdekker merged 6 commits intomasterfrom
Add-output-url-to-image-diff-renderer

Conversation

@frankdekker
Copy link
Member

Adds PHPUNIT_EXTENSIONS_IMAGE_DIFF_OUTPUT_URL to the ImageDiffRenderer to optionally set a url where the rendered diff will be available.

@frankdekker frankdekker requested review from bram123 and Copilot and removed request for Copilot July 29, 2025 08:09
Copy link
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 adds optional URL configuration for the image diff renderer to improve user experience when running tests in CI environments. Instead of showing a local file path, users can now configure a web-accessible URL where the diff HTML file can be viewed.

  • Introduces PHPUNIT_EXTENSIONS_IMAGE_DIFF_OUTPUT_URL environment variable support
  • Modifies the constructor to accept and process an optional output URL parameter
  • Updates the render method to use the configured URL when available instead of the local path

Reviewed Changes

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

File Description
src/Renderer/ImageDiffRenderer.php Adds outputUrl property and constructor parameter, implements URL-based diff viewing
tests/Unit/Renderer/ImageDiffRendererTest.php Adds test case to verify URL-based rendering functionality
README.md Documents the new PHPUNIT_EXTENSIONS_IMAGE_DIFF_OUTPUT_URL environment variable
Comments suppressed due to low confidence (1)

tests/Unit/Renderer/ImageDiffRendererTest.php:63

  • The test method name 'testRenderShouldWithOutputUrl' is grammatically incorrect. Consider renaming it to 'testRenderShouldUseOutputUrl' or 'testRenderWithOutputUrl' for clarity.
    public function testRenderShouldWithOutputUrl(): void

@frankdekker frankdekker merged commit 45aa1d8 into master Jul 29, 2025
16 checks passed
@frankdekker frankdekker deleted the Add-output-url-to-image-diff-renderer branch July 29, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants