PHP Класс MemberExpectation, simpletest

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

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

Метод Описание
__construct ( $name, $expected ) Sets the value to compare against.
test ( object $actual ) : boolean Tests the expectation. True if the property value is identical.
testMessage ( $actual ) : string Returns a human readable test message.
unmangle ( string $mangled ) : string Removes crud from property name after it's been converted to an array.

Приватные методы

Метод Описание
getPrivatePropertyNoMatterWhat ( string $name, object $object ) : mixed Extracts a private member's value when reflection won't play ball.
getProperty ( string $name, object $object ) : mixed Extracts the member value even if private using reflection.

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

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

Sets the value to compare against.
public __construct ( $name, $expected )

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

Tests the expectation. True if the property value is identical.
public test ( object $actual ) : boolean
$actual object Comparison object.
Результат boolean True if identical.

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

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

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

Removes crud from property name after it's been converted to an array.
public unmangle ( string $mangled ) : string
$mangled string Name from array cast.
Результат string Cleaned up name.