PHP Class alexia\mar\tests

Show file Open project: alexia/php7mar

Public Methods

Method Description
__construct ( $testTypes = [] ) : void Main Constructor
checkSyntax ( $filePath ) : array Check if syntax is valid and return line information if not.
getPHPBinaryPath ( ) : string Return the PHP binary location.
getPHPVersion ( ) : mixed Return the version of PHP for the selected binary.
getTestClassName ( $testType ) : string Get the class name for this test type.
registerTests ( $testType, $tests ) : void Register test(s);
setPHPBinaryPath ( $path ) : void Set the location of the PHP binary.
testLine ( $line ) : array Test the line of code and return issues found.

Method Details

__construct() public method

Main Constructor
public __construct ( $testTypes = [] ) : void
return void

checkSyntax() public method

Check if syntax is valid and return line information if not.
public checkSyntax ( $filePath ) : array
return array Test Results

getPHPBinaryPath() public method

Return the PHP binary location.
public getPHPBinaryPath ( ) : string
return string PHP binary location.

getPHPVersion() public method

Return the version of PHP for the selected binary.
public getPHPVersion ( ) : mixed
return mixed Version string or false on error.

getTestClassName() public method

Get the class name for this test type.
public getTestClassName ( $testType ) : string
return string Test Class Name

registerTests() public method

Register test(s);
public registerTests ( $testType, $tests ) : void
return void

setPHPBinaryPath() public method

Set the location of the PHP binary.
public setPHPBinaryPath ( $path ) : void
return void

testLine() public method

Test the line of code and return issues found.
public testLine ( $line ) : array
return array Any issues found