PHP Класс ParametersExpectation, simpletest

@package SimpleTest
Наследование: extends SimpleExpectation
Показать файл Открыть проект Примеры использования класса

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

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