create() public static method

public static create ( string $style, string $parameterStyle = SoapBinding::BARE ) : WSDL\XML\XMLStyle\XMLStyle
$style string
$parameterStyle string
return WSDL\XML\XMLStyle\XMLStyle
Ejemplo 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;
 }
Ejemplo 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());
     }
 }