프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_filename | string | Name and relative path of the file to be mutated | |
$_mutables | array | Array of mutable elements located in file | |
$_mutations | array | An array of generated mutations to be sequentially tested |
메소드 | 설명 | |
---|---|---|
__construct ( string $filename = null ) | Constructor; sets name and relative path of the file being mutated | |
_parseTString ( array $token ) : string | Parse a T_STRING value to identify a possible mutation type | |
cleanup ( ) | Cleanup routines for memory management | |
generate ( ) : void | Based on the current file, generate mutations | |
getFilename ( ) : string | Return the file path of the file which is currently being assessed for mutations. | |
getMutables ( ) : array | Get an array of method metainfo in tokenised form representing methods which are capable of being mutated. Note: This does not guarantee they will be mutated since this depends on the scope of supported mutations. | |
getMutations ( ) : array | Get an array of Class & Method indexed mutations containing the mutated token and that token's index in the method's block code. | |
hasMutation ( string $type ) : boolean | Check whether the current file will contain a mutation of the given type | |
setFilename ( string $filename ) | Set the file path of the file which is currently being assessed for mutations. |
메소드 | 설명 | |
---|---|---|
_parseMutables ( ) : array | Parse the given file into an array of method metainformation including class name, method name, file name, method arguments, and method body tokens. | |
_parseStringToken ( array $token, integer $index ) : mixed | Parse a given token (in string form) to identify its type and ascertain whether it can be replaced with a mutated form. The mutated form, if any, is returned for future integration into a mutated version of the source code being tested. | |
_parseToken ( array $token, integer $index ) : mixed | Parse a given token (in array form) to identify its type and ascertain whether it can be replaced with a mutated form. The mutated form, if any, is returned for future integration into a mutated version of the source code being tested. | |
_parseTokensToMutations ( array $mutables ) : void | Based on the internal array of mutable methods, generate another internal array of supported mutations accessible using getMutations(). | |
_reconstructFromTokens ( array $tokens ) : string | Reconstruct a string of source code from its constituent tokens |
public __construct ( string $filename = null ) | ||
$filename | string |
protected _parseMutables ( ) : array | ||
리턴 | array |
public _parseTString ( array $token ) : string | ||
$token | array | |
리턴 | string |
protected _parseTokensToMutations ( array $mutables ) : void | ||
$mutables | array | |
리턴 | void |
protected _reconstructFromTokens ( array $tokens ) : string | ||
$tokens | array | |
리턴 | string |
public getFilename ( ) : string | ||
리턴 | string |
public getMutables ( ) : array | ||
리턴 | array |
public getMutations ( ) : array | ||
리턴 | array |
public hasMutation ( string $type ) : boolean | ||
$type | string | The mutation type as documented |
리턴 | boolean |
public setFilename ( string $filename ) | ||
$filename | string |
protected string $_filename | ||
리턴 | string |
protected array $_mutables | ||
리턴 | array |
protected array $_mutations | ||
리턴 | array |