get_best_selling() public method

Get the best selling forms
Since: 1.0
public get_best_selling ( $number = 10 ) : array
$number int The number of results to retrieve with the default set to 10.
return array Best selling forms
Example #1
0
 /**
  * Test Get Best Selling Donation Forms
  *
  * @covers Give_Payment_Stats::get_best_selling
  */
 public function test_get_best_selling()
 {
     $stats = new Give_Payment_Stats();
     $best_selling = $stats->get_best_selling();
     //Best selling should return an array ordered by sale count
     $this->assertLessThan($best_selling[0]->sales, $best_selling[1]->sales);
 }