Fix tst patern to handle callstack with/without return typehint

This commit is contained in:
Jérémy Derussé 2019-08-08 21:05:18 +02:00
parent f773217622
commit feaadd1c0b
No known key found for this signature in database
GPG Key ID: 2083FA5758C473D2
1 changed files with 8 additions and 3 deletions

View File

@ -89,7 +89,7 @@ EOTXT
}
$var = [
(new \ReflectionMethod($this, __FUNCTION__))->getClosure($this),
(new \ReflectionMethod(__CLASS__, 'tearDownAfterClass'))->getClosure(),
(new \ReflectionMethod(__CLASS__, 'stub'))->getClosure(),
];
$this->assertDumpMatchesFormat(
@ -100,8 +100,9 @@ array:2 [
file: "%sReflectionCasterTest.php"
line: "%d to %d"
}
1 => %sTestCase::tearDownAfterClass() {
file: "%sTestCase.php"
1 => Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest::stub(): void {
returnType: "void"
file: "%sReflectionCasterTest.php"
line: "%d to %d"
}
]
@ -244,6 +245,10 @@ Generator {
EODUMP;
$this->assertDumpMatchesFormat($expectedDump, $generator);
}
public static function stub(): void
{
}
}
function reflectionParameterFixture(NotLoadableClass $arg1 = null, $arg2)