@@ -11,7 +11,7 @@ public function testEscapesSpecialCharactersByWrappingInBackticks(): void
1111 {
1212 $ rawFilterValue = "The 17 \" O'Conner && O`Series \n OR a || 1%2 book? (draft), [alpha] " ;
1313
14- $ escapedFilterValue = FilterBy::escapeString ($ rawFilterValue );
14+ $ escapedFilterValue = FilterBy::escape ($ rawFilterValue );
1515
1616 $ this ->assertSame (
1717 "`The 17 \" O'Conner && O \\`Series \n OR a || 1%2 book? (draft), [alpha]` " ,
@@ -21,8 +21,36 @@ public function testEscapesSpecialCharactersByWrappingInBackticks(): void
2121
2222 public function testEscapesMultipleBackticksWithinAFilterString (): void
2323 {
24- $ escapedFilterValue = FilterBy::escapeString ('`left` and `right` ' );
24+ $ escapedFilterValue = FilterBy::escape ('`left` and `right` ' );
2525
2626 $ this ->assertSame ('` \\`left \\` and \\`right \\`` ' , $ escapedFilterValue );
2727 }
28+
29+ public function testEscapeBooleanTrue (): void
30+ {
31+ $ escapedFilterValue = FilterBy::escape (true );
32+
33+ $ this ->assertSame ('true ' , $ escapedFilterValue );
34+ }
35+
36+ public function testEscapeBooleanFalse (): void
37+ {
38+ $ escapedFilterValue = FilterBy::escape (false );
39+
40+ $ this ->assertSame ('false ' , $ escapedFilterValue );
41+ }
42+
43+ public function testEscapeFloat (): void
44+ {
45+ $ escapedFilterValue = FilterBy::escape (1.12 );
46+
47+ $ this ->assertSame ('1.12 ' , $ escapedFilterValue );
48+ }
49+
50+ public function testEscapeInt (): void
51+ {
52+ $ escapedFilterValue = FilterBy::escape (1 );
53+
54+ $ this ->assertSame ('1 ' , $ escapedFilterValue );
55+ }
2856}
0 commit comments