File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types = 1 );
2
+
3
+ namespace PHPStan \Rules ;
4
+
5
+ use PHPStan \Rules \Methods \CallMethodsRule ;
6
+ use PHPStan \Testing \RuleTestCase ;
7
+
8
+ /**
9
+ * @extends RuleTestCase<CallMethodsRule>
10
+ */
11
+ class CallMethodsRuleTest extends RuleTestCase
12
+ {
13
+
14
+ protected function getRule (): Rule
15
+ {
16
+ return self ::getContainer ()->getByType (CallMethodsRule::class);
17
+ }
18
+
19
+ public function testBug222 (): void
20
+ {
21
+ $ this ->analyse ([__DIR__ . '/data/bug-222.php ' ], []);
22
+ }
23
+
24
+ /**
25
+ * @return string[]
26
+ */
27
+ public static function getAdditionalConfigFiles (): array
28
+ {
29
+ return [
30
+ __DIR__ . '/../../extension.neon ' ,
31
+ ];
32
+ }
33
+
34
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Rules \data ;
4
+
5
+ use PHPUnit \Framework \MockObject \MockObject ;
6
+ use PHPUnit \Framework \TestCase ;
7
+
8
+ class Foo extends TestCase
9
+ {
10
+
11
+ public function doFoo (MockObject $ mockService ): void
12
+ {
13
+ $ mockService
14
+ ->expects ($ this ->exactly (1 ))
15
+ ->method ('get ' )
16
+ ->with (24 )
17
+ ->willReturn ('24 ' );
18
+ }
19
+
20
+ }
You can’t perform that action at this time.
0 commit comments