TaxonomyVocabularyTest.php in Commerce Migrate 3.1.x
File
modules/woocommerce/tests/src/Kernel/Migrate/woo3/TaxonomyVocabularyTest.php
View source
<?php
namespace Drupal\Tests\commerce_migrate_woocommerce\Kernel\Migrate\woo3;
use Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateCoreTestTrait;
use Drupal\taxonomy\VocabularyInterface;
use Drupal\Tests\commerce_migrate\Kernel\CsvTestBase;
class TaxonomyVocabularyTest extends CsvTestBase {
use CommerceMigrateCoreTestTrait;
protected static $modules = [
'commerce_migrate_woocommerce',
'taxonomy',
'text',
'user',
];
protected $fixtures = __DIR__ . '/../../../../fixtures/csv/woo3-product-export-7-5-2018-1525686755964.csv';
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('taxonomy_term');
$this
->executeMigration('woo3_taxonomy_vocabulary');
}
public function testTaxonomyVocabulary() {
$this
->assertVocabularyEntity('tags', 'Tags', 'Tags', VocabularyInterface::HIERARCHY_DISABLED, 0);
$this
->assertVocabularyEntity('categories', 'Categories', 'Product categories', VocabularyInterface::HIERARCHY_DISABLED, 0);
}
}