Skip to content

Commit 5c9024f

Browse files
boesingondrejmirtes
authored andcommitted
Added failing unit test for Assert::implementsInterface
1 parent 6c5af49 commit 5c9024f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

tests/Type/WebMozartAssert/AssertTypeSpecifyingExtensionTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ public function testExtension(): void
153153
'Variable $ad is: int|string',
154154
119,
155155
],
156+
[
157+
'Variable $q is: PHPStan\Type\WebMozartAssert\Baz&PHPStan\Type\WebMozartAssert\Foo',
158+
122,
159+
],
156160
]);
157161
}
158162

tests/Type/WebMozartAssert/data/data.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,19 @@ public function doFoo($a, $b, array $c, iterable $d, $e, $f, $g, $h, $i, $j, $k,
117117

118118
Assert::integerish($ad);
119119
$ad;
120-
}
120+
121+
Assert::implementsInterface($q, Baz::class);
122+
$q;
123+
}
124+
125+
}
126+
127+
class Bar implements Baz
128+
{
121129

122130
}
123131

124-
class Bar
132+
interface Baz
125133
{
126134

127135
}

0 commit comments

Comments
 (0)