Added SoapClientBuilder::withProxy()

This commit is contained in:
Francis Besset
2011-10-11 22:07:16 +02:00
parent 55a9b6e233
commit d6c9074c94
2 changed files with 24 additions and 0 deletions

View File

@ -76,6 +76,17 @@ class SoapClientBuilderTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($this->mergeOptions(array('authentication' => SOAP_AUTHENTICATION_BASIC, 'login' => 'foo', 'password' => 'bar')), $builder->getSoapOptions());
}
public function testWithProxy()
{
$builder = $this->getSoapBuilder();
$builder->withProxy('localhost', 8080);
$this->assertEquals($this->mergeOptions(array('proxy_host' => 'localhost', 'proxy_port' => 8080)), $builder->getSoapOptions());
$builder->withProxy('127.0.0.1', 8585, 'foo', 'bar');
$this->assertEquals($this->mergeOptions(array('proxy_host' => '127.0.0.1', 'proxy_port' => 8585, 'proxy_login' => 'foo', 'proxy_password' => 'bar')), $builder->getSoapOptions());
}
public function testCreateWithDefaults()
{
$builder = SoapClientBuilder::createWithDefaults();