Repository navigation
test: run the customer controller tests against core-api 1.6.69 - #147
Merged
Merged
Conversation
The suite never ran against the real core until it was tagged: PHP CI could not resolve ^1.6.69. Against it, four tests in CustomerControllerContractsTest fail: - codes sent by SMS are stored hashed and used up when accepted, so the test reads the plain code from the text the provider was handed instead of the row, gives the customer a phone on file so that text exists, checks the accepted code is marked used, and asks for a fresh closure code after the deletion that fails burned the first one - two local verification_codes tables lacked the uuid and status columns that consume() writes - verifyCode() builds a form request from a plain request and validates it; the bootstrap's FormRequest stub gains setContainer(), setRedirector() and validateResolved(), deferring to the request's own failedValidation() so the usual 422 response is attached, and illuminate/validation (a core dev dependency, not a runtime one) is now a dev dependency here too
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes PHP CI / build on #119 now that
fleetbase/core-api1.6.69 resolves and the suite runs against the real core for the first time. (Pest's own output does not reach the job log in this repo, so the failure was invisible there; locally with--log-junitthe full suite is 789 tests, 0 failing with this change.)Four tests in
CustomerControllerContractsTestfailed against the real core:used; and after the account deletion that is made to fail, it requests a fresh closure code, because the accepted one was burned. That also restores the Sentry capture count the test expects (SMS and email attempts both fail on the closure request).verification_codestables lacked theuuidandstatuscolumns thatconsume()writes.verifyCode()builds a form request from a plain request and validates it (setContainer(),setRedirector(),validateResolved()). The bootstrap'sFormRequeststub now has those, deferring to the request's ownfailedValidation()so the 422 response is attached.illuminate/validationis added as a dev dependency: core-api only lists it under its ownrequire-dev, so nothing installed it here and the test could not construct a validator.No runtime code changes.