PHP Class ReferenceExpectation, simpletest

Afficher le fichier Open project: simpletest/simpletest Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( mixed &$value, string $message = '%s' ) Sets the reference value to compare against.
overlayMessage ( mixed $compare, SimpleDumper $dumper ) : string Overlays the generated message onto the stored user message.
test ( mixed &$compare ) : boolean Tests the expectation. True if it exactly references the held value.
testMessage ( mixed $compare ) : string Returns a human readable test message.

Méthodes protégées

Méthode Description
getDumper ( ) : SimpleDumper Accessor for the dumper.

Method Details

__construct() public méthode

Sets the reference value to compare against.
public __construct ( mixed &$value, string $message = '%s' )
$value mixed Test reference to match.
$message string Customised message on failure.

getDumper() protected méthode

Accessor for the dumper.
protected getDumper ( ) : SimpleDumper
Résultat SimpleDumper Current value dumper.

overlayMessage() public méthode

An additional message can be interjected.
public overlayMessage ( mixed $compare, SimpleDumper $dumper ) : string
$compare mixed Comparison value.
$dumper SimpleDumper For formatting the results.
Résultat string Description of success or failure.

test() public méthode

Tests the expectation. True if it exactly references the held value.
public test ( mixed &$compare ) : boolean
$compare mixed Comparison reference.
Résultat boolean True if correct.

testMessage() public méthode

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