You are here

protected function BlockContentTest::setUp in Workbench Moderation to Content Moderation 8.2

Same name in this branch
  1. 8.2 tests/src/Functional/BlockContentTest.php \Drupal\Tests\wbm2cm\Functional\BlockContentTest::setUp()
  2. 8.2 tests/src/Kernel/Migration/BlockContentTest.php \Drupal\Tests\wbm2cm\Kernel\Migration\BlockContentTest::setUp()

Overrides TestBase::setUp

File

tests/src/Kernel/Migration/BlockContentTest.php, line 28

Class

BlockContentTest
Tests the save-clear-restore migration flow for block content.

Namespace

Drupal\Tests\wbm2cm\Kernel\Migration

Code

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();
}