View source  
  <?php
namespace Drupal\Tests\commerce_migrate_shopify\Kernel\Migrate;
use Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateCoreTestTrait;
use Drupal\Tests\commerce_migrate\Kernel\CsvTestBase;
class TaxonomyTermTest extends CsvTestBase {
  use CommerceMigrateCoreTestTrait;
  
  public static $modules = [
    'commerce_migrate',
    'commerce_migrate_shopify',
    'migrate_plus',
    'taxonomy',
    'text',
    'user',
  ];
  
  protected $fixtures = __DIR__ . '/../../../fixtures/csv/shopify-products_export_test.csv';
  
  protected function setUp() {
    parent::setUp();
    $this
      ->installEntitySchema('taxonomy_term');
    $this
      ->executeMigrations([
      'shopify_taxonomy_vocabulary',
      'shopify_taxonomy_term',
    ]);
  }
  
  public function testTaxonomyTerm() {
    $this
      ->assertTermEntity(1, '1 Size', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(2, 'Accessory', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(3, 'Bag', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(4, 'Multi', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(5, 'sure', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(6, 'suredesign', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(7, 'suretshirts', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(8, 'Thai Hmong Embroidered Bag', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(9, 'Embroidered Ohm | Ganesha Print', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(10, 'Green', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(11, 'Yellow', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(12, 'closeout', 'tags', '', NULL, 0, [
      0,
    ]);
    $this
      ->assertTermEntity(13, 'sales', 'tags', '', NULL, 0, [
      0,
    ]);
  }
}