Overview

Namespaces

  • Evenement
  • None
  • Peridot
    • Console
    • Core
    • Reporter
    • Runner
    • Scope
    • Test
  • Symfony
    • Component
      • Console
        • Command
        • Descriptor
        • Event
        • Exception
        • Formatter
        • Helper
        • Input
        • Logger
        • Output
        • Question
        • Style
        • Tester
        • Tests
          • Command
          • Descriptor
          • Fixtures
          • Formatter
          • Helper
          • Input
          • Logger
          • Output
          • Style
          • Tester

Classes

  • Configuration

Exceptions

  • AssertException
  • Overview
  • Namespace
  • Class

Class Configuration

Configuration stores configured values used through the Peridot application lifecycle.

Namespace: Peridot
Package: Peridot
Located at Configuration.php
Methods summary
public
# __construct( )
public
# setGrep( string $grep )

Set the pattern used to load tests

Set the pattern used to load tests

Parameters

$grep

Returns


$this
public string
# getGrep( )

Returns the pattern used to load tests

Returns the pattern used to load tests

Returns

string
public
# setFocusPattern( string|null $pattern )

Set the pattern used to focus tests

Set the pattern used to focus tests

Parameters

$pattern

Returns


$this
public string|null
# getFocusPattern( )

Returns the pattern used to focus tests

Returns the pattern used to focus tests

Returns

string|null
public
# setSkipPattern( string|null $pattern )

Set the pattern used to skip tests

Set the pattern used to skip tests

Parameters

$pattern

Returns


$this
public string|null
# getSkipPattern( )

Returns the pattern used to skip tests

Returns the pattern used to skip tests

Returns

string|null
public
# setReporter( string $reporter )

Set the name of the reporter to use

Set the name of the reporter to use

Parameters

$reporter

Returns


$this
public string
# getReporter( )

Return the name of the reporter configured for use

Return the name of the reporter configured for use

Returns

string
public
# setReporters( array $reporters )

Set the names of the reporters to use

Set the names of the reporters to use

Parameters

$reporters

Returns


$this
public array
# getReporters( )

Return the names of the reporters configured for use

Return the names of the reporters configured for use

Returns

array
public
# setPath( string $path )

Set the path to load tests from

Set the path to load tests from

Parameters

$path

Returns


$this
public string
# getPath( )

Return the path being searched for tests

Return the path being searched for tests

Returns

string
public
# disableColors( )

Disable output colors

Disable output colors

Returns


$this
public
# enableColorsExplicit( )

Force output colors even without TTY support.

Force output colors even without TTY support.

Returns


$this
public boolean
# areColorsEnabled( )

Check if output colors are disabled

Check if output colors are disabled

Returns

boolean
public boolean
# areColorsEnabledExplicit( )

Check if output colors are explicitly enabled.

Check if output colors are explicitly enabled.

Returns

boolean
public
# stopOnFailure( )

Stop the suite runner when a failure occurs

Stop the suite runner when a failure occurs

Returns


$this
public boolean
# shouldStopOnFailure( )

Check if the suite runner should stop on failure

Check if the suite runner should stop on failure

Returns

boolean
public
# setConfigurationFile( string $configurationFile )

Set the path to a Peridot configuration file

Set the path to a Peridot configuration file

Parameters

$configurationFile

Returns


$this
public string
# getConfigurationFile( )

Return the path to the Peridot configuration file. Returns a relative path if it exists, otherwise return the provided value

Return the path to the Peridot configuration file. Returns a relative path if it exists, otherwise return the provided value

Returns

string
public
# setDsl( string $dsl )

Set the path to a DSL file for defining the test language used

Set the path to a DSL file for defining the test language used

Parameters

$dsl

Returns


$this
public string
# getDsl( )

Get the path to a DSL file containing test functions to use

Get the path to a DSL file containing test functions to use

Returns

string
protected
# write( $varName, $value )

Write a configuration value and persist it to the current environment.

Write a configuration value and persist it to the current environment.

Parameters

$varName
$value

Returns


$this
protected string
# normalizeRegexPattern( string $pattern )

Normalize the supplied regular expression pattern.

Normalize the supplied regular expression pattern.

Parameters

$pattern

Returns

string
protected
# writeReporters( array $reporters )

Write the reporters and persist them to the current environment.

Write the reporters and persist them to the current environment.

Parameters

$reporters

Returns


$this
Properties summary
protected boolean $colorsEnabled
# true
protected boolean $colorsEnableExplicit
# false
protected string|null $focusPattern
#
protected string|null $skipPattern
#
protected string $grep
# '*.spec.php'
protected array $reporters
# ['spec']
protected string $path
#
protected string $configurationFile
#
protected string $dsl
#
protected boolean $stopOnFailure
# false
Peridot API documentation generated by ApiGen