Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit bad5d95

Browse files
committed
Merge branch 'hotfix/109' into develop
Forward port #109
2 parents c263cce + d0d1ddb commit bad5d95

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/Client/Adapter/Proxy.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,21 @@ class Proxy extends Socket
3131
* @var array
3232
*/
3333
protected $config = [
34+
'persistent' => false,
3435
'ssltransport' => 'ssl',
3536
'sslcert' => null,
3637
'sslpassphrase' => null,
3738
'sslverifypeer' => true,
39+
'sslcafile' => null,
3840
'sslcapath' => null,
3941
'sslallowselfsigned' => false,
4042
'sslusecontext' => false,
43+
'sslverifypeername' => true,
4144
'proxy_host' => '',
4245
'proxy_port' => 8080,
4346
'proxy_user' => '',
4447
'proxy_pass' => '',
4548
'proxy_auth' => Client::AUTH_BASIC,
46-
'persistent' => false
4749
];
4850

4951
/**

test/Client/ProxyAdapterTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,19 @@ public function testProxyKeysCorrectlySetInProxyAdapter()
132132
$this->assertSame($this->host, $adapterHost);
133133
$this->assertSame($this->port, $adapterPort);
134134
}
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+
}
135150
}

0 commit comments

Comments
 (0)