mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 12:43:33 +09:00
Squashed 'includes/lib/action-scheduler/' content from commit c82834771
git-subtree-dir: includes/lib/action-scheduler git-subtree-split: c828347715e6c3318c8ab8b4fea2d87b31d51aac
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* ActionScheduler_Mocker
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/**
|
||||
* ActionScheduler_Mocker class.
|
||||
*/
|
||||
class ActionScheduler_Mocker {
|
||||
|
||||
/**
|
||||
* Do not run queues via async requests.
|
||||
*
|
||||
* @param ActionScheduler_Store $store
|
||||
*/
|
||||
public static function get_queue_runner( ActionScheduler_Store $store = null ) {
|
||||
|
||||
if ( ! $store ) {
|
||||
$store = ActionScheduler_Store::instance();
|
||||
}
|
||||
|
||||
return new ActionScheduler_QueueRunner( $store, null, null, self::get_async_request_queue_runner( $store ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an instance of the mock queue runner
|
||||
*
|
||||
* @param ActionScheduler_Store $store
|
||||
*/
|
||||
protected static function get_async_request_queue_runner( ActionScheduler_Store $store ) {
|
||||
return new ActionScheduler_Mock_AsyncRequest_QueueRunner( $store );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user