-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add docs for testing flash messages. #4971
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
|
Ack! Thank you! I always forget the docs, feel free to ping me in the future about adding them 😄 |
ravage84
left a comment
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.
Looks good, except that CakePHP 3.4.7 is not released yet, but due to 2017-05-21:
https://github.com/cakephp/cakephp/milestone/132
| $expected = [ | ||
| ['id' => 1, 'lng' => 66, 'lat' => 45], | ||
| ]; | ||
| $expected = json_encode($expected, JSON_PRETTY_PRINT); |
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.
Isn't there an assertion taht does JSON encoding already?
| public function testGet() | ||
| { | ||
| $this->configRequest([ | ||
| 'headers' => ['Accept' => 'application/json'] |
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.
Since this could be quite common, I presume, couldn't we have a setAcceptsJson() or something like that?
Refs cakephp/cakephp#10626