PHP Class PHPUnit_Util_Skeleton_Class, qcodo

Author: Sebastian Bergmann ([email protected])
Inheritance: extends PHPUnit_Util_Skeleton
Mostrar archivo Open project: qcodo/qcodo

Public Methods

Method Description
__construct ( string $inClassName, string $inSourceFile = '', string $outClassName = '', string $outSourceFile = '' ) Constructor.
generate ( ) : mixed Generates the class' source.

Protected Methods

Method Description
findTestedMethods ( ) : array Returns the methods of the class under test that are called from the test methods.
findVariableName ( array $tokens, integer $start ) : mixed Finds the variable name of the object for the method call that is currently being processed.
findVariablesThatReferenceClass ( array $tokens ) : array Returns the variables used in test methods that reference the class under test.

Method Details

__construct() public method

Constructor.
public __construct ( string $inClassName, string $inSourceFile = '', string $outClassName = '', string $outSourceFile = '' )
$inClassName string
$inSourceFile string
$outClassName string
$outSourceFile string

findTestedMethods() protected method

Returns the methods of the class under test that are called from the test methods.
protected findTestedMethods ( ) : array
return array

findVariableName() protected method

Finds the variable name of the object for the method call that is currently being processed.
protected findVariableName ( array $tokens, integer $start ) : mixed
$tokens array
$start integer
return mixed

findVariablesThatReferenceClass() protected method

Returns the variables used in test methods that reference the class under test.
protected findVariablesThatReferenceClass ( array $tokens ) : array
$tokens array
return array

generate() public method

Generates the class' source.
public generate ( ) : mixed
return mixed