WSDL\Builder\IsValid::style PHP Method

style() public static method

public static style ( string $style ) : void
$style string
return void
    public static function style($style)
    {
        $styles = [SoapBinding::RPC, SoapBinding::DOCUMENT];
        self::checkInList($style, $styles, 'Invalid style [' . $style . '] available styles: [' . implode(', ', $styles) . ']');
    }

Usage Example

Esempio n. 1
0
 /**
  * @test
  */
 public function shouldThrowExceptionWhenStyleIsInValid()
 {
     //when
     try {
         IsValid::style('INVALID_STYLE');
         $this->assertFalse(true, 'Triggered when exception is not throw');
     } catch (InvalidArgumentException $e) {
         //then
         $this->assertEquals('Invalid style [INVALID_STYLE] available styles: [RPC, DOCUMENT]', $e->getMessage());
         $this->assertInstanceOf('\\InvalidArgumentException', $e);
     }
 }
All Usage Examples Of WSDL\Builder\IsValid::style