NodeDeriverTest.php in Commerce Migrate 3.0.x
File
modules/commerce/tests/src/Kernel/Migrate/commerce1/NodeDeriverTest.php
View source
<?php
namespace Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1;
class NodeDeriverTest extends Commerce1TestBase {
public static $modules = [
'commerce_price',
'commerce_store',
'node',
];
protected $pluginManager;
public function setUp() {
parent::setUp();
$this->pluginManager = $this->container
->get('plugin.manager.migration');
}
public function testProductNodeMigrations() {
$migrations = $this->pluginManager
->createInstances([
'd7_node',
]);
$nodes = [
'ad_push',
'blog_post',
'page',
'slideshow',
];
foreach ($nodes as $node) {
$this
->assertArrayHasKey('d7_node:' . $node, $migrations, "Node migration page does not exist");
}
$products = [
'bags_cases',
'drinks',
'hats',
'products',
'shoes',
'storage_devices',
'tops',
];
foreach ($products as $product) {
$this
->assertArrayNotHasKey('d7_node:' . $product, $migrations, "Node migration {$product} exists");
}
}
}