style() публичный статический Метод

public static style ( string $style ) : void
$style string
Результат void
Пример #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);
     }
 }
Пример #2
0
 /**
  * @param string $style
  * @return $this
  * @throws InvalidArgumentException
  */
 public function setStyle($style)
 {
     IsValid::style($style);
     $this->style = $style;
     return $this;
 }