More tweaks to match the spec#11
Merged
kouno merged 6 commits intoably:masterfrom May 8, 2015
bladeSk:master
Merged
Conversation
Merge pull request #9 from bladeSk/master
Better exception handling in tests (use error code instead of http code) Test for invalid message types
Default limit and order test for message history Tests for messages - decryption with mismatched params, request count on publishing an array of msgs, too large message Removed no longer necessary AblyEncryptionException
Changed hostTimeout to match the spec
Contributor
|
Can you rebase this on top of master? We don't need the merge commit in there. |
tests/ChannelMessagesTest.php
Outdated
Contributor
There was a problem hiding this comment.
Wouldn't this test still pass if this line wasn't throwing an exception but others did?
Contributor
Author
There was a problem hiding this comment.
Damn, you're right! Thanks for pointing that out.
Explicit string casts in ChannelHistoryTest.php Refactored ErrorInfo and AblyException
src/Exceptions/AblyException.php
Outdated
Contributor
There was a problem hiding this comment.
I'm not sure if we need to specify a default code and statusCode.
Java needs all three (message + code + statusCode) to be present https://github.com/ably/ably-java/blob/master/src/io/ably/types/AblyException.java#L37 and Ruby uses nil by default.
If you can use null here as the default it would be nice.
Contributor
|
Looks good to me. 👍 |
Member
|
Nice work, 👍 |
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.
The code should now fully conform to the spec, just a few more tests are needed