@@ -81,6 +81,20 @@ public function testString()
81
81
self ::assertSame ('tom ' , Filters::string ('tom ' ));
82
82
self ::assertSame ('tom ' , Filters::stripped ('tom ' ));
83
83
self ::assertSame ('abc& ' , Filters::string ('abc& ' ));
84
+ self ::assertSame (['abc& ' , '1 ' ], Filters::string (['abc& ' , 1 ]));
85
+
86
+ // quotes
87
+ self ::assertSame ("O\'Reilly? " , Filters::quotes ("O'Reilly? " ));
88
+
89
+ // email
90
+ self ::assertSame ('' , Filters::email ([]));
91
+
92
+ // url
93
+ self ::assertSame ('' , Filters::url ([]));
94
+ self ::assertSame ('abc/hi ' , Filters::url ('abc/hi ' ));
95
+
96
+ // unsafeRaw
97
+ self ::assertSame ('abc/hi ' , Filters::unsafeRaw ('abc/hi ' ));
84
98
}
85
99
86
100
public function testNl2br ()
@@ -171,6 +185,7 @@ public function testStr2list()
171
185
172
186
public function testUnique ()
173
187
{
188
+ $ this ->assertSame ([1 ], Filters::unique (1 ));
174
189
$ this ->assertSame ([1 ], Filters::unique ([1 , 1 ]));
175
190
$ this ->assertSame (['a ' , 'b ' ], Filters::unique (['a ' , 'b ' , 'a ' ]));
176
191
$ this ->assertSame (['a ' , 2 => 'b ' ], Filters::unique (['a ' , 'a ' , 'b ' , 'a ' ]));
0 commit comments