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
  protected static $modules = ['block', 'block_content', 'filter', 'text'];
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    $this->installConfig(['block_content']);
    $this->installEntitySchema('block_content');
    $this->executeMigration('block_content_type');
  }

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

}