PHP Class kahlan\matcher\ToBeCalled

Afficher le fichier Open project: crysalead/kahlan Class Usage Examples

Protected Properties

Свойство Type Description
$_actual string | object A fully-namespaced function name.
$_backtrace array The expectation backtrace reference.
$_description array The description report.
$_message object The message instance.
$_ordered boolean If true, will take the calling order into account.
$_report array The report.
$_times integer Number of occurences to match.

Méthodes publiques

Méthode Description
__construct ( string | object $actual ) Constructor
__get ( $name ) Magic getter, if called with 'ordered' will set ordered to true.
_buildDescription ( mixed $startIndex ) Build the description of the runned ::match() call.
backtrace ( ) : object Gets the backtrace reference.
description ( ) Returns the description report.
match ( mixed $actual ) : boolean Checks that $actual will be called.
once ( ) : self Sets the number of occurences.
resolve ( ) : boolean Resolves the matching.
times ( integer $times = null ) : mixed Gets/sets the number of occurences.
with ( ) : self Sets arguments requirement.

Method Details

__construct() public méthode

Constructor
public __construct ( string | object $actual )
$actual string | object A fully-namespaced class name or an object instance.

__get() public méthode

Magic getter, if called with 'ordered' will set ordered to true.
public __get ( $name )

_buildDescription() public méthode

Build the description of the runned ::match() call.
public _buildDescription ( mixed $startIndex )
$startIndex mixed The startIndex in calls log.

backtrace() public méthode

Gets the backtrace reference.
public backtrace ( ) : object
Résultat object

description() public méthode

Returns the description report.
public description ( )

match() public static méthode

Checks that $actual will be called.
public static match ( mixed $actual ) : boolean
$actual mixed The actual value.
Résultat boolean

once() public méthode

Sets the number of occurences.
public once ( ) : self
Résultat self

resolve() public méthode

Resolves the matching.
public resolve ( ) : boolean
Résultat boolean Returns `true` if successfully resolved, `false` otherwise.

times() public méthode

Gets/sets the number of occurences.
public times ( integer $times = null ) : mixed
$times integer The number of occurences to set or none to get it.
Résultat mixed The number of occurences on get or `self` otherwise.

with() public méthode

Sets arguments requirement.
public with ( ) : self
Résultat self

Property Details

$_actual protected_oe property

A fully-namespaced function name.
protected string|object $_actual
Résultat string | object

$_backtrace protected_oe property

The expectation backtrace reference.
protected array $_backtrace
Résultat array

$_description protected_oe property

The description report.
protected array $_description
Résultat array

$_message protected_oe property

The message instance.
protected object $_message
Résultat object

$_ordered protected_oe property

If true, will take the calling order into account.
protected bool $_ordered
Résultat boolean

$_report protected_oe property

The report.
protected array $_report
Résultat array

$_times protected_oe property

Number of occurences to match.
protected int $_times
Résultat integer