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

  • AbstractTest
  • Scope
  • Suite
  • Test
  • TestResult

Interfaces

  • TestInterface

Traits

  • HasEventEmitterTrait
  • Overview
  • Namespace
  • Class

Class AbstractTest

Base class for Peridot Suites and Tests

Peridot\Core\AbstractTest implements Peridot\Core\TestInterface uses Peridot\Core\HasEventEmitterTrait

Direct known subclasses

Peridot\Core\Suite, Peridot\Core\Test

Indirect known subclasses

Peridot\Test\ItWasRun
Abstract
Namespace: Peridot\Core
Package: Peridot\Core
Located at Core/AbstractTest.php
Methods summary
public
# __construct( string $description, callable $definition, boolean $focused = false )

Parameters

$description
$definition
$focused
public
# addSetupFunction( callable $setupFn )

Add a function to execute before the test runs

Add a function to execute before the test runs

Parameters

$setupFn

Implementation of

Peridot\Core\TestInterface::addSetupFunction()
public
# addTearDownFunction( callable $tearDownFn )

Add a function to execute after the test runs

Add a function to execute after the test runs

Parameters

$tearDownFn

Implementation of

Peridot\Core\TestInterface::addTearDownFunction()
public string
# getDescription( )

Returns

string

Implementation of

Peridot\Core\TestInterface::getDescription()
public callable
# getDefinition( )

Returns the callable definition of the TestInterface

Returns the callable definition of the TestInterface

Returns

callable

Implementation of

Peridot\Core\TestInterface::getDefinition()
public mixed|
# setParent( Peridot\Core\TestInterface $parent )

Parameters

$parent

Returns

mixed|

Implementation of

Peridot\Core\TestInterface::setParent()
public Peridot\Core\TestInterface
# getParent( )

Returns

Peridot\Core\TestInterface

Implementation of

Peridot\Core\TestInterface::getParent()
public string
# getTitle( )

Returns the full description including parent descriptions

Returns the full description including parent descriptions

Returns

string

Implementation of

Peridot\Core\TestInterface::getTitle()
public boolean|null
# getPending( )

Return whether or not the test is pending

Return whether or not the test is pending

Returns

boolean|null

Implementation of

Peridot\Core\TestInterface::getPending()
public
# setPending( boolean $state )

Set the pending status of the test

Set the pending status of the test

Parameters

$state

Implementation of

Peridot\Core\TestInterface::setPending()
public
# applyFocusPatterns( string|null $focusPattern, string|null $skipPattern = null )

Set the focused status of the test and its children according to the supplied focus pattern and/or skip pattern

Set the focused status of the test and its children according to the supplied focus pattern and/or skip pattern

Parameters

$focusPattern
$skipPattern

Implementation of

Peridot\Core\TestInterface::applyFocusPatterns()
public array
# getSetupFunctions( )

Return all registered setup functions

Return all registered setup functions

Returns

array

Implementation of

Peridot\Core\TestInterface::getSetupFunctions()
public array
# getTearDownFunctions( )

Return all registered tear down functions

Return all registered tear down functions

Returns

array

Implementation of

Peridot\Core\TestInterface::getTearDownFunctions()
public
# forEachNodeBottomUp( callable $fn )

Execute a callback for each node in this test, starting at the bottom of the tree.

Execute a callback for each node in this test, starting at the bottom of the tree.

Parameters

$fn

Implementation of

Peridot\Core\TestInterface::forEachNodeBottomUp()
public
# forEachNodeTopDown( callable $fn )

Execute a callback for each node in this test, starting at the top of the tree.

Execute a callback for each node in this test, starting at the top of the tree.

Parameters

$fn

Implementation of

Peridot\Core\TestInterface::forEachNodeTopDown()
public Peridot\Core\Scope
# getScope( )

Return scope for this test. Scope contains instance variables for a spec

Return scope for this test. Scope contains instance variables for a spec

Returns

Peridot\Core\Scope

Implementation of

Peridot\Core\TestInterface::getScope()
public mixed
# setScope( Peridot\Core\Scope $scope )

Set the scope object for a test

Set the scope object for a test

Parameters

$scope

Returns

mixed

Implementation of

Peridot\Core\TestInterface::setScope()
public string
# getFile( )

Get the file this test belongs to.

Get the file this test belongs to.

Returns

string
public
# setFile( string $file )

Set the file this test belongs to.

Set the file this test belongs to.

Parameters

$file
public
# setDefinitionArguments( array $args )

Set arguments to be passed to the test definition when invoked.

Set arguments to be passed to the test definition when invoked.

Parameters

$args

Returns


$this

Implementation of

Peridot\Core\TestInterface::setDefinitionArguments()
public array
# getDefinitionArguments( )

Return an array of arguments to be passed to the test definition when invoked.

Return an array of arguments to be passed to the test definition when invoked.

Returns

array

Implementation of

Peridot\Core\TestInterface::getDefinitionArguments()
Methods inherited from Peridot\Core\TestInterface
getEventEmitter(), isFocused(), run(), setEventEmitter()
Methods used from Peridot\Core\HasEventEmitterTrait
getEventEmitter(), setEventEmitter()
Properties summary
protected callable $definition

The test definition as a callable.

The test definition as a callable.

#
protected array $setUpFns

A collection of functions to run before tests execute.

A collection of functions to run before tests execute.

# []
protected array $tearDownFns

A collection of functions to run after tests execute.

A collection of functions to run after tests execute.

# []
protected string $description
#
protected Peridot\Core\TestInterface $parent
#
protected boolean|null $pending
# null
protected boolean $focused
#
protected Peridot\Core\Scope $scope
#
protected string $file
#
protected array $definitionArguments
# []
Properties used from Peridot\Core\HasEventEmitterTrait
$eventEmitter
Peridot API documentation generated by ApiGen