コード例 #1
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->drupalLogin($this->adminUser);
     $this->createContentTypeFromUi('Moderated content', 'moderated_content', TRUE, ['draft', 'needs_review', 'published'], 'draft');
     $this->grantUserPermissionToCreateContentOfType($this->adminUser, 'moderated_content');
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     // Create the "basic" block type.
     $bundle = BlockContentType::create(['id' => 'basic', 'label' => 'basic', 'revision' => FALSE]);
     $bundle->save();
     // Add the body field to it.
     block_content_add_body_field($bundle->id());
 }