Class MaximumCallCountExpectation

Description

Confirms that the number of calls on a method is as expected.

Located in /mock_objects.php (line 242)

SimpleExpectation
   |
   --MaximumCallCountExpectation
Method Summary
 MaximumCallCountExpectation __construct (string $method, integer $count, [string $message = '%s'])
 boolean test (integer $compare)
 string testMessage (integer $compare)
Variables

Inherited Variables

Inherited from SimpleExpectation

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

Stashes the method and expected count for later reporting.

MaximumCallCountExpectation __construct (string $method, integer $count, [string $message = '%s'])
  • string $method: Name of method to confirm against.
  • integer $count: Minimum number of calls.
  • string $message: Custom error message.

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

Tests the assertion. True if correct.

  • return: True if not over.
boolean test (integer $compare)
  • integer $compare: Measured call count.

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

Reports the comparison.

  • return: Message to show.
string testMessage (integer $compare)
  • integer $compare: Measured call count.

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

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:48 -0500 by phpDocumentor 1.4.3