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