File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
rules-tests/CodeQuality/Rector/Class_/TypeWillReturnCallableArrowFunctionRector/Fixture Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Rector \PHPUnit \Tests \CodeQuality \Rector \Class_ \TypeWillReturnCallableArrowFunctionRector \Fixture ;
4+
5+ use PHPUnit \Framework \TestCase ;
6+ use Rector \PHPUnit \Tests \CodeQuality \Rector \Class_ \TypeWillReturnCallableArrowFunctionRector \Source \SomeMockedClass ;
7+
8+ final class FillKnownParamType extends TestCase
9+ {
10+ public function test ($ value ): void
11+ {
12+ $ this ->createMock (SomeMockedClass::class)
13+ ->method ('someMethod ' )
14+ ->with ($ this ->callback (fn ($ name ) => $ value ));
15+ }
16+ }
17+
18+ ?>
19+ -----
20+ <?php
21+
22+ namespace Rector \PHPUnit \Tests \CodeQuality \Rector \Class_ \TypeWillReturnCallableArrowFunctionRector \Fixture ;
23+
24+ use PHPUnit \Framework \TestCase ;
25+ use Rector \PHPUnit \Tests \CodeQuality \Rector \Class_ \TypeWillReturnCallableArrowFunctionRector \Source \SomeMockedClass ;
26+
27+ final class FillKnownParamType extends TestCase
28+ {
29+ public function test ($ value ): void
30+ {
31+ $ this ->createMock (SomeMockedClass::class)
32+ ->method ('someMethod ' )
33+ ->with ($ this ->callback (fn (string $ name ): int => $ value ));
34+ }
35+ }
36+
37+ ?>
You can’t perform that action at this time.
0 commit comments