StubConstantDefaultValueTest
class StubConstantDefaultValueTest extends TestCase (View source)
Covers the stub-sourced fallback used when a parameter default references a constant that the host runtime cannot resolve (e.g. ext-intl not loaded).
Traits
Shared utility methods for serializers: type parsing and JSON-safe conversion.
Methods
Return the short (unqualified) form of a possibly-qualified class name.
Convert value to JSON-safe format, filtering out resources and closures
Parse a type string (already fully-qualified, as stored in the cache) back into the correct type object. Leaf names are used verbatim — see {TypeStringParser} for the grammar handled.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
protected string|null
shortClassName(string|null $name)
Return the short (unqualified) form of a possibly-qualified class name.
E.g. "\Foo\Bar" or "Foo\Bar" -> "Bar"; "Bar" -> "Bar".
protected
toJsonSafe($value)
Convert value to JSON-safe format, filtering out resources and closures
protected StandaloneType|UnionType|NullableType|NoType|IntersectionType
parseType(string|null $typeStr)
Parse a type string (already fully-qualified, as stored in the cache) back into the correct type object. Leaf names are used verbatim — see {TypeStringParser} for the grammar handled.
protected void
setUp()
No description
protected void
tearDown()
No description
void
testClassConstantDefaultResolvesFromRegistryWhenRuntimeCannot()
No description
void
testGlobalConstantDefaultResolvesFromRegistryWhenRuntimeCannot()
No description
void
testStaysNullWhenNeitherRuntimeNorRegistryKnowsTheConstant()
No description
void
testRuntimeResolutionStillWins()
No description
void
testIntlPartsIteratorDefaultIsResolvableAfterParsingIntlStub()
No description
void
testEnumCaseDefaultResolvesToReferenceWhenRuntimeCannot()
No description
void
testEnumCaseReferenceSerializesLikeRuntimeResolvedInstance()
No description
mixed
expose(mixed $value)
No description