Class SimpleSignatureMap

Description

Retrieves method actions by searching the parameter lists until an expected match is found.

Located in /mock_objects.php (line 303)


	
			
Variable Summary
 mixed $_map
Method Summary
 SimpleSignatureMap SimpleSignatureMap ()
 void add (array $parameters,  &$action, mixed $action)
 object Object &findFirstAction (array $parameters)
 boolean isMatch (array $parameters)
 void test ( &$test, array $parameters, string $message, SimpleTestCase $test)
Variables
mixed $_map (line 304)
Methods
Constructor SimpleSignatureMap (line 310)

Creates an empty call map.

  • access: public
SimpleSignatureMap SimpleSignatureMap ()
add (line 320)

Stashes a reference against a method call.

  • access: public
void add (array $parameters,  &$action, mixed $action)
  • array $parameters: Array of arguments (including wildcards).
  • mixed $action: Reference placed in the map.
  • &$action
findFirstAction (line 336)

Searches the call list for a matching parameter set. Returned by reference.

  • return: held in the first matching slot, otherwise null.
  • access: public
object Object &findFirstAction (array $parameters)
  • array $parameters: Parameters to search by without wildcards.
isMatch (line 353)

Searches the call list for a matching parameter set. True if successful.

  • return: True if a match is present.
  • access: public
boolean isMatch (array $parameters)
  • array $parameters: Parameters to search by without wildcards.
test (line 366)

Compares the incoming parameters with the internal expectation. Uses the incoming $test to dispatch the test message.

  • access: public
void test ( &$test, array $parameters, string $message, SimpleTestCase $test)
  • SimpleTestCase $test: Test to dispatch to.
  • array $parameters: The actual calling arguments.
  • string $message: The message to overlay.
  • &$test

Documentation generated on Sun, 04 May 2008 09:21:48 -0500 by phpDocumentor 1.3.0