schedule_single( time(), WC_Admin_Reports_Sync::SINGLE_ORDER_ACTION ); $actions = WC_Admin_Reports_Sync::queue()->search( array( 'status' => 'pending', 'claimed' => false, 'hook' => WC_Admin_Reports_Sync::SINGLE_ORDER_ACTION, ) ); $this->assertCount( 1, $actions ); $action_ids = array_keys( $actions ); $action_id = $action_ids[0]; $action = get_post( $action_id ); $this->assertEquals( WC_Admin_ActionScheduler_wpPostStore::JOB_PRIORITY, $action->menu_order ); WC_Admin_Reports_Sync::queue()->cancel_all( WC_Admin_Reports_Sync::SINGLE_ORDER_ACTION ); } }