Skip to content

Commit c480bd9

Browse files
committed
Fix tst patern to handle callstack with/without return typehint
1 parent f773217 commit c480bd9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function testFromCallableClosureCaster()
8989
}
9090
$var = [
9191
(new \ReflectionMethod($this, __FUNCTION__))->getClosure($this),
92-
(new \ReflectionMethod(__CLASS__, 'tearDownAfterClass'))->getClosure(),
92+
(new \ReflectionMethod(__CLASS__, 'stub'))->getClosure(),
9393
];
9494

9595
$this->assertDumpMatchesFormat(
@@ -100,8 +100,9 @@ public function testFromCallableClosureCaster()
100100
file: "%sReflectionCasterTest.php"
101101
line: "%d to %d"
102102
}
103-
1 => %sTestCase::tearDownAfterClass() {
104-
file: "%sTestCase.php"
103+
1 => Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest::stub(): void {
104+
returnType: "void"
105+
file: "%sReflectionCasterTest.php"
105106
line: "%d to %d"
106107
}
107108
]
@@ -244,6 +245,11 @@ public function testGenerator()
244245
EODUMP;
245246
$this->assertDumpMatchesFormat($expectedDump, $generator);
246247
}
248+
249+
public static function stub(): void
250+
{
251+
252+
}
247253
}
248254

249255
function reflectionParameterFixture(NotLoadableClass $arg1 = null, $arg2)

0 commit comments

Comments
 (0)