public function ResourceResponseSubscriberTest::providerTestSerialization in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php \Drupal\Tests\rest\Unit\EventSubscriber\ResourceResponseSubscriberTest::providerTestSerialization()
- 9 core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php \Drupal\Tests\rest\Unit\EventSubscriber\ResourceResponseSubscriberTest::providerTestSerialization()
File
- core/
modules/ rest/ tests/ src/ Unit/ EventSubscriber/ ResourceResponseSubscriberTest.php, line 54
Class
- ResourceResponseSubscriberTest
- @coversDefaultClass \Drupal\rest\EventSubscriber\ResourceResponseSubscriber @group rest
Namespace
Drupal\Tests\rest\Unit\EventSubscriberCode
public function providerTestSerialization() {
return [
// The default data for \Drupal\rest\ResourceResponse.
'default' => [
NULL,
'',
],
'empty string' => [
'',
],
'simple string' => [
'string',
],
// cSpell:disable-next-line
'complex string' => [
'Complex \\ string $%^&@ with unicode ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΣὨ',
],
'empty array' => [
[],
],
'numeric array' => [
[
'test',
],
],
'associative array' => [
[
'test' => 'foobar',
],
],
'boolean true' => [
TRUE,
],
'boolean false' => [
FALSE,
],
];
}