toBoolean() public static method

public static toBoolean ( $string ) : boolean
$string
return boolean
Beispiel #1
0
 /**
  * @test
  * @dataProvider toBoolean
  * @param $string
  * @param $expected
  */
 public function shouldConvertToBoolean($string, $expected)
 {
     //when
     $toBoolean = Booleans::toBoolean($string);
     //then
     $this->assertEquals($expected, $toBoolean, 'To convert: ' . Objects::toString($string) . ' Expected: ' . Objects::toString($expected));
 }