class MigrateNodeStubTest

Same name and namespace in other branches
  1. 11.x core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php \Drupal\Tests\node\Kernel\Migrate\MigrateNodeStubTest
  2. 10 core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php \Drupal\Tests\node\Kernel\Migrate\MigrateNodeStubTest
  3. 8.9.x core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php \Drupal\Tests\node\Kernel\Migrate\MigrateNodeStubTest

Test stub creation for nodes.

@group node

Hierarchy

Expanded class hierarchy of MigrateNodeStubTest

File

core/modules/node/tests/src/Kernel/Migrate/MigrateNodeStubTest.php, line 14

Namespace

Drupal\Tests\node\Kernel\Migrate
View source
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');
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.