Skip to content

Commit 0581256

Browse files
herndlmondrejmirtes
authored andcommitted
Add failing test for notSame issue
1 parent ba4a79a commit 0581256

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

tests/Type/WebMozartAssert/data/impossible-check.php

+23-1
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,30 @@ public function stringNotEmpty(string $a, string $b, string $c, ?string $d, ?str
5353
Assert::nullOrStringNotEmpty($e);
5454
}
5555

56+
public function same(Bar $a, Bar $b): void
57+
{
58+
Assert::same($a, $b);
59+
Assert::same(new Baz(), new Baz());
60+
Assert::same(Baz::create(), Baz::create());
61+
}
62+
63+
public function notSame(Bar $a, Bar $b): void
64+
{
65+
Assert::notSame($a, $b);
66+
Assert::notSame(new Baz(), new Baz());
67+
Assert::notSame(Baz::create(), Baz::create());
68+
}
69+
5670
}
5771

5872
interface Bar {};
5973

60-
class Baz {}
74+
class Baz
75+
{
76+
77+
public static function create(): self
78+
{
79+
return new self();
80+
}
81+
82+
}

0 commit comments

Comments
 (0)