ChunkedEncodingTest: improve tests #581
Merged
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.
ChunkedEncodingTest: move to subdirectory
There are a number of test classes which all directly relate to the
WpOrg\Requests\Requests
class.Having those test files/classes all in the
tests
root directory does not make it any clearer what these tests are actually testing. So, I'm proposing that if a class warrants multiple test classes, we create a directory named after the class and place the files in that directory.ChunkedEncodingTest: reorder methods
Move the data providers down to just below the test they apply to.
ChunkedEncodingTest: rename dataprovider methods
... to mirror the name of the test the data provider belongs with.
ChunkedEncodingTest: improve data provider
ChunkedEncodingTest: add one extra test
Just adding one extra test to document the behaviour when an empty string is passed.
As this is a protected method, I deem stringent input validation unnecessary.
ChunkedEncodingTest: stabilize the tests
$response
is an instance of theResponse
class before approaching it as such.$message
parameter to all assertions.ChunkedEncodingTest: improve documentation
Includes adding
@covers
tag.Related to #497