protected function ConfigTestResourceTestBase::createEntity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php \Drupal\Tests\config_test\Functional\Rest\ConfigTestResourceTestBase::createEntity()
- 9 core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php \Drupal\Tests\config_test\Functional\Rest\ConfigTestResourceTestBase::createEntity()
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides EntityResourceTestBase::createEntity
File
- core/
modules/ config/ tests/ config_test/ tests/ src/ Functional/ Rest/ ConfigTestResourceTestBase.php, line 35
Class
Namespace
Drupal\Tests\config_test\Functional\RestCode
protected function createEntity() {
$config_test = ConfigTest::create([
'id' => 'llama',
'label' => 'Llama',
]);
$config_test
->save();
return $config_test;
}