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

  • Context
  • Runner
  • SuiteLoader

Interfaces

  • RunnerInterface
  • SuiteLoaderInterface
  • Overview
  • Namespace
  • Class

Class Context

Context tracks the state of the runner - i.e the current Suite, and provides access to Peridot's global state.

Peridot\Runner\Context uses Peridot\Core\HasEventEmitterTrait
Final
Namespace: Peridot\Runner
Package: Peridot\Runner
Located at Runner/Context.php
Methods summary
public
# clear( )

Clear the internal suite structure.

Clear the internal suite structure.

public
# setFile( $path )

Set the file for the context. This file generally represents the current file being used to load suites.

Set the file for the context. This file generally represents the current file being used to load suites.

Parameters

$path
public string
# getFile( )

Returns

string
public Peridot\Core\Suite
# getCurrentSuite( )

Returns

Peridot\Core\Suite
public
# addSuite( string $description, callable $fn, boolean|null $pending = null, boolean $focused = false )

Creates a suite and adds it to the current suite. The newly created suite will become the new "current" suite

Creates a suite and adds it to the current suite. The newly created suite will become the new "current" suite

Parameters

$description
$fn
$pending
$focused
public
# addTest( string $description, callable $fn = null, boolean|null $pending = null, boolean $focused = false )

Create a test and add it to the current suite

Create a test and add it to the current suite

Parameters

$description
$fn
$pending
$focused
public
# addSetupFunction( callable $fn )

Add a setup function for all tests in the current suite

Add a setup function for all tests in the current suite

Parameters

$fn
public
# addTearDownFunction( callable $fn )

Add a tear down function for all tests in the current suite

Add a tear down function for all tests in the current suite

Parameters

$fn
public static Peridot\Runner\Context
# getInstance( )

Singleton access to Context

Singleton access to Context

Returns

Peridot\Runner\Context
Methods used from Peridot\Core\HasEventEmitterTrait
getEventEmitter(), setEventEmitter()
Properties summary
protected array $suites
#
protected string $file
#
Properties used from Peridot\Core\HasEventEmitterTrait
$eventEmitter
Peridot API documentation generated by ApiGen