Class MemberExpectation

Description

Compares an object member's value even if private.

Located in /expectation.php (line 904)

SimpleExpectation
   |
   --EqualExpectation
      |
      --IdenticalExpectation
         |
         --MemberExpectation
Method Summary
 void __construct ( $name,  $expected, string $method, string $message)
 boolean test (object $actual)
 string testMessage ( $actual, mixed $compare)
 string unmangle (string $mangled)
Variables

Inherited Variables

Inherited from SimpleExpectation

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

Sets the value to compare against.

void __construct ( $name,  $expected, string $method, string $message)
  • string $method: Method to check.
  • string $message: Customised message on failure.
  • $name
  • $expected

Redefinition of:
IdenticalExpectation::__construct()
Sets the value to compare against.
test (line 923)

Tests the expectation. True if the property value is identical.

  • return: True if identical.
boolean test (object $actual)
  • object $actual: Comparison object.

Redefinition of:
IdenticalExpectation::test()
Tests the expectation. True if it exactly matches the held value.
testMessage (line 936)

Returns a human readable test message.

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

Redefinition of:
IdenticalExpectation::testMessage()
Returns a human readable test message.
unmangle (line 979)

Removes crud from property name after it's been converted to an array.

  • return: Cleaned up name.
string unmangle (string $mangled)
  • string $mangled: Name from array cast.

Inherited Methods

Inherited From IdenticalExpectation

 IdenticalExpectation::__construct()
 IdenticalExpectation::test()
 IdenticalExpectation::testMessage()

Inherited From EqualExpectation

 EqualExpectation::__construct()
 EqualExpectation::getValue()
 EqualExpectation::test()
 EqualExpectation::testMessage()

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