You are here

MigrateNodeStubTest.php in Drupal 9

Same filename and directory in other branches
  1. 8 core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php

File

core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php
View source
<?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}
   */
  protected static $modules = [
    'node',
  ];

  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    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');
  }

}

Classes

Namesort descending Description
MigrateNodeStubTest Test stub creation for nodes.