Version 1
[yaffs-website] / web / core / modules / node / tests / src / Kernel / Migrate / MigrateNodeStubTest.php
diff --git a/web/core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php b/web/core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php
new file mode 100644 (file)
index 0000000..5b393b1
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+
+namespace Drupal\Tests\node\Kernel\Migrate;
+
+use Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase;
+use Drupal\migrate_drupal\Tests\StubTestTrait;
+use Drupal\node\Entity\NodeType;
+
+/**
+ * Test stub creation for nodes.
+ *
+ * @group node
+ */
+class MigrateNodeStubTest extends MigrateDrupalTestBase {
+
+  use StubTestTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['node'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->installEntitySchema('node');
+    // Need at least one node type present.
+    NodeType::create([
+      'type' => 'testnodetype',
+      'name' => 'Test node type',
+    ])->save();
+  }
+
+  /**
+   * Tests creation of node stubs.
+   */
+  public function testStub() {
+    $this->performStubTest('node');
+  }
+
+}