function FilterFormatTest::getExpectedDocument
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php \Drupal\Tests\jsonapi\Functional\FilterFormatTest::getExpectedDocument()
- 10 core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php \Drupal\Tests\jsonapi\Functional\FilterFormatTest::getExpectedDocument()
- 11.x core/modules/jsonapi/tests/src/Functional/FilterFormatTest.php \Drupal\Tests\jsonapi\Functional\FilterFormatTest::getExpectedDocument()
Overrides ResourceTestBase::getExpectedDocument
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ FilterFormatTest.php, line 73
Class
- FilterFormatTest
- JSON:API integration test for the "FilterFormat" config entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function getExpectedDocument() {
$self_url = Url::fromUri('base:/jsonapi/filter_format/filter_format/' . $this->entity
->uuid())
->setAbsolute()
->toString(TRUE)
->getGeneratedUrl();
return [
'jsonapi' => [
'meta' => [
'links' => [
'self' => [
'href' => 'http://jsonapi.org/format/1.0/',
],
],
],
'version' => '1.0',
],
'links' => [
'self' => [
'href' => $self_url,
],
],
'data' => [
'id' => $this->entity
->uuid(),
'type' => 'filter_format--filter_format',
'links' => [
'self' => [
'href' => $self_url,
],
],
'attributes' => [
'dependencies' => [],
'filters' => [
'filter_html' => [
'id' => 'filter_html',
'provider' => 'filter',
'status' => TRUE,
'weight' => -10,
'settings' => [
'allowed_html' => '<p> <a> <b> <lo>',
'filter_html_help' => TRUE,
'filter_html_nofollow' => FALSE,
],
],
],
'langcode' => 'es',
'name' => 'Pablo Picasso',
'status' => TRUE,
'weight' => 0,
'drupal_internal__format' => 'pablo',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.