‪TYPO3CMS  ‪main
JsonViewTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
26 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
27 
31 final class ‪JsonViewTest extends UnitTestCase
32 {
33  protected bool ‪$resetSingletonInstances = true;
34 
38  protected ‪$view;
39 
43  protected function ‪setUp(): void
44  {
45  parent::setUp();
46  $this->view = $this->getMockBuilder(JsonView::class)
47  ->addMethods(['loadConfigurationFromYamlFile'])
48  ->getMock();
49  }
50 
54  public static function ‪jsonViewTestData(): array
55  {
56  ‪$output = [];
57 
58  $object = new \stdClass();
59  $object->value1 = 'foo';
60  $object->value2 = 1;
61  $configuration = [];
62  $expected = ['value1' => 'foo', 'value2' => 1];
63  ‪$output[] = [$object, $configuration, $expected, 'all direct child properties should be serialized'];
64 
65  $configuration = ['_only' => ['value1']];
66  $expected = ['value1' => 'foo'];
67  ‪$output[] = [$object, $configuration, $expected, 'if "only" properties are specified, only these should be serialized'];
68 
69  $configuration = ['_exclude' => ['value1']];
70  $expected = ['value2' => 1];
71  ‪$output[] = [$object, $configuration, $expected, 'if "exclude" properties are specified, they should not be serialized'];
72 
73  $object = new \stdClass();
74  $object->value1 = new \stdClass();
75  $object->value1->subvalue1 = 'Foo';
76  $object->value2 = 1;
77  $configuration = [];
78  $expected = ['value2' => 1];
79  ‪$output[] = [$object, $configuration, $expected, 'by default, sub objects of objects should not be serialized.'];
80 
81  $object = new \stdClass();
82  $object->value1 = ['subarray' => 'value'];
83  $object->value2 = 1;
84  $configuration = [];
85  $expected = ['value2' => 1];
86  ‪$output[] = [$object, $configuration, $expected, 'by default, sub arrays of objects should not be serialized.'];
87 
88  $object = ['foo' => 'bar', 1 => 'baz', 'deep' => ['test' => 'value']];
89  $configuration = [];
90  $expected = ['foo' => 'bar', 1 => 'baz', 'deep' => ['test' => 'value']];
91  ‪$output[] = [$object, $configuration, $expected, 'associative arrays should be serialized deeply'];
92 
93  $object = ['foo', 'bar'];
94  $configuration = [];
95  $expected = ['foo', 'bar'];
96  ‪$output[] = [$object, $configuration, $expected, 'numeric arrays should be serialized'];
97 
98  $nestedObject = new \stdClass();
99  $nestedObject->value1 = 'foo';
100  $object = [$nestedObject];
101  $configuration = [];
102  $expected = [['value1' => 'foo']];
103  ‪$output[] = [$object, $configuration, $expected, 'array of objects should be serialized'];
104 
105  $properties = ['foo' => 'bar', 'prohibited' => 'xxx'];
106  $nestedObject = new class ($properties) {
107  private $properties;
108  private $prohibited;
109  public function __construct($properties)
110  {
111  $this->properties = $properties;
112  }
113  public function getName(): string
114  {
115  return 'name';
116  }
117 
118  public function getPath(): string
119  {
120  return 'path';
121  }
122 
123  public function getProperties()
124  {
125  return $this->properties;
126  }
127  };
128  $object = $nestedObject;
129  $configuration = [
130  '_only' => ['name', 'path', 'properties'],
131  '_descend' => [
132  'properties' => [
133  '_exclude' => ['prohibited'],
134  ],
135  ],
136  ];
137  $expected = [
138  'name' => 'name',
139  'path' => 'path',
140  'properties' => ['foo' => 'bar'],
141  ];
142  ‪$output[] = [$object, $configuration, $expected, 'descending into arrays should be possible'];
143 
144  $nestedObject = new \stdClass();
145  $nestedObject->value1 = 'foo';
146  $value = new \SplObjectStorage();
147  $value->attach($nestedObject);
148  $configuration = [];
149  $expected = [['value1' => 'foo']];
150  ‪$output[] = [$value, $configuration, $expected, 'SplObjectStorage with objects should be serialized'];
151 
152  $dateTimeObject = new \DateTime('2011-02-03T03:15:23', new \DateTimeZone('UTC'));
153  $configuration = [];
154  $expected = '2011-02-03T03:15:23+00:00';
155  ‪$output[] = [$dateTimeObject, $configuration, $expected, 'DateTime object in UTC time zone should not be serialized.'];
156 
157  $dateTimeObject = new \DateTime('2013-08-15T15:25:30', new \DateTimeZone('America/Los_Angeles'));
158  $configuration = [];
159  $expected = '2013-08-15T15:25:30-07:00';
160  ‪$output[] = [$dateTimeObject, $configuration, $expected, 'DateTime object in America/Los_Angeles time zone should not be serialized.'];
161 
162  $dateTimeObject = new \DateTimeImmutable('2021-08-29T10:36:24', new \DateTimeZone('UTC'));
163  $configuration = [];
164  $expected = '2021-08-29T10:36:24+00:00';
165  ‪$output[] = [$dateTimeObject, $configuration, $expected, 'DateTimeImmutable object in UTC time zone should not be serialized.'];
166 
167  return ‪$output;
168  }
169 
176  public function ‪transformValue($object, array $configuration, $expected, string $description): void
177  {
178  GeneralUtility::setSingletonInstance(ReflectionService::class, new ReflectionService(new NullFrontend('extbase'), 'ClassSchemata'));
179 
180  $jsonView = $this->getAccessibleMock(JsonView::class, null, [], '', false);
181 
182  $actual = $jsonView->_call('transformValue', $object, $configuration);
183 
184  self::assertSame($expected, $actual, $description);
185  }
189  public static function ‪jsonViewTestDataRecursive(): array
190  {
191  $object = new class ('foo') {
192  private $value1 = '';
193  private $child;
194  public function __construct($value1)
195  {
196  $this->value1 = $value1;
197  }
198  public function getValue1(): string
199  {
200  return $this->value1;
201  }
202  public function setValue1(string $value1): void
203  {
204  $this->value1 = $value1;
205  }
206  public function getChild()
207  {
208  return $this->child;
209  }
210  public function setChild($child): void
211  {
212  $this->child = $child;
213  }
214  };
215 
216  $child1 = clone $object;
217  $child1->setValue1('bar');
218  $child2 = clone $object;
219  $child2->setValue1('baz');
220  $child1->setChild($child2);
221  $object->setChild($child1);
222 
223  $configuration = [
224  'testData' => [
225  '_recursive' => ['child'],
226  ],
227  ];
228 
229  $expected = [
230  'child' => [
231  'child' => [
232  'child' => null,
233  'value1' => 'baz',
234  ],
235  'value1' => 'bar',
236  ],
237  'value1' => 'foo',
238  ];
239 
240  ‪$output[] = [$object, $configuration, $expected, 'testData', 'Recursive rendering of defined property should be possible.'];
241 
242  $object = new class ('foo') {
243  private $value1 = '';
244  private $children = [];
245  private $secret = 'secret';
246  public function __construct($value1)
247  {
248  $this->value1 = $value1;
249  }
250  public function getValue1(): string
251  {
252  return $this->value1;
253  }
254  public function setValue1(string $value1): void
255  {
256  $this->value1 = $value1;
257  }
258  public function getChildren(): array
259  {
260  return $this->children;
261  }
262  public function addChild($child): void
263  {
264  $this->children[] = $child;
265  }
266  public function getSecret(): string
267  {
268  return $this->secret;
269  }
270  };
271  $child1 = clone $object;
272  $child1->setValue1('bar');
273  $child1->addChild(clone $object);
274  $child1->addChild(clone $object);
275 
276  $child2 = clone $object;
277  $child2->setValue1('baz');
278  $child2->addChild(clone $object);
279  $child2->addChild(clone $object);
280 
281  $object->addChild($child1);
282  $object->addChild($child2);
283  $children = [
284  clone $object,
285  clone $object,
286  ];
287 
288  $configuration = [
289  'testData' => [
290  '_descendAll' => [
291  '_exclude' => ['secret'],
292  '_recursive' => ['children'],
293  ],
294  ],
295  ];
296 
297  $expected = [
298  [
299  'children' => [
300  [
301  'children' => [
302  ['children' => [], 'value1' => 'foo'],
303  ['children' => [], 'value1' => 'foo'],
304  ],
305  'value1' => 'bar',
306  ],
307  [
308  'children' => [
309  ['children' => [], 'value1' => 'foo'],
310  ['children' => [], 'value1' => 'foo'],
311  ],
312  'value1' => 'baz',
313  ],
314  ],
315  'value1' => 'foo',
316  ],
317  [
318  'children' => [
319  [
320  'children' => [
321  ['children' => [], 'value1' => 'foo'],
322  ['children' => [], 'value1' => 'foo'],
323  ],
324  'value1' => 'bar',
325  ],
326  [
327  'children' => [
328  ['children' => [], 'value1' => 'foo'],
329  ['children' => [], 'value1' => 'foo'],
330  ],
331  'value1' => 'baz',
332  ],
333  ],
334  'value1' => 'foo',
335  ],
336  ];
337  ‪$output[] = [$children, $configuration, $expected, 'testData', 'Recursive rendering of lists of defined property should be possible.'];
338 
339  return ‪$output;
340  }
341 
348  public function ‪recursive($object, array $configuration, $expected, string $variableToRender, string $description): void
349  {
350  GeneralUtility::setSingletonInstance(ReflectionService::class, new ReflectionService(new NullFrontend('extbase'), 'ClassSchemata'));
351 
352  $jsonView = $this->getAccessibleMock(JsonView::class, null, [], '', false);
353  $jsonView->_set('configuration', $configuration);
354  $jsonView->_set('variablesToRender', [$variableToRender]);
355  $jsonView->_call('assign', $variableToRender, $object);
356  $actual = $jsonView->_call('renderArray');
357 
358  self::assertSame($expected, $actual, $description);
359  }
360 
364  public static function ‪objectIdentifierExposureTestData(): array
365  {
366  ‪$output = [];
367 
368  $dummyIdentifier = 'e4f40dfc-8c6e-4414-a5b1-6fd3c5cf7a53';
369 
370  $object = new \stdClass();
371  $object->value1 = new \stdClass();
372  $configuration = [
373  '_descend' => [
374  'value1' => [
375  '_exposeObjectIdentifier' => true,
376  ],
377  ],
378  ];
379 
380  $expected = ['value1' => ['__identity' => $dummyIdentifier]];
381  ‪$output[] = [$object, $configuration, $expected, $dummyIdentifier, 'boolean TRUE should result in __identity key'];
382 
383  $configuration['_descend']['value1']['_exposedObjectIdentifierKey'] = 'guid';
384  $expected = ['value1' => ['guid' => $dummyIdentifier]];
385  ‪$output[] = [$object, $configuration, $expected, $dummyIdentifier, 'string value should result in string-equal key'];
386 
387  return ‪$output;
388  }
389 
395  object $object,
396  array $configuration,
397  array $expected,
398  string $dummyIdentifier,
399  string $description
400  ): void {
401  $persistenceManagerMock = $this->getMockBuilder(PersistenceManager::class)
402  ->disableOriginalConstructor()
403  ->onlyMethods(['getIdentifierByObject'])
404  ->getMock();
405  $jsonView = $this->getAccessibleMock(JsonView::class, null, [], '', false);
406  $jsonView->_set('persistenceManager', $persistenceManagerMock);
407 
408  $persistenceManagerMock->expects(self::once())->method('getIdentifierByObject')->with($object->value1)->willReturn($dummyIdentifier);
409 
410  $actual = $jsonView->_call('transformValue', $object, $configuration);
411 
412  self::assertSame($expected, $actual, $description);
413  }
414 
418  public static function ‪exposeClassNameSettingsAndResults(): array
419  {
420  $className = ‪StringUtility::getUniqueId('DummyClass');
421  $namespace = 'TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\\' . $className;
422  return [
423  [
425  $className,
426  $namespace,
427  ['value1' => ['__class' => $namespace . '\\' . $className]],
428  ],
429  [
431  $className,
432  $namespace,
433  ['value1' => ['__class' => $className]],
434  ],
435  [
436  null,
437  $className,
438  $namespace,
439  ['value1' => []],
440  ],
441  ];
442  }
443 
449  ?int $exposeClassNameSetting,
450  string $className,
451  string $namespace,
452  array $expected
453  ): void {
454  $fullyQualifiedClassName = $namespace . '\\' . $className;
455  if (class_exists($fullyQualifiedClassName) === false) {
456  eval('namespace ' . $namespace . '; class ' . $className . ' {}');
457  }
458 
459  $object = new \stdClass();
460  $object->value1 = new $fullyQualifiedClassName();
461  $configuration = [
462  '_descend' => [
463  'value1' => [
464  '_exposeClassName' => $exposeClassNameSetting,
465  ],
466  ],
467  ];
468 
469  GeneralUtility::setSingletonInstance(ReflectionService::class, new ReflectionService(new NullFrontend('extbase'), 'ClassSchemata'));
470 
471  $jsonView = $this->getAccessibleMock(JsonView::class, null, [], '', false);
472  $actual = $jsonView->_call('transformValue', $object, $configuration);
473  self::assertSame($expected, $actual);
474  }
475 
480  {
481  $object = new \stdClass();
482  $object->foo = 'Foo';
483  $this->view->assign('value', $object);
484 
485  $expectedResult = '{"foo":"Foo"}';
486  $actualResult = $this->view->render();
487  self::assertSame($expectedResult, $actualResult);
488  }
489 
494  {
495  $array = ['foo' => 'Foo', 'bar' => 'Bar'];
496  $this->view->assign('value', $array);
497 
498  $expectedResult = '{"foo":"Foo","bar":"Bar"}';
499  $actualResult = $this->view->render();
500  self::assertSame($expectedResult, $actualResult);
501  }
502 
507  {
508  $value = 'Foo';
509  $this->view->assign('value', $value);
510 
511  $expectedResult = '"Foo"';
512  $actualResult = $this->view->render();
513  self::assertSame($expectedResult, $actualResult);
514  }
515 
519  public function ‪renderKeepsUtf8CharactersUnescaped(): void
520  {
521  $value = 'G├╝rkchen';
522  $this->view->assign('value', $value);
523 
524  $actualResult = $this->view->render();
525 
526  $expectedResult = '"' . $value . '"';
527  self::assertSame($expectedResult, $actualResult);
528  }
529 
533  public static function ‪escapeCharacterDataProvider(): array
534  {
535  return [
536  'backslash' => ['\\'],
537  'double quote' => ['"'],
538  ];
539  }
540 
545  public function ‪renderEscapesEscapeCharacters(string $character): void
546  {
547  $this->view->assign('value', $character);
548 
549  $actualResult = $this->view->render();
550 
551  $expectedResult = '"\\' . $character . '"';
552  self::assertSame($expectedResult, $actualResult);
553  }
554 
559  {
560  $value = 'Foo';
561  $this->view->assign('foo', $value);
562 
563  $expectedResult = 'null';
564  $actualResult = $this->view->render();
565  self::assertSame($expectedResult, $actualResult);
566  }
567 
571  public function ‪renderOnlyRendersVariableWithTheNameValue(): void
572  {
573  $this->view
574  ->assign('value', 'Value')
575  ->assign('someOtherVariable', 'Foo');
576 
577  $expectedResult = '"Value"';
578  $actualResult = $this->view->render();
579  self::assertSame($expectedResult, $actualResult);
580  }
581 
585  public function ‪setVariablesToRenderOverridesValueToRender(): void
586  {
587  $value = 'Foo';
588  $this->view->assign('foo', $value);
589  $this->view->setVariablesToRender(['foo']);
590 
591  $expectedResult = '"Foo"';
592  $actualResult = $this->view->render();
593  self::assertSame($expectedResult, $actualResult);
594  }
595 
600  {
601  $this->view
602  ->assign('value', 'Value1')
603  ->assign('secondValue', 'Value2')
604  ->assign('someOtherVariable', 'Value3');
605  $this->view->setVariablesToRender(['value', 'secondValue']);
606 
607  $expectedResult = '{"value":"Value1","secondValue":"Value2"}';
608  $actualResult = $this->view->render();
609  self::assertSame($expectedResult, $actualResult);
610  }
611 
615  public function ‪renderCanRenderMultipleComplexObjects(): void
616  {
617  $array = ['foo' => ['bar' => 'Baz']];
618  $object = new \stdClass();
619  $object->foo = 'Foo';
620 
621  $this->view
622  ->assign('array', $array)
623  ->assign('object', $object)
624  ->assign('someOtherVariable', 'Value3');
625  $this->view->setVariablesToRender(['array', 'object']);
626 
627  $expectedResult = '{"array":{"foo":{"bar":"Baz"}},"object":{"foo":"Foo"}}';
628  $actualResult = $this->view->render();
629  self::assertSame($expectedResult, $actualResult);
630  }
631 
635  public function ‪renderCanRenderPlainArray(): void
636  {
637  $array = [['name' => 'Foo', 'secret' => true], ['name' => 'Bar', 'secret' => true]];
638 
639  $this->view->assign('value', $array);
640  $this->view->setConfiguration([
641  'value' => [
642  '_descendAll' => [
643  '_only' => ['name'],
644  ],
645  ],
646  ]);
647 
648  $expectedResult = '[{"name":"Foo"},{"name":"Bar"}]';
649  $actualResult = $this->view->render();
650  self::assertSame($expectedResult, $actualResult);
651  }
652 
656  public function ‪renderCanRenderPlainArrayWithNumericKeys(): void
657  {
658  $array = [
659  'items' => [
660  ['name' => 'Foo'],
661  ['name' => 'Bar'],
662  ],
663  ];
664 
665  $this->view->assign('value', $array);
666  $this->view->setConfiguration([
667  'value' => [
668  'items' => [
669  // note: this exclude is just here, and should have no effect as the items have numeric keys
670  '_exclude' => ['secret'],
671  ],
672  ],
673  ]);
674 
675  $expectedResult = '{"items":[{"name":"Foo"},{"name":"Bar"}]}';
676  $actualResult = $this->view->render();
677  self::assertSame($expectedResult, $actualResult);
678  }
679 
683  public function ‪descendAllKeepsArrayIndexes(): void
684  {
685  $array = [['name' => 'Foo', 'secret' => true], ['name' => 'Bar', 'secret' => true]];
686 
687  $this->view->assign('value', $array);
688  $this->view->setConfiguration([
689  'value' => [
690  '_descendAll' => [
691  '_descendAll' => [],
692  ],
693  ],
694  ]);
695 
696  $expectedResult = '[{"name":"Foo","secret":true},{"name":"Bar","secret":true}]';
697  $actualResult = $this->view->render();
698  self::assertSame($expectedResult, $actualResult);
699  }
700 }
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderReturnsJsonRepresentationOfAssignedArray
‪renderReturnsJsonRepresentationOfAssignedArray()
Definition: JsonViewTest.php:492
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderOnlyRendersVariableWithTheNameValue
‪renderOnlyRendersVariableWithTheNameValue()
Definition: JsonViewTest.php:570
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\jsonViewTestData
‪static jsonViewTestData()
Definition: JsonViewTest.php:53
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderKeepsUtf8CharactersUnescaped
‪renderKeepsUtf8CharactersUnescaped()
Definition: JsonViewTest.php:518
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\setUp
‪setUp()
Definition: JsonViewTest.php:42
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\transformValueWithObjectIdentifierExposure
‪transformValueWithObjectIdentifierExposure(object $object, array $configuration, array $expected, string $dummyIdentifier, string $description)
Definition: JsonViewTest.php:393
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\$resetSingletonInstances
‪bool $resetSingletonInstances
Definition: JsonViewTest.php:33
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\descendAllKeepsArrayIndexes
‪descendAllKeepsArrayIndexes()
Definition: JsonViewTest.php:682
‪TYPO3\CMS\Core\Cache\Frontend\NullFrontend
Definition: NullFrontend.php:30
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderCanRenderPlainArray
‪renderCanRenderPlainArray()
Definition: JsonViewTest.php:634
‪TYPO3\CMS\Extbase\Reflection\ReflectionService
Definition: ReflectionService.php:28
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderReturnsJsonRepresentationOfAssignedObject
‪renderReturnsJsonRepresentationOfAssignedObject()
Definition: JsonViewTest.php:478
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\viewExposesClassNameFullyIfConfiguredSo
‪viewExposesClassNameFullyIfConfiguredSo(?int $exposeClassNameSetting, string $className, string $namespace, array $expected)
Definition: JsonViewTest.php:447
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\jsonViewTestDataRecursive
‪static jsonViewTestDataRecursive()
Definition: JsonViewTest.php:188
‪TYPO3\CMS\Extbase\Mvc\View\JsonView\EXPOSE_CLASSNAME_FULLY_QUALIFIED
‪const EXPOSE_CLASSNAME_FULLY_QUALIFIED
Definition: JsonView.php:38
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderRendersMultipleValuesIfTheyAreSpecifiedAsVariablesToRender
‪renderRendersMultipleValuesIfTheyAreSpecifiedAsVariablesToRender()
Definition: JsonViewTest.php:598
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\exposeClassNameSettingsAndResults
‪static exposeClassNameSettingsAndResults()
Definition: JsonViewTest.php:417
‪TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
Definition: PersistenceManager.php:28
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderReturnsNullIfNameOfAssignedVariableIsNotEqualToValue
‪renderReturnsNullIfNameOfAssignedVariableIsNotEqualToValue()
Definition: JsonViewTest.php:557
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderReturnsJsonRepresentationOfAssignedSimpleValue
‪renderReturnsJsonRepresentationOfAssignedSimpleValue()
Definition: JsonViewTest.php:505
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\setVariablesToRenderOverridesValueToRender
‪setVariablesToRenderOverridesValueToRender()
Definition: JsonViewTest.php:584
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderEscapesEscapeCharacters
‪renderEscapesEscapeCharacters(string $character)
Definition: JsonViewTest.php:544
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View
Definition: JsonViewTest.php:18
‪$output
‪$output
Definition: annotationChecker.php:119
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\$view
‪JsonView $view
Definition: JsonViewTest.php:37
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\transformValue
‪transformValue($object, array $configuration, $expected, string $description)
Definition: JsonViewTest.php:175
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderCanRenderPlainArrayWithNumericKeys
‪renderCanRenderPlainArrayWithNumericKeys()
Definition: JsonViewTest.php:655
‪TYPO3\CMS\Extbase\Mvc\View\JsonView\EXPOSE_CLASSNAME_UNQUALIFIED
‪const EXPOSE_CLASSNAME_UNQUALIFIED
Definition: JsonView.php:44
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest
Definition: JsonViewTest.php:32
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\escapeCharacterDataProvider
‪static string[][] escapeCharacterDataProvider()
Definition: JsonViewTest.php:532
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:51
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:24
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderCanRenderMultipleComplexObjects
‪renderCanRenderMultipleComplexObjects()
Definition: JsonViewTest.php:614
‪TYPO3\CMS\Extbase\Mvc\View\JsonView
Definition: JsonView.php:29
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\objectIdentifierExposureTestData
‪static objectIdentifierExposureTestData()
Definition: JsonViewTest.php:363
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static getUniqueId(string $prefix='')
Definition: StringUtility.php:57
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\recursive
‪recursive($object, array $configuration, $expected, string $variableToRender, string $description)
Definition: JsonViewTest.php:347