You are here

protected function CommerceReportsBaseTestCase::createCustomers in Commerce Reporting 7.4

Helper function creating multiple dummy customers.

10 calls to CommerceReportsBaseTestCase::createCustomers()
CommerceReportsBaseTestCase::createOrders in src/Tests/CommerceReportsBaseTestCase.php
Helper function creating multiple dummy orders. If no customers or products exist, then one of each get created.
CommerceReportsCustomerTestCase::testMultipleCustomers in src/Tests/CommerceReportsCustomerTestCase.php
Make one customer perform multiple orders with multiple products. Then verifies if the reporting is correct.
CommerceReportsSalesOverviewTestCase::testMonthlyOverview in src/Tests/CommerceReportsSalesOverviewTestCase.php
CommerceReportsSalesOverviewTestCase::testOutsideOverviewScope in src/Tests/CommerceReportsSalesOverviewTestCase.php
CommerceReportsSalesOverviewTestCase::testTodayOverview in src/Tests/CommerceReportsSalesOverviewTestCase.php

... See full list

File

src/Tests/CommerceReportsBaseTestCase.php, line 99

Class

CommerceReportsBaseTestCase
Class CommerceReportsBaseTestCase

Namespace

Drupal\commerce_reports\Tests

Code

protected function createCustomers($amount = 1) {
  for ($i = 0; $i < $amount; $i++) {
    $customer = $this
      ->createStoreCustomer();
    $this->customers[$customer->uid] = $customer;
  }
}