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

View File

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