Author: Piotr Olaszewski (piotroo89@gmail.com)
Exemplo n.º 1
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;
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 public function shouldThrowExceptionWhenStyleIsUnsupported()
 {
     //given
     $style = 'UNSUPPORTED_STYLE';
     //when
     try {
         XMLStyleFactory::create($style);
     } catch (Exception $e) {
         //then
         $this->assertEquals('Unsupported soap binding style [UNSUPPORTED_STYLE]', $e->getMessage());
     }
 }