You are here

public function CommerceReportsSalesOverviewTestCase::testMonthlyOverview in Commerce Reporting 7.3

File

tests/commerce_reports.test, line 273
Unit tests for the commerce reports module.

Class

CommerceReportsSalesOverviewTestCase

Code

public function testMonthlyOverview() {
  $this
    ->createCustomers(2);
  $this
    ->createOrders(10, TRUE, array(
    time() - 3 * 86400,
    time() - 5 * 86400,
    time() - 15 * 86400,
    time() - 20 * 86400,
    time() - 30 * 86400,
  ));
  $total = $this
    ->getTotal();
  $testData = array(
    'today' => array(
      'count' => 0,
      'amount' => 0,
    ),
    'yesterday' => array(
      'count' => 0,
      'amount' => 0,
    ),
    'month' => array(
      'count' => 10,
      'amount' => $total,
    ),
  );
  $this
    ->_test($testData);
}