BlockContentTest.php in Workbench Moderation to Content Moderation 8.2
File
tests/src/Kernel/Migration/BlockContentTest.php
View source
<?php
namespace Drupal\Tests\wbm2cm\Kernel\Migration;
use Drupal\block_content\Entity\BlockContentType;
class BlockContentTest extends TestBase {
protected static $modules = [
'block',
'block_content',
'field',
'filter',
'text',
];
protected function setUp() {
parent::setUp();
$this
->installConfig('block_content');
$this
->installEntitySchema('block_content');
$this
->installEntitySchema('user');
$this->storage = $this->container
->get('entity_type.manager')
->getStorage('block_content');
BlockContentType::create([
'id' => 'fubar',
'label' => $this
->randomMachineName(),
])
->save();
}
}