You are here

public function CommerceReportsSalesOverviewTestCase::testMonthlyOverview in Commerce Reporting 7.4

File

src/Tests/CommerceReportsSalesOverviewTestCase.php, line 93

Class

CommerceReportsSalesOverviewTestCase

Namespace

Drupal\commerce_reports\Tests

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);
}