protected function ConfigurableLanguageTest::createEntity in JSON:API 8.2
Same name and namespace in other branches
- 8 tests/src/Functional/ConfigurableLanguageTest.php \Drupal\Tests\jsonapi\Functional\ConfigurableLanguageTest::createEntity()
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides ResourceTestBase::createEntity
File
- tests/
src/ Functional/ ConfigurableLanguageTest.php, line 51
Class
- ConfigurableLanguageTest
- JSON:API integration test for the "ConfigurableLanguage" config entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function createEntity() {
$configurable_language = ConfigurableLanguage::create([
'id' => 'll',
'label' => 'Llama Language',
]);
$configurable_language
->save();
return $configurable_language;
}