PHP 클래스 ParametersExpectation, simpletest

@package SimpleTest
상속: extends SimpleExpectation
파일 보기 프로젝트 열기: simpletest/simpletest 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $expected = false, string $message = '%s' ) Sets the expected parameter list.
test ( array $parameters ) : boolean Tests the assertion. True if correct.
testMessage ( $parameters ) : string Returns a human readable test message.

보호된 메소드들

메소드 설명
coerceToExpectation ( mixed $expected ) : SimpleExpectation Creates an identical expectation if the object/value is not already some type of expectation.
describeDifference ( array $expected, array $parameters ) : string Message to display if expectation differs from the parameters actually received.
renderArguments ( array $args ) : string Renders the argument list as a string for messages.
testParameter ( mixed $parameter, mixed $expected ) : boolean Tests an individual parameter.

메소드 상세

__construct() 공개 메소드

Sets the expected parameter list.
public __construct ( $expected = false, string $message = '%s' )
$message string Customised message on failure.

coerceToExpectation() 보호된 메소드

Creates an identical expectation if the object/value is not already some type of expectation.
protected coerceToExpectation ( mixed $expected ) : SimpleExpectation
$expected mixed Expected value.
리턴 SimpleExpectation Expectation object.

describeDifference() 보호된 메소드

Message to display if expectation differs from the parameters actually received.
protected describeDifference ( array $expected, array $parameters ) : string
$expected array Expected parameters as list.
$parameters array Actual parameters received.
리턴 string Description of difference.

renderArguments() 보호된 메소드

Renders the argument list as a string for messages.
protected renderArguments ( array $args ) : string
$args array Incoming arguments.
리턴 string Simple description of type and value.

test() 공개 메소드

Tests the assertion. True if correct.
public test ( array $parameters ) : boolean
$parameters array Comparison values.
리턴 boolean True if correct.

testMessage() 공개 메소드

Returns a human readable test message.
public testMessage ( $parameters ) : string
리턴 string Description of success or failure.

testParameter() 보호된 메소드

Tests an individual parameter.
protected testParameter ( mixed $parameter, mixed $expected ) : boolean
$parameter mixed Value to test.
$expected mixed Comparison value.
리턴 boolean True if expectation fulfilled.