public function SchemaMetatagManagerTest::jsonData in Schema.org Metatag 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/SchemaMetatagManagerTest.php \Drupal\Tests\schema_metatag\Unit\SchemaMetatagManagerTest::jsonData()
Provides json data.
Return value
array
- name: name of the data set.
- original: original data.
- desired: desired result.
File
- tests/
src/ Unit/ SchemaMetatagManagerTest.php, line 368
Class
- SchemaMetatagManagerTest
- @coversDefaultClass \Drupal\schema_metatag\SchemaMetatagManager
Namespace
Drupal\Tests\schema_metatag\UnitCode
public function jsonData() {
$values = [
'Encode simple json' => [
[
"@type" => "Article",
"description" => "Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec sollicitudin molestie malesuada. Donec sollicitudin molestie malesuada. Donec rutrum congue leo eget malesuada. Nulla quis lorem ut libero malesuada feugiat.",
],
'{"@type": "Article","description": "Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec sollicitudin molestie malesuada. Donec sollicitudin molestie malesuada. Donec rutrum congue leo eget malesuada. Nulla quis lorem ut libero malesuada feugiat."}',
],
'Encode json with unicode' => [
[
"@type" => "Article",
"description" => "База данни грешка.",
],
'{"@type": "Article","description": "База данни грешка."}',
],
];
return $values;
}