PHP Class BetterReflectionTest\Reflection\ReflectionFunctionAbstractTest

Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: roave/better-reflection

Méthodes publiques

Méthode Description
generatorProvider ( ) : array These generator tests were taken from nikic/php-parser - so a big thank you and credit to @nikic for this (and the awesome PHP-Parser library).
returnTypeFunctionProvider ( )
returnsReferenceProvider ( )
startEndLineProvider ( )
testAddParameter ( )
testCannotClone ( )
testExportThrowsException ( )
testGetAst ( )
testGetBodyAst ( )
testGetBodyCode ( )
testGetDocBlockReturnTypes ( )
testGetDocCommentWithComment ( )
testGetDocReturnsEmptyStringWithNoComment ( )
testGetFileName ( )
testGetLocatedSource ( )
testGetNumberOfParameters ( )
testGetParameter ( )
testGetParameterReturnsNullWhenNotFound ( )
testGetReturnStatementAstDoesNotGiveInnerScopeReturnStatements ( )
testGetReturnStatementAstReturnsStatements ( )
testGetReturnTypeReturnsNullWhenTypeIsNotDeclared ( )
testGetReturnTypeWithDeclaredType ( string $functionToReflect, string $expectedType )
testHasReturnTypeWhenTypeDeclared ( )
testHasReturnTypeWhenTypeIsNotDeclared ( )
testIsClosureWithClosure ( )
testIsClosureWithRegularFunction ( )
testIsDeprecated ( )
testIsGenerator ( string $php, boolean $expectingGenerator )
testIsGeneratorWhenNodeNotSet ( )
testIsInternal ( )
testIsVariadic ( string $php, boolean $expectingVariadic )
testNameMethodsWithClosure ( )
testNameMethodsWithNamespace ( )
testNameMethodsWithoutNamespace ( )
testPopulateFunctionAbstractThrowsExceptionWithInvalidNode ( )
testRemoveParameter ( )
testRemoveReturnType ( )
testReturnsReference ( string $php, boolean $expectingReturnsReference )
testSetBodyFromAst ( )
testSetBodyFromAstWithInvalidArgumentsThrowsException ( )
testSetBodyFromClosure ( )
testSetBodyFromString ( )
testSetBodyFromStringWithInvalidArgumentThrowsException ( )
testSetReturnType ( )
testStartEndLine ( string $php, integer $expectedStart, integer $expectedEnd )
variadicProvider ( )

Method Details

generatorProvider() public méthode

These generator tests were taken from nikic/php-parser - so a big thank you and credit to @nikic for this (and the awesome PHP-Parser library).
See also: https://github.com/nikic/PHP-Parser/blob/1.x/test/code/parser/stmt/function/generator.test
public generatorProvider ( ) : array
Résultat array

returnTypeFunctionProvider() public méthode

returnsReferenceProvider() public méthode

startEndLineProvider() public méthode

testAddParameter() public méthode

public testAddParameter ( )

testCannotClone() public méthode

public testCannotClone ( )

testExportThrowsException() public méthode

testGetAst() public méthode

public testGetAst ( )

testGetBodyAst() public méthode

public testGetBodyAst ( )

testGetBodyCode() public méthode

public testGetBodyCode ( )

testGetDocBlockReturnTypes() public méthode

testGetDocCommentWithComment() public méthode

testGetDocReturnsEmptyStringWithNoComment() public méthode

testGetFileName() public méthode

public testGetFileName ( )

testGetLocatedSource() public méthode

testGetNumberOfParameters() public méthode

testGetParameter() public méthode

public testGetParameter ( )

testGetParameterReturnsNullWhenNotFound() public méthode

testGetReturnStatementAstDoesNotGiveInnerScopeReturnStatements() public méthode

testGetReturnStatementAstReturnsStatements() public méthode

testGetReturnTypeReturnsNullWhenTypeIsNotDeclared() public méthode

testGetReturnTypeWithDeclaredType() public méthode

public testGetReturnTypeWithDeclaredType ( string $functionToReflect, string $expectedType )
$functionToReflect string
$expectedType string

testHasReturnTypeWhenTypeDeclared() public méthode

testHasReturnTypeWhenTypeIsNotDeclared() public méthode

testIsClosureWithClosure() public méthode

testIsClosureWithRegularFunction() public méthode

testIsDeprecated() public méthode

public testIsDeprecated ( )

testIsGenerator() public méthode

public testIsGenerator ( string $php, boolean $expectingGenerator )
$php string
$expectingGenerator boolean

testIsGeneratorWhenNodeNotSet() public méthode

testIsInternal() public méthode

public testIsInternal ( )

testIsVariadic() public méthode

public testIsVariadic ( string $php, boolean $expectingVariadic )
$php string
$expectingVariadic boolean

testNameMethodsWithClosure() public méthode

testNameMethodsWithNamespace() public méthode

testNameMethodsWithoutNamespace() public méthode

testPopulateFunctionAbstractThrowsExceptionWithInvalidNode() public méthode

testRemoveParameter() public méthode

public testRemoveParameter ( )

testRemoveReturnType() public méthode

testReturnsReference() public méthode

public testReturnsReference ( string $php, boolean $expectingReturnsReference )
$php string
$expectingReturnsReference boolean

testSetBodyFromAst() public méthode

public testSetBodyFromAst ( )

testSetBodyFromAstWithInvalidArgumentsThrowsException() public méthode

testSetBodyFromClosure() public méthode

testSetBodyFromString() public méthode

testSetBodyFromStringWithInvalidArgumentThrowsException() public méthode

testSetReturnType() public méthode

public testSetReturnType ( )

testStartEndLine() public méthode

public testStartEndLine ( string $php, integer $expectedStart, integer $expectedEnd )
$php string
$expectedStart integer
$expectedEnd integer

variadicProvider() public méthode

public variadicProvider ( )