class StubsFunctionParserTest extends TestCase (View source)

Methods

void
setUp()

No description

testItDeclaresAndReturnsPHPFunction()

Pins both halves of parse()'s type contract. assertInstanceOf alone is weak here: it keeps passing if the : PHPFunction declaration is dropped or widened, as long as the body still happens to return the right thing. Asserting the declared return type catches the loosening itself, which is the change that would silently let a different entity type escape.

testItCanParseNamespace()

No description

testItCanParseFunctionName()

No description

testItCanParseId()

No description

testItCanParseParameters()

No description

Details

protected void setUp()

No description

Return Value

void

testItDeclaresAndReturnsPHPFunction()

Pins both halves of parse()'s type contract. assertInstanceOf alone is weak here: it keeps passing if the : PHPFunction declaration is dropped or widened, as long as the body still happens to return the right thing. Asserting the declared return type catches the loosening itself, which is the change that would silently let a different entity type escape.

testItCanParseSimpleFunctionName()

No description

testItSetsRootNamespaceForFunctionWithoutNamespace()

No description

testItCanParseNamespace()

No description

testItCanParseFunctionName()

No description

testItCanParseId()

No description

testItCanParseIdWithRootNamespace()

No description

testItCanParseNonDeprecatedFunction()

No description

testItCanParseDeprecatedFunction()

No description

testItSetsEmptyArrayIfNoParametersInFunction()

No description

testItCanParseParameters()

No description

testItReturnsCorrectInstanceForParameter()

No description

testItReturnsActuallyParsedParameters()

No description

testItCanParseSimpleReturnType()

No description

testItCanParseUnionReturnType()

No description

testItCanParseFunctionWithSingleParameter()

No description

testItCanParseLanguageLevelTypeAwareOnReturnType()

No description

testFunctionWithoutLanguageLevelTypeAware()

No description

testItCanParseLanguageLevelTypeAwareOnParameter()

No description