PHP Class kahlan\Log

Show file Open project: crysalead/kahlan Class Usage Examples

Protected Properties

Property Type Description
$_backtrace array The backtrace.
$_children array The reports of executed expectations.
$_data array The matcher data.
$_description string The matcher description result.
$_exception string The related exception.
$_file string The file path related to the report.
$_line string The line related to the report.
$_matcher string The matcher class name from which this report is related.
$_matcherName string The matcher name from which this report is related.
$_not boolean If it's an inverted expectation.
$_scope object The scope context instance.
$_type object The type of the report.

Public Methods

Method Description
__construct ( array $config = [] ) The Constructor.
add ( $type, array $data = [] ) Adds an expectation report and emits a report event.
backtrace ( $backtrace = [] ) : array Gets the backtrace related to the report.
children ( ) : array Gets all executed expectations reports.
data ( ) : array Gets the matcher data.
description ( ) : string Gets the matcher description result.
exception ( $exception = null ) : object Gets the exception related to the report.
file ( ) : array Gets file path related to the report.
line ( ) : array Gets line related to the report.
matcher ( ) : string Gets the matcher class name related to the report.
matcherName ( ) : string Gets the matcher name related to the report.
messages ( ) : array Gets the scope related messages.
not ( ) : string Gets the not boolean.
passed ( ) : boolean Return the state of the log.
scope ( ) : object Gets the scope context of the report.
type ( $type = null ) : string Gets the type of the report.

Method Details

__construct() public method

The Constructor.
public __construct ( array $config = [] )
$config array The Suite config array. Options are: -`'scope'` _object_: the scope context instance.

add() public method

Adds an expectation report and emits a report event.
public add ( $type, array $data = [] )
$data array The report data.

backtrace() public method

Gets the backtrace related to the report.
public backtrace ( $backtrace = [] ) : array
return array

children() public method

Gets all executed expectations reports.
public children ( ) : array
return array The executed expectations reports.

data() public method

Gets the matcher data.
public data ( ) : array
return array

description() public method

Gets the matcher description result.
public description ( ) : string
return string

exception() public method

Gets the exception related to the report.
public exception ( $exception = null ) : object
return object

file() public method

Gets file path related to the report.
public file ( ) : array
return array

line() public method

Gets line related to the report.
public line ( ) : array
return array

matcher() public method

Gets the matcher class name related to the report.
public matcher ( ) : string
return string

matcherName() public method

Gets the matcher name related to the report.
public matcherName ( ) : string
return string

messages() public method

Gets the scope related messages.
public messages ( ) : array
return array

not() public method

Gets the not boolean.
public not ( ) : string
return string

passed() public method

Return the state of the log.
public passed ( ) : boolean
return boolean

scope() public method

Gets the scope context of the report.
public scope ( ) : object
return object

type() public method

Gets the type of the report.
public type ( $type = null ) : string
return string

Property Details

$_backtrace protected property

The backtrace.
protected array $_backtrace
return array

$_children protected property

The reports of executed expectations.
protected array $_children
return array

$_data protected property

The matcher data.
protected array $_data
return array

$_description protected property

The matcher description result.
protected string $_description
return string

$_exception protected property

The related exception.
protected string $_exception
return string

$_file protected property

The file path related to the report.
protected string $_file
return string

$_line protected property

The line related to the report.
protected string $_line
return string

$_matcher protected property

The matcher class name from which this report is related.
protected string $_matcher
return string

$_matcherName protected property

The matcher name from which this report is related.
protected string $_matcherName
return string

$_not protected property

If it's an inverted expectation.
protected bool $_not
return boolean

$_scope protected property

The scope context instance.
protected object $_scope
return object

$_type protected property

The type of the report.
protected object $_type
return object