Skip to content

feat(tests): allow test response helper to be container injectable#2206

Closed
Opblaasmaatje wants to merge 3 commits into
tempestphp:3.xfrom
Opblaasmaatje:feature/allow-test-response-helper-class-to-be-container-injectable
Closed

feat(tests): allow test response helper to be container injectable#2206
Opblaasmaatje wants to merge 3 commits into
tempestphp:3.xfrom
Opblaasmaatje:feature/allow-test-response-helper-class-to-be-container-injectable

Conversation

@Opblaasmaatje

Copy link
Copy Markdown
Contributor

I'd like the ability to add my own assertion methods onto the TestResponseHelper.

I believe with container injection this it should be possible, without having to overwrite and maintain the HttpRouterTester::sendRequest(...) method.

If there's already a solution in place for this that I've missed, or if this needs any changes or has unexpected side effects, please let me know! 😅

@Opblaasmaatje
Opblaasmaatje requested a review from brendt as a code owner July 12, 2026 22:16
…ponse-helper-class-to-be-container-injectable

# Conflicts:
#	src/Tempest/Framework/Testing/Http/HttpRouterTester.php
@Opblaasmaatje Opblaasmaatje changed the title feat(test): allow test response helper to be container injectable feat(tests): allow test response helper to be container injectable Jul 12, 2026
@Opblaasmaatje

Copy link
Copy Markdown
Contributor Author

PHPStan is going off because I removed final from TestResponseHelper which is by design so it can be extended when replacing it in the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant