Skip to content

Commit 98965c1

Browse files
committed
feat: additional test cases to ensure strings are compared properly
1 parent 4698fa0 commit 98965c1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/EndToEndTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,18 @@ public function leastArgumentsProvider(): iterable
14791479
'args' => [1,2, "'null'", "'nulla'"],
14801480
'expected_value' => '1'
14811481
];
1482+
yield 'Should properly work all string args' => [
1483+
'args' => ["'A'","'B'","'C'"],
1484+
'expected_value' => 'A'
1485+
];
1486+
yield 'Should lexicographically compare #1' => [
1487+
'args' => ["'AA'","'AB'","'AC'"],
1488+
'expected_value' => 'AA'
1489+
];
1490+
yield 'Should lexicographically compare #2' => [
1491+
'args' => ["'AA'","'AB'","'AC'", 1],
1492+
'expected_value' => '1'
1493+
];
14821494
}
14831495

14841496
/** @dataProvider leastWithExceptionProvider */

0 commit comments

Comments
 (0)