Class IsAExpectation

Description

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

Located in /expectation.php (line 739)

SimpleExpectation
   |
   --IsAExpectation
Direct descendents
Class Description
 class NotAExpectation Tests either type or class name if it's an object.
Method Summary
 IsAExpectation __construct (string $type, [string $message = '%s'])
 string canonicalType (string $type)
 string getType ()
 boolean test (string $compare)
 string testMessage (mixed $compare)
Variables

Inherited Variables

Inherited from SimpleExpectation

SimpleExpectation::$dumper
Methods
Constructor __construct (line 748)

Sets the type to compare with.

  • access: public
IsAExpectation __construct (string $type, [string $message = '%s'])
  • string $type: Type or class name.
  • string $message: Customised message on failure.

Redefinition of:
SimpleExpectation::__construct()
Creates a dumper for displaying values and sets the test message.

Redefined in descendants as:
canonicalType (line 783)

Coerces type name into a gettype() match.

  • return: Simpler type.
  • access: protected
string canonicalType (string $type)
  • string $type: User type.
getType (line 758)

Accessor for type to check against.

  • return: Type or class name.
  • access: protected
string getType ()
test (line 769)

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

  • return: True if correct.
  • access: public
boolean test (string $compare)
  • string $compare: Comparison value.

Redefinition of:
SimpleExpectation::test()
Tests the expectation. True if correct.

Redefined in descendants as:
testMessage (line 803)

Returns a human readable test message.

  • return: Description of success or failure.
  • access: public
string testMessage (mixed $compare)
  • mixed $compare: Comparison value.

Redefinition of:
SimpleExpectation::testMessage()
Returns a human readable test message.

Redefined in descendants as:

Inherited Methods

Inherited From SimpleExpectation

 SimpleExpectation::__construct()
 SimpleExpectation::getDumper()
 SimpleExpectation::isExpectation()
 SimpleExpectation::overlayMessage()
 SimpleExpectation::test()
 SimpleExpectation::testMessage()

Documentation generated on Sun, 31 Oct 2010 16:31:27 -0500 by phpDocumentor 1.4.3