-
Notifications
You must be signed in to change notification settings - Fork 1
Add assertErr and assertOk PHPUnit assertions
#3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@erikgaal 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
|
@copilot try again with updated firewall rules |
…straints Co-authored-by: erikgaal <1234268+erikgaal@users.noreply.github.com>
Co-authored-by: erikgaal <1234268+erikgaal@users.noreply.github.com>
Implementation complete! Successfully added
Commit: 93d06b3 |
assertErr and assertOk PHPUnit assertionsassertErr and assertOk PHPUnit assertions
* Initial plan * Add assertErr and assertOk PHPUnit assertions with IsErr and IsOk constraints Co-authored-by: erikgaal <1234268+erikgaal@users.noreply.github.com> * Clean up demo test file Co-authored-by: erikgaal <1234268+erikgaal@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: erikgaal <1234268+erikgaal@users.noreply.github.com> Co-authored-by: Erik Gaal <erik.gaal@gosuperscript.com>
* Initial plan * Add assertErr and assertOk PHPUnit assertions with IsErr and IsOk constraints Co-authored-by: erikgaal <1234268+erikgaal@users.noreply.github.com> * Clean up demo test file Co-authored-by: erikgaal <1234268+erikgaal@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: erikgaal <1234268+erikgaal@users.noreply.github.com> Co-authored-by: Erik Gaal <erik.gaal@gosuperscript.com>
Implements PHPUnit assertions for Result monads as requested in the original issue.
Changes Made
Added to
ComparesResultstrait:New Files:
src/Result/Testing/IsErr.php- PHPUnit constraint for checking Err resultssrc/Result/Testing/IsOk.php- PHPUnit constraint for checking Ok resultstests/Result/Testing/AssertionsTest.php- Comprehensive tests for new assertionsUpdated Files:
src/Result/Testing/ComparesResults.php- Added the four assertion methods as specifiedBoth
IsOkandIsErrextend PHPUnit'sConstraintclass as required.Usage
Testing
Fixes #2.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.