-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Proper URI rendering for Zend/Http #7479
Proper URI rendering for Zend/Http #7479
Conversation
|
This PR needs unittests. |
|
Does any guidance exist as to what kinds of unit tests would be needed? |
|
need rebase |
|
samsonasik: Indeed. Done. |
|
I added a test for the issue described in #7472. |
|
need rebase again |
|
Rebase done. |
library/Zend/Http/Request.php
Outdated
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.
@return HttpUri , not ?
|
IMO this needs PR needs many more tests. There are multiple new methods introduced in
A big chunk of code in The only test which has been added is a very basic query string example. What happens with more advanced query strings? Does that work too or will it fail? |
|
If you share with me what tests you are looking for I shall add them right away. The big chunks of code being removed or added is little more than migrating the URI building logic from the Client class into the Request class. I've found two existing tests pertaining to this code which I've now copied over to the tests for the Request class. I've also expanded the query test to cover the case of multiple query parameters being set, and duplicated this test for the renderUri() and renderQueryString() functions. |
library/Zend/Http/Request.php
Outdated
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.
should be Exception\InvalidArgumentException, please add test too.
|
I fixed the exception in the setOptions() function per sasezaki's comment. As for testing the function, none exist for the original code in Client.php, but I added a basic one anyway. |
|
This issue has been moved from the |
Fixes #7472.