StubParameterParserTest
class StubParameterParserTest extends TestCase (View source)
Methods
No description
No description
No description
No description
No description
No description
&$param used to be dropped on the stub side entirely: parseNode() never called
setIsPassedByReference() and ParameterNode had no accessor for nikic's Param::$byRef, so all
10,697 cached stub parameters read false while reflection reported true for 169 of them.
No description
setPosition() was never called, so every stub parameter kept PHPParameter's constructor default of 0 while the reflection side recorded real indices. Only the second parameter onwards can tell a real position from that default, hence the three-parameter fixture.
Details
protected void
setUp()
No description
testItReturnsCorrectInstance()
No description
testItCanParseParameterName()
No description
testItCanParseMultipleParameters()
No description
testItReturnsEmptyArrayForFunctionWithNoParameters()
No description
testItParsesParametersFromFunctionWithSingleParameter()
No description
testItParsesTheByReferenceFlagPerParameter()
&$param used to be dropped on the stub side entirely: parseNode() never called
setIsPassedByReference() and ParameterNode had no accessor for nikic's Param::$byRef, so all
10,697 cached stub parameters read false while reflection reported true for 169 of them.
Asserting per-parameter (not just "at least one is true") is what distinguishes reading the flag from hardcoding it.
testItParsesByReferenceOnAVariadicParameter()
No description
testItAssignsTheSignatureIndexAsThePosition()
setPosition() was never called, so every stub parameter kept PHPParameter's constructor default of 0 while the reflection side recorded real indices. Only the second parameter onwards can tell a real position from that default, hence the three-parameter fixture.