Property | Type | Description | |
---|---|---|---|
$parser | The parser to use to parse samples |
Method | Description | |
---|---|---|
assertParseTest ( mixed $expected, string $code, string $message = '' ) | Assert that running $test against $code results in $expected | |
assertParseTestFalse ( string $code, string $message = '' ) | Assert that parsing $code with buildTest()'s Test returns false | |
assertParseTestTrue ( string $code, string $message = '' ) | Assert that parsing $code with buildTest()'s Test returns true | |
parseSampleProvider ( ) : array | PHPUnit provider to provide samples and results | |
setUp ( ) | Set up the parser the same way the Scanner does | |
testDescription ( ) | ||
testLongDescription ( ) | ||
testParseSample ( ) | Run the tests supplied by {@see parseSampleProvider()} |
Method | Description | |
---|---|---|
buildTest ( ) : Psecio\Parse\RuleInterface | Method to create the test to evaluate | |
formatCodeForMessage ( string $code ) : string | Format a code string so it displays nicely in an assertion message | |
scan ( string $code ) : boolean | Scan PHP code and return the result |
public assertParseTestFalse ( string $code, string $message = '' ) | ||
$code | string | Code to test |
$message | string | Message to display on failure |
public assertParseTestTrue ( string $code, string $message = '' ) | ||
$code | string | Code to test |
$message | string | Message to display on failure |
abstract protected buildTest ( ) : Psecio\Parse\RuleInterface | ||
return | Psecio\Parse\RuleInterface | An object of the type being tested |
protected formatCodeForMessage ( string $code ) : string | ||
$code | string | The code to format |
return | string | The formatted code |
public parseSampleProvider ( ) : array | ||
return | array | Lists of samples to test against |
public testParseSample ( ) |