function EntityFormModeTest::createEntity
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides ResourceTestBase::createEntity
File
- 
              core/modules/ jsonapi/ tests/ src/ Functional/ EntityFormModeTest.php, line 57 
Class
- EntityFormModeTest
- JSON:API integration test for the "EntityFormMode" config entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function createEntity() {
  $entity_form_mode = EntityFormMode::create([
    'id' => 'user.test',
    'label' => 'Test',
    'description' => '',
    'targetEntityType' => 'user',
  ]);
  $entity_form_mode->save();
  return $entity_form_mode;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
