Skip to content

Commit 8b62770

Browse files
authored
add test fixture with retunr in test method (#7108)
1 parent 90d5f29 commit 8b62770

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector\Fixture;
4+
5+
use PHPUnit\Framework\TestCase;
6+
7+
final class ReturnInTestMethod extends TestCase
8+
{
9+
public function testSomething()
10+
{
11+
return $this->getValue();
12+
}
13+
14+
private function getValue(): int
15+
{
16+
return 123;
17+
}
18+
}
19+
20+
?>
21+
-----
22+
<?php
23+
24+
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector\Fixture;
25+
26+
use PHPUnit\Framework\TestCase;
27+
28+
final class ReturnInTestMethod extends TestCase
29+
{
30+
public function testSomething(): int
31+
{
32+
return $this->getValue();
33+
}
34+
35+
private function getValue(): int
36+
{
37+
return 123;
38+
}
39+
}
40+
41+
?>

0 commit comments

Comments
 (0)