@@ -53,6 +53,10 @@ public static function getTests(): array
5353 $ normalList = ['foo ' => 'b ' , 3 ];
5454 unset($ normalList ['foo ' ]);
5555
56+ $ a = new ToStringClass ('testString ' );
57+ $ b = new ToStringClass ('testString ' );
58+ $ c = new ToStringClass ('otherString ' );
59+
5660 return [
5761 ['string ' , ['value ' ], true ],
5862 ['string ' , ['' ], true ],
@@ -251,6 +255,9 @@ public static function getTests(): array
251255 ['eq ' , [1 , '1 ' ], true ],
252256 ['eq ' , [1 , true ], true ],
253257 ['eq ' , [1 , 0 ], false ],
258+ ['eq ' , [$ a , $ a ], true ],
259+ ['eq ' , [$ a , $ b ], true ],
260+ ['eq ' , [$ a , $ c ], false ],
254261 ['notEq ' , [1 , 0 ], true ],
255262 ['notEq ' , [1 , 1 ], false ],
256263 ['notEq ' , [1 , '1 ' ], false ],
@@ -259,10 +266,14 @@ public static function getTests(): array
259266 ['same ' , [1 , '1 ' ], false ],
260267 ['same ' , [1 , true ], false ],
261268 ['same ' , [1 , 0 ], false ],
269+ ['same ' , [$ a , $ b ], false ],
270+ ['same ' , [$ a , $ a ], true ],
262271 ['notSame ' , [1 , 0 ], true ],
263272 ['notSame ' , [1 , 1 ], false ],
264273 ['notSame ' , [1 , '1 ' ], true ],
265274 ['notSame ' , [1 , true ], true ],
275+ ['notSame ' , [$ a , $ b ], true ],
276+ ['notSame ' , [$ a , $ a ], false ],
266277 ['greaterThan ' , [1 , 0 ], true ],
267278 ['greaterThan ' , [0 , 0 ], false ],
268279 ['greaterThanEq ' , [2 , 1 ], true ],
@@ -283,8 +294,15 @@ public static function getTests(): array
283294 ['notOneOf ' , [1 , ['1 ' , '2 ' , '3 ' ]], true ],
284295 ['inArray ' , [1 , [1 , 2 , 3 ]], true ],
285296 ['inArray ' , [1 , ['1 ' , '2 ' , '3 ' ]], false ],
297+ ['inArray ' , [$ a , [$ a ]], true ],
298+ ['inArray ' , [$ a , [(string ) $ a ]], false ],
299+ ['inArray ' , [$ a , [$ b ]], false ],
300+ ['inArray ' , [$ a , [$ c ]], false ],
286301 ['notInArray ' , [1 , [1 , 2 , 3 ]], false ],
287302 ['notInArray ' , [1 , ['1 ' , '2 ' , '3 ' ]], true ],
303+ ['notInArray ' , [$ a , [$ a ]], false ],
304+ ['notInArray ' , [$ a , [$ b ]], true ],
305+ ['notInArray ' , [$ a , [$ c ]], true ],
288306 ['contains ' , ['abcd ' , 'ab ' ], true ],
289307 ['contains ' , ['abcd ' , 'bc ' ], true ],
290308 ['contains ' , ['abcd ' , 'cd ' ], true ],
@@ -628,6 +646,9 @@ public static function getTests(): array
628646 ['uniqueValues ' , [['qwerty ' , 'qwerty ' ]], false ],
629647 ['uniqueValues ' , [['asdfg ' , 'qwerty ' ]], true ],
630648 ['uniqueValues ' , [[123 , '123 ' ]], false ],
649+ ['uniqueValues ' , [[$ a , $ a ]], false ],
650+ ['uniqueValues ' , [[$ a , $ b ]], false ],
651+ ['uniqueValues ' , [[$ a , $ c ]], true ],
631652 ['isStatic ' , [static function () {}], true ],
632653 ['isStatic ' , [function () {}], false ],
633654 ['notStatic ' , [static function () {}], false ],
0 commit comments