DragonBe\Vies\Vies::setSoapClient PHP 메소드

setSoapClient() 공개 메소드

Sets the PHP SOAP Client and allows you to override the use of the native PHP SoapClient for testing purposes or for better integration in your own application.
public setSoapClient ( SoapClient $soapClient ) : Vies
$soapClient SoapClient
리턴 Vies
    public function setSoapClient($soapClient)
    {
        $this->soapClient = $soapClient;
        return $this;
    }

Usage Example

예제 #1
0
파일: ViesTest.php 프로젝트: dragonbe/vies
 /**
  * @covers \DragonBe\Vies\Vies::setOptions
  * @covers \DragonBe\Vies\Vies::getOptions
  */
 public function testSettingSoapOptions()
 {
     if (defined('HHVM_VERSION')) {
         $this->markTestSkipped('This test does not work for HipHop VM');
     }
     $options = array('soap_version' => SOAP_1_1);
     $vies = new Vies();
     $vies->setSoapClient($this->_createdStubbedViesClient('blabla')->getSoapClient());
     $vies->setOptions($options);
     $soapClient = $vies->getSoapClient();
     $actual = $soapClient->_soap_version;
     $this->assertSame($options['soap_version'], $actual);
     $this->assertSame($options, $vies->getOptions());
 }