Skip to content

Commit 248a2dc

Browse files
committed
Test that not comparable objects with the same number of properties are just considered equivalent
1 parent 512f824 commit 248a2dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/Php86/Php86Test.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ public function testClamp(): void
4040
$this->assertSame(10, clamp(12, null, 10));
4141
$this->assertSame(5, clamp(-9999, 5, null));
4242
$this->assertSame(12, clamp(12, 5, null));
43+
$a = new \InvalidArgumentException('a');
44+
$b = new \RuntimeException('b');
45+
$c = new \LogicException('c');
46+
$this->assertSame($a, clamp($a, $b, $c));
47+
$this->assertSame($b, clamp($b, $a, $c));
48+
$this->assertSame($c, clamp($c, $a, $b));
4349

4450
$errorMessage = null;
4551

0 commit comments

Comments
 (0)