ClassMethodsExistCheckTest
class ClassMethodsExistCheckTest extends CheckTestCase (View source)
Methods
Create a mock StubDataQueryInterface.
Create a mock PHPFunction with the given id/name.
Create a mock PHPClass with the given id/name.
Create a mock PHPClass with properties (isFinal, isReadonly, namespace, parentClass).
Create a mock PHPProperty with the given name and optional version bounds.
Create a mock PHPMethod with the given name.
Create a mock PHPParameter with the given name and type.
Create a StandaloneType with the given type name.
Create a mock type that returns a string representation.
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
No description
No description
No description
No description
No description
No description
No description
Details
protected StubDataQueryInterface
createMockStorageManager()
Create a mock StubDataQueryInterface.
protected PHPFunction
createMockFunction(string $name, array $parameters = [], $returnType = null)
Create a mock PHPFunction with the given id/name.
protected PHPClass
createMockClass(string $name, array $methods = [])
Create a mock PHPClass with the given id/name.
protected PHPClass
createMockClassWithProperties(string $name, string|null $namespace = null, bool|null $isFinal = null, bool|null $isReadonly = null, array $methods = [], PHPClass|null $parentClass = null, array $interfaces = [], array $properties = [])
Create a mock PHPClass with properties (isFinal, isReadonly, namespace, parentClass).
protected PHPProperty
createMockProperty(string $name, string|null $sinceVersion = null, string|null $removedVersion = null)
Create a mock PHPProperty with the given name and optional version bounds.
protected PHPMethod
createMockMethod(string $name, array $parameters = [], $returnType = null)
Create a mock PHPMethod with the given name.
protected PHPParameter
createMockParameter(string $name, mixed|null $type = null, string|null $sinceVersion = null, string|null $removedVersion = null)
Create a mock PHPParameter with the given name and type.
Note: Supports both getDeclaredType() and getType() methods to be compatible with different validators (ParameterNamesCheck uses getName, ParameterTypesCheck uses getType).
protected StandaloneType
createType(string $typeName)
Create a StandaloneType with the given type name.
protected object
createMockType(string $typeString)
Create a mock type that returns a string representation.
__construct(string $typeName)
No description
string
__toString()
No description
string
getTypeName()
No description
protected void
setUp()
No description
protected void
tearDown()
No description
void
testSupportsAllPhpVersions()
No description
void
testClassWithNoMethods()
No description
void
testAllReflectionMethodsPresentInStubs()
No description
void
testMissingMethodInStubsIsReported()
No description
void
testMethodNotYetAvailableIsNotCountedInStubs()
No description
void
testRemovedMethodIsNotCountedInStubs()
No description
void
testMethodInheritedFromParentClassIsCounted()
No description
void
testPsUnreservePrefixMethodMatchesRealName()
No description
void
testClassNotFoundInReflection()
No description
void
testClassNotFoundInStubs()
No description
void
testClassLevelKnownProblemSkipsAllMethodChecks()
No description
void
testMethodLevelKnownProblemSkipsSpecificMethod()
No description
void
testVersionBoundarySinceVersionEqualsPhpVersion()
No description
void
testVersionBoundaryRemovedVersionEqualsPhpVersion()
No description
void
testMethodInheritedFromInterfaceIsCounted()
No description
void
testPsUnreservePrefixInInterfaceMethodMatchesRealName()
No description
void
testMethodInheritedFromParentInterfaceChainIsCounted()
No description
void
testDeepThreeLevelClassHierarchyGrandparentMethodIsCounted()
No description
void
testCycleInClassHierarchyDoesNotCauseInfiniteLoop()
No description
void
testCycleInInterfaceHierarchyDoesNotCauseInfiniteLoop()
No description
void
testMultipleMissingMethodsAreReportedInSortedOrder()
No description
void
testMethodWithNullNameIsSkippedGracefully()
No description
void
testMethodPresentInBothParentClassAndInterfaceIsDeduplicatedAndStillFound()
No description
void
testKnownProblemVersionRangeOutsideBoundaryStillReportsFailure()
No description