You are here

public function EntityReferenceNormalizerTest::testWithAttributeColor in Commerce Cart API 8

Tests adding attribute color.

File

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

Class

EntityReferenceNormalizerTest
@group commerce_cart_api

Namespace

Drupal\Tests\commerce_cart_api\Kernel\Normalizer

Code

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