You are here

public function EntityReferenceNormalizerTest::testWithProductIdAttributeColor in Commerce Cart API 8

Tests adding product ID and attribute color.

File

tests/src/Kernel/Normalizer/EntityReferenceNormalizerTest.php, line 204

Class

EntityReferenceNormalizerTest
@group commerce_cart_api

Namespace

Drupal\Tests\commerce_cart_api\Kernel\Normalizer

Code

public function testWithProductIdAttributeColor() {
  $this
    ->assertEntityReferenceNormalization([
    'order_items',
    'purchased_entity',
    'product_id',
    'attribute_color',
  ], [
    [
      'order_items',
      0,
      'uuid',
    ],
    [
      'order_items',
      0,
      'purchased_entity',
      0,
      'uuid',
    ],
    [
      'order_items',
      0,
      'purchased_entity',
      0,
      'product_id',
      0,
      'uuid',
    ],
    [
      'order_items',
      0,
      'purchased_entity',
      0,
      'attribute_color',
      0,
      'uuid',
    ],
  ], []);
}