DragonBe\Vies\Vies::setSoapClient PHP Méthode

setSoapClient() public méthode

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
Résultat Vies
    public function setSoapClient($soapClient)
    {
        $this->soapClient = $soapClient;
        return $this;
    }

Usage Example

Exemple #1
0
 /**
  * @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());
 }