MigrateBlockContentTypeTest.php
Same filename in other branches
Namespace
Drupal\Tests\block_content\Kernel\MigrateFile
-
core/
modules/ block_content/ tests/ src/ Kernel/ Migrate/ MigrateBlockContentTypeTest.php
View source
<?php
namespace Drupal\Tests\block_content\Kernel\Migrate;
use Drupal\block_content\BlockContentTypeInterface;
use Drupal\block_content\Entity\BlockContentType;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Tests migration of the basic block content type.
*
* @group block_content
*/
class MigrateBlockContentTypeTest extends MigrateDrupal7TestBase {
protected static $modules = [
'block',
'block_content',
'filter',
'text',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->installEntitySchema('block_content');
$this->installConfig([
'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->assertInstanceOf(BlockContentTypeInterface::class, $entity);
$this->assertSame('Basic', $entity->label());
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
MigrateBlockContentTypeTest | Tests migration of the basic block content type. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.