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 Test

The main test fixture for Peridot.

Peridot\Core\AbstractTest implements Peridot\Core\TestInterface uses Peridot\Core\HasEventEmitterTrait
Extended by Peridot\Core\Test

Direct known subclasses

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

Parameters

$description
$definition
$focused

Overrides

Peridot\Core\AbstractTest::__construct()
public boolean
# isFocused( )

Return whether or not the test is focused

Return whether or not the test is focused

Returns

boolean
public
# run( Peridot\Core\TestResult $result )

Execute the test along with any setup and tear down functions.

Execute the test along with any setup and tear down functions.

Parameters

$result
protected
# executeTest( Peridot\Core\TestResult $result )

Attempt to execute setup functions and run the test definition

Attempt to execute setup functions and run the test definition

Parameters

$result
protected
# runSetup( )

Excecute the test's setup functions

Excecute the test's setup functions

protected
# runTearDown( Peridot\Core\TestResult $result, array $action )

Run the tests tear down methods and have the result perform the method indicated by $action

Run the tests tear down methods and have the result perform the method indicated by $action

Parameters

$result
$action
protected callable|null
# handleErrors( Peridot\Core\TestResult $result, array & $action )

Set an error handler to handle errors within the test

Set an error handler to handle errors within the test

Parameters

$result
$action
$action

Returns

callable|null
protected
# restoreErrorHandler( callable|null $handler )

Restore the previous error handler

Restore the previous error handler

Parameters

$handler
protected
# failIfPassing( array & $action, mixed $error )

Fail the test, but do not overwrite existing failures

Fail the test, but do not overwrite existing failures

Parameters

$action
$action
$error
Methods inherited from Peridot\Core\AbstractTest
addSetupFunction(), addTearDownFunction(), applyFocusPatterns(), forEachNodeBottomUp(), forEachNodeTopDown(), getDefinition(), getDefinitionArguments(), getDescription(), getFile(), getParent(), getPending(), getScope(), getSetupFunctions(), getTearDownFunctions(), getTitle(), setDefinitionArguments(), setFile(), setParent(), setPending(), setScope()
Methods inherited from Peridot\Core\TestInterface
getEventEmitter(), setEventEmitter()
Methods used from Peridot\Core\HasEventEmitterTrait
getEventEmitter(), setEventEmitter()
Properties inherited from Peridot\Core\AbstractTest
$definition, $definitionArguments, $description, $file, $focused, $parent, $pending, $scope, $setUpFns, $tearDownFns
Properties used from Peridot\Core\HasEventEmitterTrait
$eventEmitter
Peridot API documentation generated by ApiGen