Skip to content

Make diff context lines configurable in PHPUnit #6567

@sebastianbergmann

Description

@sebastianbergmann

Add a --diff-context CLI option and a diffContext XML configuration attribute so users can control how many context lines appear in assertion failure diffs.

The challenge here is that these instantiation sites currently have no access to the resolved configuration. One approach is to introduce a lightweight static accessor or thread the value through the existing TestCase configuration, similar to how other test-level settings are handled.

Metadata

Metadata

Labels

type/enhancementA new idea that should be implemented

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions