ReflectionValueNormalizerTest
class ReflectionValueNormalizerTest extends TestCase (View source)
Covers makeSerializable(): turning a value read from the Reflection API into something that survives the Stage 1 -> Stage 2 serialization hop.
These tests moved here with the method itself, from ReflectionMethodExtractorTest. Enum-case handling is covered separately in EnumCaseSerializationTest, which also pins the rendering equivalence that keeps the reflection caches byte-identical.
Methods
No description
No description
No description
No description
Asserts where the recursion stops, not merely that it stopped.
The default $maxDepth is part of the contract: every caller in the reflection pipeline relies on it rather than passing a depth. Pinned behaviourally so that changing the default fails here rather than silently altering every cached reflection payload.
The boundary is >=, so a depth already at the limit yields null without inspecting the
value at all — including for a plain scalar that would otherwise pass straight through.
No description
No description
No description
Details
testItHandlesNullAndFalseCorrectly()
No description
testItHandlesPrimitives()
No description
testItRecursivelyProcessesArrays()
No description
testItWrapsReflectionClassToAdaptedReflectionClass()
No description
testItTruncatesAtMaxDepthInsteadOfRecursingForever()
Asserts where the recursion stops, not merely that it stopped.
assertIsArray($result) alone could not fail: the top-level value is an array whatever
$maxDepth does, so deleting the depth guard entirely left the test green while the recursion
became unbounded. The exact expected tree below pins both halves of the contract — that
truncation happens, and that it happens no earlier than $maxDepth.
testItAppliesMaxDepthThreeByDefault()
The default $maxDepth is part of the contract: every caller in the reflection pipeline relies on it rather than passing a depth. Pinned behaviourally so that changing the default fails here rather than silently altering every cached reflection payload.
testItReturnsNullWhenAlreadyAtMaxDepth()
The boundary is >=, so a depth already at the limit yields null without inspecting the
value at all — including for a plain scalar that would otherwise pass straight through.
testItReturnsAdaptedReflectionObjectsAsIs()
No description
testItConvertsObjectsWithToStringToString()
No description
__toString()
No description