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
Add proxy support #2
Conversation
@@ -133,6 +133,24 @@ public function setContent($content) | |||
return $this->set('content', "$content"); | |||
} | |||
|
|||
/** |
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.
One leading space should be removed from this line.
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.
Fixed
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.
Unfortunately it appears the extra space has been added to additional lines instead of removed from this one. All affected lines in this file should now be made consistent with the style of the rest of the file.
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.
Oops, should all line up now.
This looks like an excellent PR. Thank you for respecting the style of the files and including tests. Will you be wanting a new tag immediately to make use of these features? |
@@ -60,6 +60,11 @@ public function testReplaceHeaders() | |||
self::assertCount(2, $options->getHeaders()); | |||
} | |||
|
|||
public function testProxy() | |||
{ | |||
self::assertSame('https://foo.com:80', (new HttpOptions)->setProxy('https://foo.com:80')->getProxy()); |
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.
I encourage developers to avoid specifying constants more than once in a test case. This slightly reduces maintenance burden if, for example, strings need to be updated in future in order for tests to pass. For example,
self::assertSame($host = 'https://foo.com:80', (new HttpOptions)->setProxy($host)->getProxy());
You can see this pattern used throughout the other test cases in this file. Also applies to SoapOptionsTest
.
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.
Thanks, I agree - that's been updated.
Thanks! |
No problem, a tag would definitely be appreciated! |
This has been tagged as 🏷️ 0.7.2. |
Adds proxy support to Net/Soap and Net/Http