function ExternalNormalizersTest::providerTestFormatAgnosticNormalizers
Same name in other branches
- 8.9.x core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php \Drupal\Tests\jsonapi\Functional\ExternalNormalizersTest::providerTestFormatAgnosticNormalizers()
- 10 core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php \Drupal\Tests\jsonapi\Functional\ExternalNormalizersTest::providerTestFormatAgnosticNormalizers()
- 11.x core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php \Drupal\Tests\jsonapi\Functional\ExternalNormalizersTest::providerTestFormatAgnosticNormalizers()
Data provider.
Return value
array Test cases.
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ ExternalNormalizersTest.php, line 185
Class
- ExternalNormalizersTest
- Asserts external normalizers are handled as expected by the JSON:API module.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
public function providerTestFormatAgnosticNormalizers() {
return [
'Format-agnostic @FieldType-level normalizers SHOULD NOT be able to affect the JSON:API normalization' => [
'jsonapi_test_field_type',
// \Drupal\jsonapi_test_field_type\Normalizer\StringNormalizer::normalize()
static::VALUE_ORIGINAL,
// \Drupal\jsonapi_test_field_type\Normalizer\StringNormalizer::denormalize()
static::VALUE_OVERRIDDEN,
],
'Format-agnostic @DataType-level normalizers SHOULD be able to affect the JSON:API normalization' => [
'jsonapi_test_data_type',
// \Drupal\jsonapi_test_data_type\Normalizer\StringNormalizer::normalize()
static::VALUE_OVERRIDDEN,
// \Drupal\jsonapi_test_data_type\Normalizer\StringNormalizer::denormalize()
static::VALUE_ORIGINAL,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.