‪TYPO3CMS  11.5
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 class ‪JsonViewTest extends UnitTestCase
32 {
33  protected ‪$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 
55  public function ‪jsonViewTestData(): array
56  {
57  ‪$output = [];
58 
59  $object = new \stdClass();
60  $object->value1 = 'foo';
61  $object->value2 = 1;
62  $configuration = [];
63  $expected = ['value1' => 'foo', 'value2' => 1];
64  ‪$output[] = [$object, $configuration, $expected, 'all direct child properties should be serialized'];
65 
66  $configuration = ['_only' => ['value1']];
67  $expected = ['value1' => 'foo'];
68  ‪$output[] = [$object, $configuration, $expected, 'if "only" properties are specified, only these should be serialized'];
69 
70  $configuration = ['_exclude' => ['value1']];
71  $expected = ['value2' => 1];
72  ‪$output[] = [$object, $configuration, $expected, 'if "exclude" properties are specified, they should not be serialized'];
73 
74  $object = new \stdClass();
75  $object->value1 = new \stdClass();
76  $object->value1->subvalue1 = 'Foo';
77  $object->value2 = 1;
78  $configuration = [];
79  $expected = ['value2' => 1];
80  ‪$output[] = [$object, $configuration, $expected, 'by default, sub objects of objects should not be serialized.'];
81 
82  $object = new \stdClass();
83  $object->value1 = ['subarray' => 'value'];
84  $object->value2 = 1;
85  $configuration = [];
86  $expected = ['value2' => 1];
87  ‪$output[] = [$object, $configuration, $expected, 'by default, sub arrays of objects should not be serialized.'];
88 
89  $object = ['foo' => 'bar', 1 => 'baz', 'deep' => ['test' => 'value']];
90  $configuration = [];
91  $expected = ['foo' => 'bar', 1 => 'baz', 'deep' => ['test' => 'value']];
92  ‪$output[] = [$object, $configuration, $expected, 'associative arrays should be serialized deeply'];
93 
94  $object = ['foo', 'bar'];
95  $configuration = [];
96  $expected = ['foo', 'bar'];
97  ‪$output[] = [$object, $configuration, $expected, 'numeric arrays should be serialized'];
98 
99  $nestedObject = new \stdClass();
100  $nestedObject->value1 = 'foo';
101  $object = [$nestedObject];
102  $configuration = [];
103  $expected = [['value1' => 'foo']];
104  ‪$output[] = [$object, $configuration, $expected, 'array of objects should be serialized'];
105 
106  $properties = ['foo' => 'bar', 'prohibited' => 'xxx'];
107  $nestedObject = new class ($properties) {
108  private $properties;
109  private $prohibited;
110  public function __construct($properties)
111  {
112  $this->properties = $properties;
113  }
114  public function getName(): string
115  {
116  return 'name';
117  }
118 
119  public function getPath(): string
120  {
121  return 'path';
122  }
123 
124  public function getProperties()
125  {
126  return $this->properties;
127  }
128  };
129  $object = $nestedObject;
130  $configuration = [
131  '_only' => ['name', 'path', 'properties'],
132  '_descend' => [
133  'properties' => [
134  '_exclude' => ['prohibited'],
135  ],
136  ],
137  ];
138  $expected = [
139  'name' => 'name',
140  'path' => 'path',
141  'properties' => ['foo' => 'bar'],
142  ];
143  ‪$output[] = [$object, $configuration, $expected, 'descending into arrays should be possible'];
144 
145  $nestedObject = new \stdClass();
146  $nestedObject->value1 = 'foo';
147  $value = new \SplObjectStorage();
148  $value->attach($nestedObject);
149  $configuration = [];
150  $expected = [['value1' => 'foo']];
151  ‪$output[] = [$value, $configuration, $expected, 'SplObjectStorage with objects should be serialized'];
152 
153  $dateTimeObject = new \DateTime('2011-02-03T03:15:23', new \DateTimeZone('UTC'));
154  $configuration = [];
155  $expected = '2011-02-03T03:15:23+00:00';
156  ‪$output[] = [$dateTimeObject, $configuration, $expected, 'DateTime object in UTC time zone should not be serialized.'];
157 
158  $dateTimeObject = new \DateTime('2013-08-15T15:25:30', new \DateTimeZone('America/Los_Angeles'));
159  $configuration = [];
160  $expected = '2013-08-15T15:25:30-07:00';
161  ‪$output[] = [$dateTimeObject, $configuration, $expected, 'DateTime object in America/Los_Angeles time zone should not be serialized.'];
162 
163  $dateTimeObject = new \DateTimeImmutable('2021-08-29T10:36:24', new \DateTimeZone('UTC'));
164  $configuration = [];
165  $expected = '2021-08-29T10:36:24+00:00';
166  ‪$output[] = [$dateTimeObject, $configuration, $expected, 'DateTimeImmutable object in UTC time zone should not be serialized.'];
167 
168  return ‪$output;
169  }
170 
179  public function ‪transformValue($object, array $configuration, $expected, string $description): void
180  {
181  GeneralUtility::setSingletonInstance(ReflectionService::class, new ReflectionService(new NullFrontend('extbase'), 'ClassSchemata'));
182 
183  $jsonView = $this->getAccessibleMock(JsonView::class, ['dummy'], [], '', false);
184 
185  $actual = $jsonView->_call('transformValue', $object, $configuration);
186 
187  self::assertSame($expected, $actual, $description);
188  }
193  public function ‪jsonViewTestDataRecursive(): array
194  {
195  $object = new class ('foo') {
196  private $value1 = '';
197  private $child;
198  public function __construct($value1)
199  {
200  $this->value1 = $value1;
201  }
202  public function getValue1(): string
203  {
204  return $this->value1;
205  }
206  public function setValue1(string $value1): void
207  {
208  $this->value1 = $value1;
209  }
210  public function getChild()
211  {
212  return $this->child;
213  }
214  public function setChild($child): void
215  {
216  $this->child = $child;
217  }
218  };
219 
220  $child1 = clone $object;
221  $child1->setValue1('bar');
222  $child2 = clone $object;
223  $child2->setValue1('baz');
224  $child1->setChild($child2);
225  $object->setChild($child1);
226 
227  $configuration = [
228  'testData' => [
229  '_recursive' => ['child'],
230  ],
231  ];
232 
233  $expected = [
234  'child' => [
235  'child' => [
236  'child' => null,
237  'value1' => 'baz',
238  ],
239  'value1' => 'bar',
240  ],
241  'value1' => 'foo',
242  ];
243 
244  ‪$output[] = [$object, $configuration, $expected, 'testData', 'Recursive rendering of defined property should be possible.'];
245 
246  $object = new class ('foo') {
247  private $value1 = '';
248  private $children = [];
249  private $secret = 'secret';
250  public function __construct($value1)
251  {
252  $this->value1 = $value1;
253  }
254  public function getValue1(): string
255  {
256  return $this->value1;
257  }
258  public function setValue1(string $value1): void
259  {
260  $this->value1 = $value1;
261  }
262  public function getChildren(): array
263  {
264  return $this->children;
265  }
266  public function addChild($child): void
267  {
268  $this->children[] = $child;
269  }
270  public function getSecret(): string
271  {
272  return $this->secret;
273  }
274  };
275  $child1 = clone $object;
276  $child1->setValue1('bar');
277  $child1->addChild(clone $object);
278  $child1->addChild(clone $object);
279 
280  $child2 = clone $object;
281  $child2->setValue1('baz');
282  $child2->addChild(clone $object);
283  $child2->addChild(clone $object);
284 
285  $object->addChild($child1);
286  $object->addChild($child2);
287  $children = [
288  clone $object,
289  clone $object,
290  ];
291 
292  $configuration = [
293  'testData' => [
294  '_descendAll' => [
295  '_exclude' => ['secret'],
296  '_recursive' => ['children'],
297  ],
298  ],
299  ];
300 
301  $expected = [
302  [
303  'children' => [
304  [
305  'children' => [
306  ['children' => [], 'value1' => 'foo'],
307  ['children' => [], 'value1' => 'foo'],
308  ],
309  'value1' => 'bar',
310  ],
311  [
312  'children' => [
313  ['children' => [], 'value1' => 'foo'],
314  ['children' => [], 'value1' => 'foo'],
315  ],
316  'value1' => 'baz',
317  ],
318  ],
319  'value1' => 'foo',
320  ],
321  [
322  'children' => [
323  [
324  'children' => [
325  ['children' => [], 'value1' => 'foo'],
326  ['children' => [], 'value1' => 'foo'],
327  ],
328  'value1' => 'bar',
329  ],
330  [
331  'children' => [
332  ['children' => [], 'value1' => 'foo'],
333  ['children' => [], 'value1' => 'foo'],
334  ],
335  'value1' => 'baz',
336  ],
337  ],
338  'value1' => 'foo',
339  ],
340  ];
341  ‪$output[] = [$children, $configuration, $expected, 'testData', 'Recursive rendering of lists of defined property should be possible.'];
342 
343  return ‪$output;
344  }
345 
355  public function ‪recursive($object, array $configuration, $expected, string $variableToRender, string $description): void
356  {
357  GeneralUtility::setSingletonInstance(ReflectionService::class, new ReflectionService(new NullFrontend('extbase'), 'ClassSchemata'));
358 
359  $jsonView = $this->getAccessibleMock(JsonView::class, ['dummy'], [], '', false);
360  $jsonView->_set('configuration', $configuration);
361  $jsonView->_set('variablesToRender', [$variableToRender]);
362  $jsonView->_call('assign', $variableToRender, $object);
363  $actual = $jsonView->_call('renderArray');
364 
365  self::assertSame($expected, $actual, $description);
366  }
367 
372  public function ‪objectIdentifierExposureTestData(): array
373  {
374  ‪$output = [];
375 
376  $dummyIdentifier = 'e4f40dfc-8c6e-4414-a5b1-6fd3c5cf7a53';
377 
378  $object = new \stdClass();
379  $object->value1 = new \stdClass();
380  $configuration = [
381  '_descend' => [
382  'value1' => [
383  '_exposeObjectIdentifier' => true,
384  ],
385  ],
386  ];
387 
388  $expected = ['value1' => ['__identity' => $dummyIdentifier]];
389  ‪$output[] = [$object, $configuration, $expected, $dummyIdentifier, 'boolean TRUE should result in __identity key'];
390 
391  $configuration['_descend']['value1']['_exposedObjectIdentifierKey'] = 'guid';
392  $expected = ['value1' => ['guid' => $dummyIdentifier]];
393  ‪$output[] = [$object, $configuration, $expected, $dummyIdentifier, 'string value should result in string-equal key'];
394 
395  return ‪$output;
396  }
397 
408  object $object,
409  array $configuration,
410  array $expected,
411  string $dummyIdentifier,
412  string $description
413  ): void {
414  $persistenceManagerMock = $this->getMockBuilder(PersistenceManager::class)
415  ->disableOriginalConstructor()
416  ->onlyMethods(['getIdentifierByObject'])
417  ->getMock();
418  $jsonView = $this->getAccessibleMock(JsonView::class, ['dummy'], [], '', false);
419  $jsonView->_set('persistenceManager', $persistenceManagerMock);
420 
421  $persistenceManagerMock->expects(self::once())->method('getIdentifierByObject')->with($object->value1)->willReturn($dummyIdentifier);
422 
423  $actual = $jsonView->_call('transformValue', $object, $configuration);
424 
425  self::assertSame($expected, $actual, $description);
426  }
427 
431  public function ‪exposeClassNameSettingsAndResults(): array
432  {
433  $className = ‪StringUtility::getUniqueId('DummyClass');
434  $namespace = 'TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\\' . $className;
435  return [
436  [
438  $className,
439  $namespace,
440  ['value1' => ['__class' => $namespace . '\\' . $className]],
441  ],
442  [
444  $className,
445  $namespace,
446  ['value1' => ['__class' => $className]],
447  ],
448  [
449  null,
450  $className,
451  $namespace,
452  ['value1' => []],
453  ],
454  ];
455  }
456 
466  ?int $exposeClassNameSetting,
467  string $className,
468  string $namespace,
469  array $expected
470  ): void {
471  $fullyQualifiedClassName = $namespace . '\\' . $className;
472  if (class_exists($fullyQualifiedClassName) === false) {
473  eval('namespace ' . $namespace . '; class ' . $className . ' {}');
474  }
475 
476  $object = new \stdClass();
477  $object->value1 = new $fullyQualifiedClassName();
478  $configuration = [
479  '_descend' => [
480  'value1' => [
481  '_exposeClassName' => $exposeClassNameSetting,
482  ],
483  ],
484  ];
485 
486  GeneralUtility::setSingletonInstance(ReflectionService::class, new ReflectionService(new NullFrontend('extbase'), 'ClassSchemata'));
487 
488  $jsonView = $this->getAccessibleMock(JsonView::class, ['dummy'], [], '', false);
489  $actual = $jsonView->_call('transformValue', $object, $configuration);
490  self::assertSame($expected, $actual);
491  }
492 
497  {
498  $object = new \stdClass();
499  $object->foo = 'Foo';
500  $this->view->assign('value', $object);
501 
502  $expectedResult = '{"foo":"Foo"}';
503  $actualResult = $this->view->render();
504  self::assertSame($expectedResult, $actualResult);
505  }
506 
511  {
512  $array = ['foo' => 'Foo', 'bar' => 'Bar'];
513  $this->view->assign('value', $array);
514 
515  $expectedResult = '{"foo":"Foo","bar":"Bar"}';
516  $actualResult = $this->view->render();
517  self::assertSame($expectedResult, $actualResult);
518  }
519 
524  {
525  $value = 'Foo';
526  $this->view->assign('value', $value);
527 
528  $expectedResult = '"Foo"';
529  $actualResult = $this->view->render();
530  self::assertSame($expectedResult, $actualResult);
531  }
532 
536  public function ‪renderKeepsUtf8CharactersUnescaped(): void
537  {
538  $value = 'Gürkchen';
539  $this->view->assign('value', $value);
540 
541  $actualResult = $this->view->render();
542 
543  $expectedResult = '"' . $value . '"';
544  self::assertSame($expectedResult, $actualResult);
545  }
546 
550  public function ‪escapeCharacterDataProvider(): array
551  {
552  return [
553  'backslash' => ['\\'],
554  'double quote' => ['"'],
555  ];
556  }
557 
563  public function ‪renderEscapesEscapeCharacters(string $character): void
564  {
565  $this->view->assign('value', $character);
566 
567  $actualResult = $this->view->render();
568 
569  $expectedResult = '"\\' . $character . '"';
570  self::assertSame($expectedResult, $actualResult);
571  }
572 
577  {
578  $value = 'Foo';
579  $this->view->assign('foo', $value);
580 
581  $expectedResult = 'null';
582  $actualResult = $this->view->render();
583  self::assertSame($expectedResult, $actualResult);
584  }
585 
589  public function ‪renderOnlyRendersVariableWithTheNameValue(): void
590  {
591  $this->view
592  ->assign('value', 'Value')
593  ->assign('someOtherVariable', 'Foo');
594 
595  $expectedResult = '"Value"';
596  $actualResult = $this->view->render();
597  self::assertSame($expectedResult, $actualResult);
598  }
599 
603  public function ‪setVariablesToRenderOverridesValueToRender(): void
604  {
605  $value = 'Foo';
606  $this->view->assign('foo', $value);
607  $this->view->setVariablesToRender(['foo']);
608 
609  $expectedResult = '"Foo"';
610  $actualResult = $this->view->render();
611  self::assertSame($expectedResult, $actualResult);
612  }
613 
618  {
619  $this->view
620  ->assign('value', 'Value1')
621  ->assign('secondValue', 'Value2')
622  ->assign('someOtherVariable', 'Value3');
623  $this->view->setVariablesToRender(['value', 'secondValue']);
624 
625  $expectedResult = '{"value":"Value1","secondValue":"Value2"}';
626  $actualResult = $this->view->render();
627  self::assertSame($expectedResult, $actualResult);
628  }
629 
633  public function ‪renderCanRenderMultipleComplexObjects(): void
634  {
635  $array = ['foo' => ['bar' => 'Baz']];
636  $object = new \stdClass();
637  $object->foo = 'Foo';
638 
639  $this->view
640  ->assign('array', $array)
641  ->assign('object', $object)
642  ->assign('someOtherVariable', 'Value3');
643  $this->view->setVariablesToRender(['array', 'object']);
644 
645  $expectedResult = '{"array":{"foo":{"bar":"Baz"}},"object":{"foo":"Foo"}}';
646  $actualResult = $this->view->render();
647  self::assertSame($expectedResult, $actualResult);
648  }
649 
653  public function ‪renderCanRenderPlainArray(): void
654  {
655  $array = [['name' => 'Foo', 'secret' => true], ['name' => 'Bar', 'secret' => true]];
656 
657  $this->view->assign('value', $array);
658  $this->view->setConfiguration([
659  'value' => [
660  '_descendAll' => [
661  '_only' => ['name'],
662  ],
663  ],
664  ]);
665 
666  $expectedResult = '[{"name":"Foo"},{"name":"Bar"}]';
667  $actualResult = $this->view->render();
668  self::assertSame($expectedResult, $actualResult);
669  }
670 
674  public function ‪renderCanRenderPlainArrayWithNumericKeys(): void
675  {
676  $array = [
677  'items' => [
678  ['name' => 'Foo'],
679  ['name' => 'Bar'],
680  ],
681  ];
682 
683  $this->view->assign('value', $array);
684  $this->view->setConfiguration([
685  'value' => [
686  'items' => [
687  // note: this exclude is just here, and should have no effect as the items have numeric keys
688  '_exclude' => ['secret'],
689  ],
690  ],
691  ]);
692 
693  $expectedResult = '{"items":[{"name":"Foo"},{"name":"Bar"}]}';
694  $actualResult = $this->view->render();
695  self::assertSame($expectedResult, $actualResult);
696  }
697 
701  public function ‪descendAllKeepsArrayIndexes(): void
702  {
703  $array = [['name' => 'Foo', 'secret' => true], ['name' => 'Bar', 'secret' => true]];
704 
705  $this->view->assign('value', $array);
706  $this->view->setConfiguration([
707  'value' => [
708  '_descendAll' => [
709  '_descendAll' => [],
710  ],
711  ],
712  ]);
713 
714  $expectedResult = '[{"name":"Foo","secret":true},{"name":"Bar","secret":true}]';
715  $actualResult = $this->view->render();
716  self::assertSame($expectedResult, $actualResult);
717  }
718 }
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\jsonViewTestData
‪array jsonViewTestData()
Definition: JsonViewTest.php:54
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderReturnsJsonRepresentationOfAssignedArray
‪renderReturnsJsonRepresentationOfAssignedArray()
Definition: JsonViewTest.php:509
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderOnlyRendersVariableWithTheNameValue
‪renderOnlyRendersVariableWithTheNameValue()
Definition: JsonViewTest.php:588
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderKeepsUtf8CharactersUnescaped
‪renderKeepsUtf8CharactersUnescaped()
Definition: JsonViewTest.php:535
‪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:406
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\descendAllKeepsArrayIndexes
‪descendAllKeepsArrayIndexes()
Definition: JsonViewTest.php:700
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\exposeClassNameSettingsAndResults
‪exposeClassNameSettingsAndResults()
Definition: JsonViewTest.php:430
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\objectIdentifierExposureTestData
‪array objectIdentifierExposureTestData()
Definition: JsonViewTest.php:371
‪TYPO3\CMS\Core\Cache\Frontend\NullFrontend
Definition: NullFrontend.php:29
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderCanRenderPlainArray
‪renderCanRenderPlainArray()
Definition: JsonViewTest.php:652
‪TYPO3\CMS\Extbase\Reflection\ReflectionService
Definition: ReflectionService.php:28
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderReturnsJsonRepresentationOfAssignedObject
‪renderReturnsJsonRepresentationOfAssignedObject()
Definition: JsonViewTest.php:495
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\viewExposesClassNameFullyIfConfiguredSo
‪viewExposesClassNameFullyIfConfiguredSo(?int $exposeClassNameSetting, string $className, string $namespace, array $expected)
Definition: JsonViewTest.php:464
‪TYPO3\CMS\Extbase\Mvc\View\JsonView\EXPOSE_CLASSNAME_FULLY_QUALIFIED
‪const EXPOSE_CLASSNAME_FULLY_QUALIFIED
Definition: JsonView.php:40
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderRendersMultipleValuesIfTheyAreSpecifiedAsVariablesToRender
‪renderRendersMultipleValuesIfTheyAreSpecifiedAsVariablesToRender()
Definition: JsonViewTest.php:616
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\escapeCharacterDataProvider
‪string[][] escapeCharacterDataProvider()
Definition: JsonViewTest.php:549
‪TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
Definition: PersistenceManager.php:28
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderReturnsNullIfNameOfAssignedVariableIsNotEqualToValue
‪renderReturnsNullIfNameOfAssignedVariableIsNotEqualToValue()
Definition: JsonViewTest.php:575
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\jsonViewTestDataRecursive
‪array jsonViewTestDataRecursive()
Definition: JsonViewTest.php:192
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderReturnsJsonRepresentationOfAssignedSimpleValue
‪renderReturnsJsonRepresentationOfAssignedSimpleValue()
Definition: JsonViewTest.php:522
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\setVariablesToRenderOverridesValueToRender
‪setVariablesToRenderOverridesValueToRender()
Definition: JsonViewTest.php:602
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderEscapesEscapeCharacters
‪renderEscapesEscapeCharacters(string $character)
Definition: JsonViewTest.php:562
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View
Definition: JsonViewTest.php:18
‪$output
‪$output
Definition: annotationChecker.php:121
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:128
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\$view
‪JsonView $view
Definition: JsonViewTest.php:37
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\$resetSingletonInstances
‪$resetSingletonInstances
Definition: JsonViewTest.php:33
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\transformValue
‪transformValue($object, array $configuration, $expected, string $description)
Definition: JsonViewTest.php:178
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderCanRenderPlainArrayWithNumericKeys
‪renderCanRenderPlainArrayWithNumericKeys()
Definition: JsonViewTest.php:673
‪TYPO3\CMS\Extbase\Mvc\View\JsonView\EXPOSE_CLASSNAME_UNQUALIFIED
‪const EXPOSE_CLASSNAME_UNQUALIFIED
Definition: JsonView.php:46
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest
Definition: JsonViewTest.php:32
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\renderCanRenderMultipleComplexObjects
‪renderCanRenderMultipleComplexObjects()
Definition: JsonViewTest.php:632
‪TYPO3\CMS\Extbase\Mvc\View\JsonView
Definition: JsonView.php:31
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\View\JsonViewTest\recursive
‪recursive($object, array $configuration, $expected, string $variableToRender, string $description)
Definition: JsonViewTest.php:354