PHP Class MemberExpectation, simpletest

Inheritance: extends IdenticalExpectation
Afficher le fichier Open project: simpletest/simpletest Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

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

test() public méthode

Tests the expectation. True if the property value is identical.
public test ( object $actual ) : boolean
$actual object Comparison object.
Résultat boolean True if identical.

testMessage() public méthode

Returns a human readable test message.
public testMessage ( $actual ) : string
Résultat string Description of success or failure.

unmangle() public méthode

Removes crud from property name after it's been converted to an array.
public unmangle ( string $mangled ) : string
$mangled string Name from array cast.
Résultat string Cleaned up name.