Author: Piotr Olaszewski (piotroo89@gmail.com)
Example #1
0
 public function setUp()
 {
     parent::setUp();
     $this->DOMDocument = new DOMDocument();
     $this->XMLUse = XMLUseFactory::create($this->useType());
     $this->soapVersion = XMLSoapVersion::getTagFor(BindingType::SOAP_11);
 }
Example #2
0
 /**
  * @param WSDLBuilder $builder
  */
 public function __construct(WSDLBuilder $builder)
 {
     $this->builder = $builder;
     $this->XMLStyle = XMLStyleFactory::create($builder->getStyle(), $builder->getParameterStyle());
     $this->XMLUse = XMLUseFactory::create($builder->getUse());
     $this->XMLSoapVersion = XMLSoapVersion::getTagFor($builder->getSoapVersion());
     $this->DOMDocument = new DOMDocument("1.0", "UTF-8");
     $this->DOMDocument->formatOutput = true;
 }
 /**
  * @test
  */
 public function shouldThrowExceptionWhenUseIsNotDefined()
 {
     //given
     $use = 'UNSUPPORTED_USE';
     //when
     try {
         XMLUseFactory::create($use);
     } catch (Exception $e) {
         //then
         $this->assertEquals('Unsupported soap binding use [UNSUPPORTED_USE]', $e->getMessage());
     }
 }