PHP Class Peridot\Configuration

Datei anzeigen Open project: peridot-php/peridot Class Usage Examples

Protected Properties

Property Type Description
$colorsEnableExplicit boolean
$colorsEnabled boolean
$configurationFile string
$dsl string
$grep string
$path string
$reporter string
$stopOnFailure boolean

Public Methods

Method Description
__construct ( )
areColorsEnabled ( ) : boolean Check if output colors are disabled
areColorsEnabledExplicit ( ) : boolean Check if output colors are explicitly enabled.
disableColors ( ) Disable output colors
enableColorsExplicit ( ) Force output colors even without TTY support.
getConfigurationFile ( ) : string Return the path to the Peridot configuration file. Returns a relative path if it exists, otherwise return the provided value
getDsl ( ) : string Get the path to a DSL file containing test functions to use
getGrep ( ) : string Returns the pattern used to load tests
getPath ( ) : string Return the path being searched for tests
getReporter ( ) : string Return the name of the reporter configured for use
setConfigurationFile ( string $configurationFile ) Set the path to a Peridot configuration file
setDsl ( string $dsl ) Set the path to a DSL file for defining the test language used
setGrep ( string $grep ) Set the pattern used to load tests
setPath ( string $path ) Set the path to load tests from
setReporter ( string $reporter ) Set the name of the reporter to use
shouldStopOnFailure ( ) : boolean Check if the suite runner should stop on failure
stopOnFailure ( ) Stop the suite runner when a failure occurs

Protected Methods

Method Description
write ( $varName, $value ) Write a configuration value and persist it to the current environment.

Method Details

__construct() public method

public __construct ( )

areColorsEnabled() public method

Check if output colors are disabled
public areColorsEnabled ( ) : boolean
return boolean

areColorsEnabledExplicit() public method

Check if output colors are explicitly enabled.

disableColors() public method

Disable output colors
public disableColors ( )

enableColorsExplicit() public method

Force output colors even without TTY support.

getConfigurationFile() public method

Return the path to the Peridot configuration file. Returns a relative path if it exists, otherwise return the provided value
public getConfigurationFile ( ) : string
return string

getDsl() public method

Get the path to a DSL file containing test functions to use
public getDsl ( ) : string
return string

getGrep() public method

Returns the pattern used to load tests
public getGrep ( ) : string
return string

getPath() public method

Return the path being searched for tests
public getPath ( ) : string
return string

getReporter() public method

Return the name of the reporter configured for use
public getReporter ( ) : string
return string

setConfigurationFile() public method

Set the path to a Peridot configuration file
public setConfigurationFile ( string $configurationFile )
$configurationFile string

setDsl() public method

Set the path to a DSL file for defining the test language used
public setDsl ( string $dsl )
$dsl string

setGrep() public method

Set the pattern used to load tests
public setGrep ( string $grep )
$grep string

setPath() public method

Set the path to load tests from
public setPath ( string $path )
$path string

setReporter() public method

Set the name of the reporter to use
public setReporter ( string $reporter )
$reporter string

shouldStopOnFailure() public method

Check if the suite runner should stop on failure
public shouldStopOnFailure ( ) : boolean
return boolean

stopOnFailure() public method

Stop the suite runner when a failure occurs
public stopOnFailure ( )

write() protected method

Write a configuration value and persist it to the current environment.
protected write ( $varName, $value )
$varName
$value

Property Details

$colorsEnableExplicit protected_oe property

protected bool $colorsEnableExplicit
return boolean

$colorsEnabled protected_oe property

protected bool $colorsEnabled
return boolean

$configurationFile protected_oe property

protected string $configurationFile
return string

$dsl protected_oe property

protected string $dsl
return string

$grep protected_oe property

protected string $grep
return string

$path protected_oe property

protected string $path
return string

$reporter protected_oe property

protected string $reporter
return string

$stopOnFailure protected_oe property

protected bool $stopOnFailure
return boolean