PHP 클래스 kahlan\matcher\ToReceive

파일 보기 프로젝트 열기: crysalead/kahlan 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_backtrace array The expectation backtrace reference.
$_description array The description report.
$_expected array The expected method method name to be called.
$_messages object The messages 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, string $expected ) 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, mixed $expected = null ) : boolean Checks that $actual receive the $expected message.
once ( ) : self Sets the number of occurences.
resolve ( ) : boolean Resolves the matching.
times ( integer $times = null ) : mixed Gets/sets the number of occurences.
where ( $requirements = [] ) : self Set arguments requirement indexed by method name.
with ( ) : self Sets arguments requirement.

보호된 메소드들

메소드 설명
_check ( mixed $reference ) Check the actual value can receive messages.
_reference ( mixed $reference ) Return the actual reference which must be used.
_watch ( $message ) Watch a message.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string | object $actual, string $expected )
$actual string | object A fully-namespaced class name or an object instance.
$expected string The expected method method name to be called.

__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.

_check() 보호된 메소드

Check the actual value can receive messages.
protected _check ( mixed $reference )
$reference mixed An instance or a fully-namespaced class name.

_reference() 보호된 메소드

Return the actual reference which must be used.
protected _reference ( mixed $reference )
$reference mixed An instance or a fully-namespaced class name.

_watch() 보호된 메소드

Watch a message.
protected _watch ( $message )

backtrace() 공개 메소드

Gets the backtrace reference.
public backtrace ( ) : object
리턴 object

description() 공개 메소드

Returns the description report.
public description ( )

match() 공개 정적인 메소드

Checks that $actual receive the $expected message.
public static match ( mixed $actual, mixed $expected = null ) : boolean
$actual mixed The actual value.
$expected mixed The expected message.
리턴 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.

where() 공개 메소드

Set arguments requirement indexed by method name.
public where ( $requirements = [] ) : self
리턴 self

with() 공개 메소드

Sets arguments requirement.
public with ( ) : self
리턴 self

프로퍼티 상세

$_backtrace 보호되어 있는 프로퍼티

The expectation backtrace reference.
protected array $_backtrace
리턴 array

$_description 보호되어 있는 프로퍼티

The description report.
protected array $_description
리턴 array

$_expected 보호되어 있는 프로퍼티

The expected method method name to be called.
protected array $_expected
리턴 array

$_messages 보호되어 있는 프로퍼티

The messages instance.
protected object $_messages
리턴 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