Class CallCountExpectation

Description

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

Located in /_tests/simpletest/mock_objects.php (line 167)

SimpleExpectation
   |
   --CallCountExpectation
Variable Summary
mixed $_count
mixed $_method
Method Summary
CallCountExpectation CallCountExpectation (string $method, integer $count, [string $message = '%s'])
boolean test (integer $compare)
string testMessage (integer $compare)
Variables
mixed $_count (line 169)
mixed $_method (line 168)

Inherited Variables

Inherited from SimpleExpectation

SimpleExpectation::$_dumper
SimpleExpectation::$_message
Methods
Constructor CallCountExpectation (line 178)

Stashes the method and expected count for later reporting.

CallCountExpectation CallCountExpectation (string $method, integer $count, [string $message = '%s'])
  • string $method: Name of method to confirm against.
  • integer $count: Expected number of calls.
  • string $message: Custom error message.
test (line 190)

Tests the assertion. True if correct.

  • return: True if expected.
  • access: public
boolean test (integer $compare)
  • integer $compare: Measured call count.

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

Reports the comparison.

  • return: Message to show.
  • access: public
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::SimpleExpectation()
SimpleExpectation::isExpectation()
SimpleExpectation::overlayMessage()
SimpleExpectation::test()
SimpleExpectation::testMessage()
SimpleExpectation::_getDumper()

Documentation generated on Sun, 02 Jan 2011 23:18:00 +0000 by phpDocumentor 1.4.3