protected function FilterFormatTest::createEntity in JSON:API 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/FilterFormatTest.php \Drupal\Tests\jsonapi\Functional\FilterFormatTest::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/ FilterFormatTest.php, line 47
Class
- FilterFormatTest
- JSON API integration test for the "FilterFormat" config entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function createEntity() {
$pablo_format = FilterFormat::create([
'name' => 'Pablo Piccasso',
'format' => 'pablo',
'langcode' => 'es',
'filters' => [
'filter_html' => [
'status' => TRUE,
'settings' => [
'allowed_html' => '<p> <a> <b> <lo>',
],
],
],
]);
$pablo_format
->save();
return $pablo_format;
}