ReflectionEnumParserTest
class ReflectionEnumParserTest extends TestCase (View source)
Methods
No description
No description
No description
No description
The declared return type already guarantees the model class, so asserting
instanceof could never fail. What is not type-guaranteed — and would be a real
regression if a parser ever memoised its result — is that each call yields its own
model rather than a shared, mutable one.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
getReflectionConstants() reports enum cases alongside real constants, flagged by isEnumCase(). Cases must land in setCases(), not in the constant list — otherwise getCaseNames() stays empty and EnumCasesCheck can never fail.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
testItCanParseInternalEnums()
No description
testItCanNotParseUserEnums()
No description
testItCanNotParseInternalNonEnum()
No description
testItCanNotParseUsersNonEnum()
No description
testEachParseReturnsItsOwnEnumModel()
The declared return type already guarantees the model class, so asserting
instanceof could never fail. What is not type-guaranteed — and would be a real
regression if a parser ever memoised its result — is that each call yields its own
model rather than a shared, mutable one.
testItCanParseName()
No description
testItCanParseNamespace()
No description
testItCanParseRootNamespace()
No description
testItCanParseId()
No description
testItCanParseIdWithRootNamespace()
No description
testItCanParseFinalEnum()
No description
testItCanParseNonFinalEnum()
No description
testItCanParseReadonlyEnum()
No description
testItCanParseNonReadonlyEnum()
No description
testItReturnsEmptyArrayIfMethodsCanNotBeRead()
No description
testItReturnsEmptyArrayIfThereAreNoMethods()
No description
testItCanParseMethods()
No description
testItReturnsCorrectInstanceOfMethods()
No description
testItReturnsActuallyParsedMethods()
No description
testItReturnsEmptyArrayIfConstantsCanNotBeRead()
No description
testItReturnsEmptyArrayIfThereAreNoConstants()
No description
testItCanParseEnumConstantsPhp56()
No description
testItCanParseClassConstantsPhp71()
No description
testItSeparatesEnumCasesFromConstants()
getReflectionConstants() reports enum cases alongside real constants, flagged by isEnumCase(). Cases must land in setCases(), not in the constant list — otherwise getCaseNames() stays empty and EnumCasesCheck can never fail.
testItParsesAllEnumCases()
No description
testCasesAreEmptyWhenEveryConstantIsARealConstant()
No description
testCasesDefaultToEmptyArrayWhenConstantsCannotBeRead()
No description
testItReturnsEmptyArrayIfImplementedInterfacesCanNotBeRead()
No description
testItReturnsEmptyArrayIfThereAreNoImplementedInterfaces()
No description
testItCanParseImplementedInterfaces()
No description
testItReturnsCorrectInstanceOfImplementedInterfaces()
No description
testItReturnsAllParsedImplementedInterfaces()
No description
testItReturnsImplementedInterfacesWithCorrentName()
No description
testItReturnsImplementedInterfacesWithCorrentNamespace()
No description