Skip to content

Commit

Permalink
Fix tst patern to handle callstack with/without return typehint
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse committed Aug 8, 2019
1 parent f773217 commit feaadd1
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -89,7 +89,7 @@ public function testFromCallableClosureCaster()
}
$var = [
(new \ReflectionMethod($this, __FUNCTION__))->getClosure($this),
(new \ReflectionMethod(__CLASS__, 'tearDownAfterClass'))->getClosure(),
(new \ReflectionMethod(__CLASS__, 'stub'))->getClosure(),
];

$this->assertDumpMatchesFormat(
Expand All @@ -100,8 +100,9 @@ public function testFromCallableClosureCaster()
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"
}
]
Expand Down Expand Up @@ -244,6 +245,10 @@ public function testGenerator()
EODUMP;
$this->assertDumpMatchesFormat($expectedDump, $generator);
}

public static function stub(): void
{
}
}

function reflectionParameterFixture(NotLoadableClass $arg1 = null, $arg2)
Expand Down

0 comments on commit feaadd1

Please sign in to comment.