-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Update checkout controller json usage #12806
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
Update checkout controller json usage #12806
Conversation
…nager and use the result factory instead
… addExceptionMessage rather than the deprecated addException
…e object manager mocking
->with(100) | ||
->will($this->returnValue($customer)); | ||
|
||
$resultJson = '{"errors": "false", "message": "A letter with further instructions will be sent to your email."}'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmanners Please can you split this up so the line doesn't exceed 120 characters? I'd do it myself but my VM pretends to by dying atm so I cannot run my tests locally sigh. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure I can sort that out today
@mzeis updated from your feedback. |
Thank you very much for your contribution, the change will be merged! |
Description
The controller
app/code/Magento/Checkout/Controller/Account/Create.php
uses the object manager directly when building it's json response. I have replaced the usage of object manager with the usage of$this->resultFactory->create(ResultFactory::TYPE_JSON);
Manual testing scenarios
Contribution checklist