PHP Class DoctorTestCase

Inheritance: extends UnitTestCase
Mostrar archivo Open project: peej/phpdoctor Class Usage Examples

Public Properties

Property Type Description
$appDir
$caseDir
$iniDir
$iniPath
$outputDir
$tempDir
$testDir

Public Methods

Method Description
DoctorTestCase ( $label = false ) Create new instance.
__construct ( $label = false ) Create new instance.
assertStringContains ( string $expected, string $string, boolean $ignoreInsigificantWhitespace = false ) : boolean Reports an error if the $string does not contain $expected.
assertStringContainsRx ( $expectedRx, string $string ) : boolean Reports an error if the $string does not contain $expected. $expected is a regular expression including delimiters and any modifiers.
assertStringDoesNotContain ( string $expected, string $string, boolean $ignoreInsigificantWhitespace = false ) : boolean Reports an error if the $string contains $expected. Inverse of assertStringContains().
assertStringDoesNotContainRx ( $expectedRx, string $string ) : boolean Reports an error if the $string contains $expected. Inverse of assertStringContainsRx().
clearOutputDir ( )
clearTempDir ( )
inStr ( string $haystack, string $needle, boolean $ignoreInsigificantWhitespace = false ) : boolean Returns if $haystack contains $needle.
inStrRx ( string $haystack, string $needle ) : boolean Returns if $haystack contains $needle. $needle is a regular expression including delimiters and modifiers.
readOutputFile ( $filename )
removeDir ( $dir )
runPhpDoctor ( ) : string Command line invocation to run PHPDoctor, independent of OS and include dir settings.
setIniFile ( $iniFileName )

Method Details

DoctorTestCase() public method

Create new instance.
public DoctorTestCase ( $label = false )

__construct() public method

Create new instance.
public __construct ( $label = false )

assertStringContains() public method

Can be set to ignore insignificant whitespace in HTML output. Any whitespace in $expected is then allowed to be expanded in $string. If you want to capture whitespace in $string which may also be completely absent, use a pipe in $expected (e.g. '|A cell|'). If $expected happens to contain a literal pipe, escape it with another pipe ('||').
public assertStringContains ( string $expected, string $string, boolean $ignoreInsigificantWhitespace = false ) : boolean
$expected string the needle
$string string the haystack
$ignoreInsigificantWhitespace boolean allows for additional space, tab and newline chars
return boolean

assertStringContainsRx() public method

Reports an error if the $string does not contain $expected. $expected is a regular expression including delimiters and any modifiers.
public assertStringContainsRx ( $expectedRx, string $string ) : boolean
$string string the haystack
return boolean

assertStringDoesNotContain() public method

Reports an error if the $string contains $expected. Inverse of assertStringContains().
public assertStringDoesNotContain ( string $expected, string $string, boolean $ignoreInsigificantWhitespace = false ) : boolean
$expected string the needle
$string string the haystack
$ignoreInsigificantWhitespace boolean allows for additional space, tab and newline chars
return boolean

assertStringDoesNotContainRx() public method

Reports an error if the $string contains $expected. Inverse of assertStringContainsRx().
public assertStringDoesNotContainRx ( $expectedRx, string $string ) : boolean
$string string the haystack
return boolean

clearOutputDir() public method

public clearOutputDir ( )

clearTempDir() public method

public clearTempDir ( )

inStr() public method

Can be set to ignore insignificant whitespace in HTML output. Any whitespace in $expected is then allowed to be expanded in $string. If you want to capture whitespace in $string which may also be completely absent, use a pipe in $expected (e.g. '|A cell|'). If $expected happens to contain a literal pipe, escape it with another pipe ('||'). (Quick and dirty solution for pipe escaping. Will get off track if the needle contains a chr(1) - which is rather unlikely.)
public inStr ( string $haystack, string $needle, boolean $ignoreInsigificantWhitespace = false ) : boolean
$haystack string the haystack
$needle string the needle (oh, really?!)
$ignoreInsigificantWhitespace boolean allows for additional space, tab and newline chars
return boolean

inStrRx() public method

Returns if $haystack contains $needle. $needle is a regular expression including delimiters and modifiers.
public inStrRx ( string $haystack, string $needle ) : boolean
$haystack string the haystack
$needle string the needle, as a regular expression.
return boolean

readOutputFile() public method

public readOutputFile ( $filename )

removeDir() public method

public removeDir ( $dir )

runPhpDoctor() public method

Call setIniFile first.
public runPhpDoctor ( ) : string
return string PHPDoctor messages

setIniFile() public method

public setIniFile ( $iniFileName )

Property Details

$appDir public_oe property

public $appDir

$caseDir public_oe property

public $caseDir

$iniDir public_oe property

public $iniDir

$iniPath public_oe property

public $iniPath

$outputDir public_oe property

public $outputDir

$tempDir public_oe property

public $tempDir

$testDir public_oe property

public $testDir