useStyle() public static method

public static useStyle ( string $use ) : void
$use string
return void
Exemplo n.º 1
0
 /**
  * @param string $use
  * @return $this
  */
 public function setUse($use)
 {
     IsValid::useStyle($use);
     $this->use = $use;
     return $this;
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 public function shouldThrowExceptionWhenUseIsInValid()
 {
     //when
     try {
         IsValid::useStyle('INVALID_USE');
         $this->assertFalse(true, 'Triggered when exception is not throw');
     } catch (InvalidArgumentException $e) {
         //then
         $this->assertEquals('Invalid use [INVALID_USE] available uses: [LITERAL, ENCODED]', $e->getMessage());
         $this->assertInstanceOf('\\InvalidArgumentException', $e);
     }
 }