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 TestResult

TestResults tracks passing, pending, and failing tests.

Peridot\Core\TestResult uses Peridot\Core\HasEventEmitterTrait
Namespace: Peridot\Core
Package: Peridot\Core
Located at Core/TestResult.php
Methods summary
public
# __construct( Evenement\EventEmitterInterface $eventEmitter )

Parameters

$eventEmitter
public string
# getSummary( )

Returns a summary string containing total tests run and total tests failed

Returns a summary string containing total tests run and total tests failed

Returns

string
public
# failTest( Peridot\Core\TestInterface $test, mixed $exception )

Fail the given test.

Fail the given test.

Parameters

$test
$exception
public
# pendTest( Peridot\Core\TestInterface $test )

Notify result that test is pending

Notify result that test is pending

Parameters

$test
public
# passTest( Peridot\Core\TestInterface $test )

Pass the given test.

Pass the given test.

Parameters

$test
public
# startTest( Peridot\Core\TestInterface $test )

Increment test count and emit start event

Increment test count and emit start event

Parameters

$test
public
# endTest( Peridot\Core\TestInterface $test )

Emit end event for a test

Emit end event for a test

Parameters

$test
public integer
# getFailureCount( )

Get the number of failures tracked by this result.

Get the number of failures tracked by this result.

Returns

integer
public
# setFailureCount( integer $failureCount )

Set the number of failures tracked by this result.

Set the number of failures tracked by this result.

Parameters

$failureCount
public integer
# getTestCount( )

Get the number of tests tracked by this result.

Get the number of tests tracked by this result.

Returns

integer
public
# setTestCount( integer $testCount )

Set the number of tests tracked by this result.

Set the number of tests tracked by this result.

Parameters

$testCount
public integer
# getPendingCount( )

Get the number of pending tests tracked by this test result.

Get the number of pending tests tracked by this test result.

Returns

integer
public
# setPendingCount( integer $pendingCount )

Set the number of pending tests tracked by this test result.

Set the number of pending tests tracked by this test result.

Parameters

$pendingCount
public boolean
# isFocusedByDsl( )

Returns true if focused specs were configured via DSL functions

Returns true if focused specs were configured via DSL functions

Returns

boolean
public
# setIsFocusedByDsl( boolean $isFocusedByDsl )

Mark this result as having focused specs configured via DSL functions

Mark this result as having focused specs configured via DSL functions

Parameters

$isFocusedByDsl
Methods used from Peridot\Core\HasEventEmitterTrait
getEventEmitter(), setEventEmitter()
Properties summary
protected integer $testCount

Tracks total tests run against this result

Tracks total tests run against this result

# 0
protected integer $failureCount

Tracks total number of failed tests run against this result

Tracks total number of failed tests run against this result

# 0
protected integer $pendingCount

Tracks total number of pending tests run against this result

Tracks total number of pending tests run against this result

# 0
protected boolean $isFocusedByDsl

True if focused specs were configured via DSL functions

True if focused specs were configured via DSL functions

# false
Properties used from Peridot\Core\HasEventEmitterTrait
$eventEmitter
Peridot API documentation generated by ApiGen