SimpleTest


SimpleTest\IsAExpectation
expectation.php at line 406

Class IsAExpectation

SimpleExpectation
└─IsAExpectation

public class IsAExpectation
extends SimpleExpectation

Tests either type or class name if it's an object.

Subpackage:
UnitTester

Constructor Summary

IsAExpectation(string type, string message)

Sets the type to compare with.

Method Summary
boolean

test(string compare)

Tests the expectation.

string

testMessage(mixed compare)

Returns a human readable test message.

Methods inherited from SimpleTest\SimpleExpectation
overlayMessage, test, testMessage

Constructor Detail

expectation.php at line 415

IsAExpectation

public IsAExpectation(string type, string message)

Sets the type to compare with.

Parameters:
type - Type or class name.
message - Customised message on failure.

Method Detail

expectation.php at line 436

test

public boolean test(string compare)

Tests the expectation. True if the type or class matches the string value.

Parameters:
compare - Comparison value.
Returns:
True if correct.

expectation.php at line 470

testMessage

public string testMessage(mixed compare)

Returns a human readable test message.

Parameters:
compare - Comparison value.
Returns:
Description of success or failure.

SimpleTest