mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-04 22:24:42 +09:00
* Wrote a few more tests, improvements * Ran Rector & PHP-CS-Fixer * Append a capital letter to the test client passwords * Minor tweaks * Display more info after the tests run * Oops, I forgot to set the dir * Fix cron behavior for test env, dropped legacy tests * Rename the empty test suite so PHPUnit ignores it * Update cspell.json * Minor tweaks to the tests * Fixes
56 lines
1.6 KiB
PHP
56 lines
1.6 KiB
PHP
<?php
|
|
|
|
#[PHPUnit\Framework\Attributes\Group('Core')]
|
|
class Api_Admin_StatsTest extends BBDbApiTestCase
|
|
{
|
|
protected $_initialSeedFile = 'orders.xml';
|
|
|
|
public function testSummary()
|
|
{
|
|
$array = $this->api_admin->stats_get_summary();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_get_summary_income();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_get_orders_statuses();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_get_income_vs_refunds();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_get_product_summary();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_get_product_sales();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_client_countries();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_sales_countries();
|
|
$this->assertIsArray($array);
|
|
}
|
|
|
|
public function testGraphs()
|
|
{
|
|
$array = $this->api_admin->stats_get_orders();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_get_clients();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_get_invoices();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_get_refunds();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_get_income();
|
|
$this->assertIsArray($array);
|
|
|
|
$array = $this->api_admin->stats_get_tickets();
|
|
$this->assertIsArray($array);
|
|
}
|
|
}
|