@@ -55,6 +55,26 @@ public static function provideBytesAt(): array
5555 ];
5656 }
5757
58+ /**
59+ * @dataProvider provideIndexOf
60+ */
61+ public function testContainsAny (?int $ result , string $ string , $ needle )
62+ {
63+ $ instance = static ::createFromString ($ string );
64+
65+ $ this ->assertSame (null !== $ instance ->indexOf ($ needle ), $ instance ->containsAny ($ needle ));
66+ }
67+
68+ /**
69+ * @dataProvider provideIndexOfIgnoreCase
70+ */
71+ public function testContainsAnyIgnoreCase (?int $ result , string $ string , $ needle )
72+ {
73+ $ instance = static ::createFromString ($ string );
74+
75+ $ this ->assertSame (null !== $ instance ->ignoreCase ()->indexOf ($ needle ), $ instance ->ignoreCase ()->containsAny ($ needle ));
76+ }
77+
5878 public function testUnwrap ()
5979 {
6080 $ expected = ['hello ' , 'world ' ];
@@ -161,7 +181,7 @@ public static function provideLength(): array
161181 /**
162182 * @dataProvider provideIndexOf
163183 */
164- public function testIndexOf (?int $ result , string $ string , string $ needle , int $ offset )
184+ public function testIndexOf (?int $ result , string $ string , $ needle , int $ offset )
165185 {
166186 $ instance = static ::createFromString ($ string );
167187
@@ -180,6 +200,7 @@ public static function provideIndexOf(): array
180200 [null , 'abc ' , 'a ' , -1 ],
181201 [null , '123abc ' , 'B ' , -3 ],
182202 [null , '123abc ' , 'b ' , 6 ],
203+ [0 , 'abc ' , ['a ' , 'e ' ], 0 ],
183204 [0 , 'abc ' , 'a ' , 0 ],
184205 [1 , 'abc ' , 'b ' , 1 ],
185206 [2 , 'abc ' , 'c ' , 1 ],
@@ -191,7 +212,7 @@ public static function provideIndexOf(): array
191212 /**
192213 * @dataProvider provideIndexOfIgnoreCase
193214 */
194- public function testIndexOfIgnoreCase (?int $ result , string $ string , string $ needle , int $ offset )
215+ public function testIndexOfIgnoreCase (?int $ result , string $ string , $ needle , int $ offset )
195216 {
196217 $ instance = static ::createFromString ($ string );
197218
@@ -208,6 +229,7 @@ public static function provideIndexOfIgnoreCase(): array
208229 [null , 'abc ' , 'a ' , -1 ],
209230 [null , 'abc ' , 'A ' , -1 ],
210231 [null , '123abc ' , 'B ' , 6 ],
232+ [0 , 'ABC ' , ['a ' , 'e ' ], 0 ],
211233 [0 , 'ABC ' , 'a ' , 0 ],
212234 [0 , 'ABC ' , 'A ' , 0 ],
213235 [1 , 'ABC ' , 'b ' , 0 ],
0 commit comments