Class SimpleCallSchedule

Description

Allows setting of actions against call signatures either at a specific time, or always. Specific time settings trump lasting ones, otherwise the most recently added will mask an earlier match.

Located in /mock_objects.php (line 396)


	
			
Variable Summary
 mixed $_always
 mixed $_at
 mixed $_wildcard
Method Summary
 SimpleCallSchedule SimpleCallSchedule ()
 void expectArguments ( $method,  $args,  $message)
 void register (string $method, array $args,  &$action, SimpleAction $action)
 void registerAt (integer $step, string $method, array $args,  &$action, SimpleAction $action)
 mixed &respond (integer $step, string $method, array $args)
Variables
mixed $_always (line 398)
mixed $_at (line 399)
mixed $_wildcard = MOCK_ANYTHING (line 397)
Methods
Constructor SimpleCallSchedule (line 405)

Sets up an empty response schedule.

Creates an empty call map.

SimpleCallSchedule SimpleCallSchedule ()
expectArguments (line 450)
void expectArguments ( $method,  $args,  $message)
  • $method
  • $args
  • $message
register (line 419)

Stores an action against a signature that will always fire unless masked by a time specific one.

  • access: public
void register (string $method, array $args,  &$action, SimpleAction $action)
  • string $method: Method name.
  • array $args: Calling parameters.
  • SimpleAction $action: Actually simpleByValue, etc.
  • &$action
registerAt (line 438)

Stores an action against a signature that will fire at a specific time in the future.

  • access: public
void registerAt (integer $step, string $method, array $args,  &$action, SimpleAction $action)
  • integer $step: delay of calls to this method,
    1. is next.
  • string $method: Method name.
  • array $args: Calling parameters.
  • SimpleAction $action: Actually SimpleByValue, etc.
  • &$action
respond (line 468)

Actually carry out the action stored previously, if the parameters match.

  • return: The result of the action.
mixed &respond (integer $step, string $method, array $args)
  • integer $step: Time of call.
  • string $method: Method name.
  • array $args: The parameters making up the rest of the call.

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