You are here

public function OrderCollectionFilterTest::filterDataParameters in Commerce Core 8.2

Data provider for ::testCustomerOrderCollectionFiltering.

Return value

\Generator The test data.

File

modules/order/tests/src/Kernel/Jsonapi/OrderCollectionFilterTest.php, line 131

Class

OrderCollectionFilterTest
@group commerce_order

Namespace

Drupal\Tests\commerce_order\Kernel\Jsonapi

Code

public function filterDataParameters() : \Generator {
  (yield [
    'order_customer',
    2,
    [
      self::ORDER_CUSTOMER_DRAFT_UUID,
      self::ORDER_CUSTOMER_COMPLETED_UUID,
    ],
    1,
    [
      self::ORDER_CUSTOMER_COMPLETED_UUID,
    ],
  ]);
  (yield [
    'other_customer',
    1,
    [
      self::OTHER_CUSTOMER_COMPLETED_UUID,
    ],
    1,
    [
      self::OTHER_CUSTOMER_COMPLETED_UUID,
    ],
  ]);
  (yield [
    'guest_customer',
    0,
    [],
    0,
    [],
  ]);
  (yield [
    'guest_customer_with_permission',
    0,
    [],
    0,
    [],
  ]);
  (yield [
    'admin_user',
    4,
    [
      self::ORDER_CUSTOMER_DRAFT_UUID,
      self::ORDER_CUSTOMER_COMPLETED_UUID,
      self::OTHER_CUSTOMER_COMPLETED_UUID,
      self::ANONYMOUS_COMPLETED_UUID,
    ],
    3,
    [
      self::ORDER_CUSTOMER_COMPLETED_UUID,
      self::OTHER_CUSTOMER_COMPLETED_UUID,
      self::ANONYMOUS_COMPLETED_UUID,
    ],
  ]);
  (yield [
    'view_user',
    4,
    [
      self::ORDER_CUSTOMER_DRAFT_UUID,
      self::ORDER_CUSTOMER_COMPLETED_UUID,
      self::OTHER_CUSTOMER_COMPLETED_UUID,
      self::ANONYMOUS_COMPLETED_UUID,
    ],
    3,
    [
      self::ORDER_CUSTOMER_COMPLETED_UUID,
      self::OTHER_CUSTOMER_COMPLETED_UUID,
      self::ANONYMOUS_COMPLETED_UUID,
    ],
  ]);
}