This repository was archived by the owner on Jan 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -31,19 +31,21 @@ class Proxy extends Socket
31
31
* @var array
32
32
*/
33
33
protected $ config = [
34
+ 'persistent ' => false ,
34
35
'ssltransport ' => 'ssl ' ,
35
36
'sslcert ' => null ,
36
37
'sslpassphrase ' => null ,
37
38
'sslverifypeer ' => true ,
39
+ 'sslcafile ' => null ,
38
40
'sslcapath ' => null ,
39
41
'sslallowselfsigned ' => false ,
40
42
'sslusecontext ' => false ,
43
+ 'sslverifypeername ' => true ,
41
44
'proxy_host ' => '' ,
42
45
'proxy_port ' => 8080 ,
43
46
'proxy_user ' => '' ,
44
47
'proxy_pass ' => '' ,
45
48
'proxy_auth ' => Client::AUTH_BASIC ,
46
- 'persistent ' => false
47
49
];
48
50
49
51
/**
Original file line number Diff line number Diff line change @@ -132,4 +132,19 @@ public function testProxyKeysCorrectlySetInProxyAdapter()
132
132
$ this ->assertSame ($ this ->host , $ adapterHost );
133
133
$ this ->assertSame ($ this ->port , $ adapterPort );
134
134
}
135
+
136
+ public function testProxyHasAllSocketConfigs ()
137
+ {
138
+ $ socket = new \Zend \Http \Client \Adapter \Socket ();
139
+ $ socketConfig = $ socket ->getConfig ();
140
+ $ proxy = new \Zend \Http \Client \Adapter \Proxy ();
141
+ $ proxyConfig = $ proxy ->getConfig ();
142
+ foreach (array_keys ($ socketConfig ) as $ socketConfigKey ) {
143
+ $ this ->assertArrayHasKey (
144
+ $ socketConfigKey ,
145
+ $ proxyConfig ,
146
+ "Proxy adapter should have all the Socket configuration keys "
147
+ );
148
+ }
149
+ }
135
150
}
You can’t perform that action at this time.
0 commit comments