PHP Класс kahlan\matcher\ToBeCalled

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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

__get() публичный Метод

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

_buildDescription() публичный Метод

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

backtrace() публичный Метод

Gets the backtrace reference.
public backtrace ( ) : object
Результат object

description() публичный Метод

Returns the description report.
public description ( )

match() публичный статический Метод

Checks that $actual will be called.
public static match ( mixed $actual ) : boolean
$actual mixed The actual value.
Результат boolean

once() публичный Метод

Sets the number of occurences.
public once ( ) : self
Результат self

resolve() публичный Метод

Resolves the matching.
public resolve ( ) : boolean
Результат boolean Returns `true` if successfully resolved, `false` otherwise.

times() публичный Метод

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.
Результат mixed The number of occurences on get or `self` otherwise.

with() публичный Метод

Sets arguments requirement.
public with ( ) : self
Результат self

Описание свойств

$_actual защищенное свойство

A fully-namespaced function name.
protected string|object $_actual
Результат string | object

$_backtrace защищенное свойство

The expectation backtrace reference.
protected array $_backtrace
Результат array

$_description защищенное свойство

The description report.
protected array $_description
Результат array

$_message защищенное свойство

The message instance.
protected object $_message
Результат object

$_ordered защищенное свойство

If true, will take the calling order into account.
protected bool $_ordered
Результат boolean

$_report защищенное свойство

The report.
protected array $_report
Результат array

$_times защищенное свойство

Number of occurences to match.
protected int $_times
Результат integer