This commit fixes a bug in WC_Customer_Download_Data_Store::get_downloads() that made impossible to change the order in which the query returned the results. This method accepts the arguments `order_by` and `order` but it was ignoring them and always using the default values ('permission_id' and 'ASC' respectively).
One of the assertions of the WC_Customer_Download_Data_Store::get_downloads() test method was modified to make sure the code now works.
This bug was introduced by commit a443419.
* Test for main WooCommerce class
* Check all class instances created from main class.
* Test all constants
* Test for deprecated hook handler classes as well
* Test template path constant
* Check static class instances
* get_cart_item_quantities test
* get_cart_item_quantities & get_cart_contents_weight tests
* check_cart_items test
* Check_cart_item_stock test
* Cart get_cross_sells test
* Cart get_tax_totals test
* WC_Customer_Download_Data_Store tests