PHP Class IsAExpectation, simpletest

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

Méthodes publiques

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

Méthodes protégées

Méthode Description
canonicalType ( string $type ) : string Coerces type name into a is_*() match.
getType ( ) : string Accessor for type to check against.

Method Details

__construct() public méthode

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() protected méthode

Coerces type name into a is_*() match.
protected canonicalType ( string $type ) : string
$type string User type.
Résultat string Simpler type.

getType() protected méthode

Accessor for type to check against.
protected getType ( ) : string
Résultat string Type or class name.

test() public méthode

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