PHP 클래스 SimpleSignatureMap, simpletest

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

공개 메소드들

메소드 설명
__construct ( ) Creates an empty call map.
add ( array $parameters, mixed $action ) Stashes a reference against a method call.
findFirstAction ( array $parameters ) : object Searches the call list for a matching parameter set. Returned by reference.
findFirstSlot ( array $parameters ) : array Searches the map for a matching item.
isMatch ( array $parameters ) : boolean Searches the call list for a matching parameter set. True if successful.
test ( SimpleTestCase $test, array $parameters, string $message ) Compares the incoming parameters with the internal expectation.

메소드 상세

__construct() 공개 메소드

Creates an empty call map.
public __construct ( )

add() 공개 메소드

Stashes a reference against a method call.
public add ( array $parameters, mixed $action )
$parameters array Array of arguments (including wildcards).
$action mixed Reference placed in the map.

findFirstAction() 공개 메소드

Searches the call list for a matching parameter set. Returned by reference.
public findFirstAction ( array $parameters ) : object
$parameters array Parameters to search by without wildcards.
리턴 object Object held in the first matching slot, otherwise null.

findFirstSlot() 공개 메소드

Searches the map for a matching item.
public findFirstSlot ( array $parameters ) : array
$parameters array Parameters to search by without wildcards.
리턴 array Reference to slot or null.

isMatch() 공개 메소드

Searches the call list for a matching parameter set. True if successful.
public isMatch ( array $parameters ) : boolean
$parameters array Parameters to search by without wildcards.
리턴 boolean True if a match is present.

test() 공개 메소드

Uses the incoming $test to dispatch the test message.
public test ( SimpleTestCase $test, array $parameters, string $message )
$test SimpleTestCase Test to dispatch to.
$parameters array The actual calling arguments.
$message string The message to overlay.