getTagFor() public static method

public static getTagFor ( string $version ) : string
$version string
return string
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 shouldThrowExceptionWhenSoapVersionIsUnsupported()
 {
     //given
     $version = 'UNSUPPORTED_SOAP';
     //when
     try {
         XMLSoapVersion::getTagFor($version);
     } catch (Exception $e) {
         //then
         $this->assertEquals('Unsupported soap version [UNSUPPORTED_SOAP]', $e->getMessage());
     }
 }