MigrateBlockContentTypeTest.php 1.03 KB
Newer Older
1 2
<?php

3
namespace Drupal\Tests\block_content\Kernel\Migrate;
4 5 6

use Drupal\block_content\BlockContentTypeInterface;
use Drupal\block_content\Entity\BlockContentType;
7
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
8 9 10 11 12 13 14 15

/**
 * Tests migration of the basic block content type.
 *
 * @group block_content
 */
class MigrateBlockContentTypeTest extends MigrateDrupal7TestBase {

16
  public static $modules = ['block', 'block_content', 'filter', 'text'];
17 18 19 20 21 22 23

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    $this->installEntitySchema('block_content');
24
    $this->installConfig(['block_content']);
25 26 27 28 29 30 31 32 33
    $this->executeMigration('block_content_type');
  }

  /**
   * Tests the block content type migration.
   */
  public function testBlockContentTypeMigration() {
    /** @var \Drupal\block_content\BlockContentTypeInterface $entity */
    $entity = BlockContentType::load('basic');
34
    $this->assertInstanceOf(BlockContentTypeInterface::class, $entity);
35 36 37 38
    $this->assertIdentical('Basic', $entity->label());
  }

}