/** * @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 shouldThrowExceptionWhenStyleIsUnsupported() { //given $style = 'UNSUPPORTED_STYLE'; //when try { XMLStyleFactory::create($style); } catch (Exception $e) { //then $this->assertEquals('Unsupported soap binding style [UNSUPPORTED_STYLE]', $e->getMessage()); } }