protected function BlockContentTest::setUp in Workbench Moderation to Content Moderation 8.2
Same name in this branch
- 8.2 tests/src/Functional/BlockContentTest.php \Drupal\Tests\wbm2cm\Functional\BlockContentTest::setUp()
- 8.2 tests/src/Kernel/Migration/BlockContentTest.php \Drupal\Tests\wbm2cm\Kernel\Migration\BlockContentTest::setUp()
Overrides TestBase::setUp
File
- tests/
src/ Functional/ BlockContentTest.php, line 23
Class
- BlockContentTest
- @group wbm2cm
Namespace
Drupal\Tests\wbm2cm\FunctionalCode
protected function setUp() {
parent::setUp();
$this->storage = $this->container
->get('entity_type.manager')
->getStorage('block_content');
/** @var \Drupal\block_content\BlockContentTypeInterface $block_content_type */
$block_content_type = BlockContentType::create([
'id' => $this
->randomMachineName(),
'label' => $this
->randomMachineName(),
]);
$this
->moderate($block_content_type)
->save();
}