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