You are here

public function LogTest::testMessage in Commerce Migrate 8.2

Same name and namespace in other branches
  1. 3.1.x modules/commerce/tests/src/Kernel/Migrate/commerce1/LogTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\LogTest::testMessage()
  2. 3.0.x modules/commerce/tests/src/Kernel/Migrate/commerce1/LogTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\LogTest::testMessage()

Test message migration from Drupal 7 to Drupal 8 Commerce Log.

File

modules/commerce/tests/src/Kernel/Migrate/commerce1/LogTest.php, line 74

Class

LogTest
Tests message to log migration.

Namespace

Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1

Code

public function testMessage() {

  // Test a 'commerce_order_created' message was migrated.
  $log = [
    'id' => 1,
    'category_id' => 'commerce_order',
    'label' => 'Order: Order placed',
    'source_entity_id' => '1',
    'created' => '1493287434',
    'template_id' => 'order_placed',
  ];
  $this
    ->assertLog($log);

  // Test a 'commerce_order_cart_add' message was migrated.
  $log = [
    'id' => 2,
    'category_id' => 'commerce_cart',
    'label' => 'Cart: Added to cart',
    'source_entity_id' => '1',
    'created' => '1493287434',
    'template_id' => 'cart_entity_added',
  ];
  $this
    ->assertLog($log);
}