Omeka_Job_Mock

Package: Job

class Omeka_Job_Mock

extends Omeka_Job_AbstractJob

implements Omeka_Job_JobInterface

Mock job class for unit tests.

property Omeka_Job_Mock::$options
property Omeka_Job_Mock::$performed
property Omeka_Job_Mock::$_db

protected Omeka_Db

property Omeka_Job_Mock::$_dispatcher

protected Omeka_Job_Dispatcher_DispatcherInterface

property Omeka_Job_Mock::$_user

protected User

property Omeka_Job_Mock::$_options

protected

Omeka_Job_Mock::__construct($options)
Parameters:
  • $options

Omeka_Job_Mock::perform()
Omeka_Job_Mock::getDb()

Getter method to expose protected properties.

Omeka_Job_Mock::getDispatcher()

Getter method to expose protected properties.

Omeka_Job_Mock::getMiscOptions()
Omeka_Job_Mock::_setOptions($options)

Set all the options associated with this task.

This is a convenience method that calls setter methods for the options given in the array. If an element in the array does not have an associated setter method, it will be passed into the options array.

Parameters:
  • $options

Omeka_Job_Mock::setDb(Omeka_Db $db)
Parameters:
Omeka_Job_Mock::setJobDispatcher(Omeka_Job_Dispatcher_DispatcherInterface $dispatcher)
Parameters:
Omeka_Job_Mock::setUser(User $user)

Set the given User object on the Job object.

Parameters:
Omeka_Job_Mock::getUser()

Get the User currently set on this Job, if any.

Returns:

User|null

Omeka_Job_Mock::resend()

Resend the job using the same options that were passed to the current job.