minor #33067 [VarDumper] Fix test patern to handle callstack with/without return typehint (jderusse)
This PR was merged into the 4.3 branch.
Discussion
----------
[VarDumper] Fix test patern to handle callstack with/without return typehint
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
The TestCase::tearDownAfterClass methods does not always have the same signature which change the output of the reflection. This use another methods for testing
Commits
-------
feaadd1c0b
Fix tst patern to handle callstack with/without return typehint
This commit is contained in:
commit
1b98df7c64
@ -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)
|
||||||
|
Reference in New Issue
Block a user