PHP Класс WithinMarginExpectation, simpletest

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

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

Метод Описание
__construct ( mixed $value, mixed $margin, string $message = '%s' ) Sets the value to compare against and the fuzziness of the match.
test ( mixed $compare ) : boolean Tests the expectation. True if it matches the held value.
testMessage ( mixed $compare ) : string Returns a human readable test message.

Защищенные методы

Метод Описание
outsideMessage ( mixed $compare ) Creates a the message for being within the range.
withinMessage ( mixed $compare ) Creates a the message for being within the range.

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

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

Used for comparing floating point values.
public __construct ( mixed $value, mixed $margin, string $message = '%s' )
$value mixed Test value to match.
$margin mixed Fuzziness of match.
$message string Customised message on failure.

outsideMessage() защищенный Метод

Creates a the message for being within the range.
protected outsideMessage ( mixed $compare )
$compare mixed Value being tested.

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

Tests the expectation. True if it matches the held value.
public test ( mixed $compare ) : boolean
$compare mixed Comparison value.
Результат boolean True if correct.

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

Returns a human readable test message.
public testMessage ( mixed $compare ) : string
$compare mixed Comparison value.
Результат string Description of success or failure.

withinMessage() защищенный Метод

Creates a the message for being within the range.
protected withinMessage ( mixed $compare )
$compare mixed Value being tested.