class PhpDocLinksCheckTest extends PhpDocCheckTestCase (View source)

Methods

createMockStorageManager()

Create a mock StubDataQueryInterface.

createMockFunction(string $name, array $parameters = [], $returnType = null)

Create a mock PHPFunction with the given id/name.

createMockClass(string $name, array $methods = [])

Create a mock PHPClass with the given id/name.

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).

createMockProperty(string $name, string|null $sinceVersion = null, string|null $removedVersion = null)

Create a mock PHPProperty with the given name and optional version bounds.

createMockMethod(string $name, array $parameters = [], $returnType = null)

Create a mock PHPMethod with the given name.

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.

createType(string $typeName)

Create a StandaloneType with the given type name.

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

makeMethodWithPhpDoc(string $name, string|null $phpDoc = null)

No description

makePhpDocFunction(string $id, string|null $phpDoc = null)

No description

void
setUp()

No description

void
tearDown()

No description

void
testSupportsAllVersions()

No description

void
testEntityNotFoundSucceeds()

No description

void
void
testHttpsLinkSucceeds()

No description

void
testHttpLinkIsFailure()

No description

void
void
void
void
void
void
void
void
void
void
testLivenessCheckFailsFor404()

No description

void
testLivenessCheckFailsFor410()

No description

void
void
void

Details

protected StubDataQueryInterface createMockStorageManager()

Create a mock StubDataQueryInterface.

Return Value

StubDataQueryInterface

protected PHPFunction createMockFunction(string $name, array $parameters = [], $returnType = null)

Create a mock PHPFunction with the given id/name.

Parameters

string $name
array $parameters
$returnType

Return Value

PHPFunction

protected PHPClass createMockClass(string $name, array $methods = [])

Create a mock PHPClass with the given id/name.

Parameters

string $name
array $methods

Return Value

PHPClass

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).

Parameters

string $name

Class name/ID

string|null $namespace

Class namespace

bool|null $isFinal

Whether class is final

bool|null $isReadonly

Whether class is readonly

array $methods

Array of methods

PHPClass|null $parentClass

Parent class object

array $interfaces
array $properties

Return Value

PHPClass

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.

Parameters

string $name
string|null $sinceVersion
string|null $removedVersion

Return Value

PHPProperty

protected PHPMethod createMockMethod(string $name, array $parameters = [], $returnType = null)

Create a mock PHPMethod with the given name.

Parameters

string $name
array $parameters
$returnType

Return Value

PHPMethod

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).

Parameters

string $name

Parameter name

mixed|null $type

Parameter type (optional)

string|null $sinceVersion

Version when parameter was introduced (optional)

string|null $removedVersion

Version when parameter was removed (optional)

Return Value

PHPParameter

protected StandaloneType createType(string $typeName)

Create a StandaloneType with the given type name.

Parameters

string $typeName

Return Value

StandaloneType

protected object createMockType(string $typeString)

Create a mock type that returns a string representation.

Parameters

string $typeString

Return Value

object

__construct(string $typeName)

No description

Parameters

string $typeName

string __toString()

No description

Return Value

string

string getTypeName()

No description

Return Value

string

protected PHPMethod makeMethodWithPhpDoc(string $name, string|null $phpDoc = null)

No description

Parameters

string $name
string|null $phpDoc

Return Value

PHPMethod

protected PHPFunction makePhpDocFunction(string $id, string|null $phpDoc = null)

No description

Parameters

string $id
string|null $phpDoc

Return Value

PHPFunction

protected StubDataQueryInterface makeStubsWithClass(PHPClass $class)

No description

Parameters

PHPClass $class

Return Value

StubDataQueryInterface

protected StubDataQueryInterface makeStubsWithFunction(PHPFunction $function)

No description

Parameters

PHPFunction $function

Return Value

StubDataQueryInterface

protected void setUp()

No description

Return Value

void

protected void tearDown()

No description

Return Value

void

void testSupportsAllVersions()

No description

Return Value

void

void testEntityNotFoundSucceeds()

No description

Return Value

void

void testEntityWithNoPhpDocSucceeds()

No description

Return Value

void

void testEntityWithPhpDocButNoLinkTagSucceeds()

No description

Return Value

void

void testHttpsLinkSucceeds()

No description

Return Value

void

void testHttpLinkIsFailure()

No description

Return Value

void

void testNonUrlLinkReferenceIsIgnored()

No description

Return Value

void

void testMultipleHttpLinksAllReported()

No description

Return Value

void

void testMixedLinksOnlyHttpFlagged()

No description

Return Value

void

void testHttpLinkInMethodPhpDocIsFailure()

No description

Return Value

void

void testHttpsLinkInMethodPhpDocSucceeds()

No description

Return Value

void

void testFunctionWithHttpsLinkSucceeds()

No description

Return Value

void

void testFunctionWithHttpLinkIsFailure()

No description

Return Value

void

void testLivenessNotCheckedByDefault()

No description

Return Value

void

void testLivenessCheckPassesFor200()

No description

Return Value

void

void testLivenessCheckFailsFor404()

No description

Return Value

void

void testLivenessCheckFailsFor410()

No description

Return Value

void

void testLivenessCheckFailsOnConnectionFailure()

No description

Return Value

void

void testLivenessCheckPassesFor403()

No description

Return Value

void

void testLivenessCheckPassesFor301()

No description

Return Value

void

void testHttpLinkSkipsLivenessCheck()

No description

Return Value

void

void testKnownProblemAtEntityLevelSkipsCheck()

No description

Return Value

void