You are here

public function CommerceReportsSalesOverviewTestCase::testTodayOverview in Commerce Reporting 7.4

File

src/Tests/CommerceReportsSalesOverviewTestCase.php, line 45

Class

CommerceReportsSalesOverviewTestCase

Namespace

Drupal\commerce_reports\Tests

Code

public function testTodayOverview() {
  $this
    ->createCustomers(2);
  $this
    ->createOrders(10, TRUE, array(
    time(),
  ));
  $total = $this
    ->getTotal();
  $testData = array(
    'today' => array(
      'count' => 10,
      'amount' => $total,
    ),
    'yesterday' => array(
      'count' => 0,
      'amount' => 0,
    ),
    'month' => array(
      'count' => 10,
      'amount' => $total,
    ),
  );
  $this
    ->_test($testData);
}