Class SimpleSignatureMap

Description

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

Located in /mock_objects.php (line 286)


	
			
Method Summary
 SimpleSignatureMap __construct ()
 void add (array $parameters, mixed $action)
 object Object &findFirstAction (array $parameters)
 array &findFirstSlot (array $parameters)
 boolean isMatch (array $parameters)
 void test (SimpleTestCase $test, array $parameters, string $message)
Methods
Constructor __construct (line 292)

Creates an empty call map.

SimpleSignatureMap __construct ()
add (line 301)

Stashes a reference against a method call.

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

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

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

Searches the map for a matching item.

  • return: Reference to slot or null.
array &findFirstSlot (array $parameters)
  • array $parameters: Parameters to search by without wildcards.
isMatch (line 332)

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

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

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

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

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