Skip to content

Commit e5d7a36

Browse files
Add tests
1 parent 1e117b4 commit e5d7a36

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

tests/Type/WebMozartAssert/ImpossibleCheckTypeMethodCallRuleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ public function testExtension(): void
116116
'Call to static method Webmozart\Assert\Assert::startsWith() with \'value\' and string will always evaluate to true.',
117117
126,
118118
],
119+
[
120+
'Call to static method Webmozart\Assert\Assert::implementsInterface() with \'WebmozartAssertImpossibleCheck\\\\Bar\' and \'WebmozartAssertImpossibleCheck\\\\Bar\' will always evaluate to false.',
121+
134,
122+
$tipText,
123+
],
119124
]);
120125
}
121126

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ public function testStartsWith(string $a): void
127127
Assert::startsWith("value", "bix");
128128
}
129129

130+
/** @param class-string<Bar> $a */
131+
public function implementsInterface2(string $a): void
132+
{
133+
Assert::implementsInterface($a, Bar::class);
134+
Assert::implementsInterface(Bar::class, Bar::class);
135+
}
136+
130137
}
131138

132139
interface Bar {};

0 commit comments

Comments
 (0)