PHP Класс IsAExpectation, simpletest

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

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

Метод Описание
__construct ( string $type, string $message = '%s' ) Sets the type to compare with.
test ( string $compare ) : boolean Tests the expectation. True if the type or class matches the string value.
testMessage ( mixed $compare ) : string Returns a human readable test message.

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

Метод Описание
canonicalType ( string $type ) : string Coerces type name into a is_*() match.
getType ( ) : string Accessor for type to check against.

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

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

Sets the type to compare with.
public __construct ( string $type, string $message = '%s' )
$type string Type or class name.
$message string Customised message on failure.

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

Coerces type name into a is_*() match.
protected canonicalType ( string $type ) : string
$type string User type.
Результат string Simpler type.

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

Accessor for type to check against.
protected getType ( ) : string
Результат string Type or class name.

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

Tests the expectation. True if the type or class matches the string value.
public test ( string $compare ) : boolean
$compare string 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.