‪TYPO3CMS  ‪main
FormDefinitionValidationServiceTest.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 
20 use PHPUnit\Framework\Attributes\DataProvider;
21 use PHPUnit\Framework\Attributes\Test;
27 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
28 
29 final class ‪FormDefinitionValidationServiceTest extends UnitTestCase
30 {
31  protected function ‪setUp(): void
32  {
33  parent::setUp();
34  ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = '12345';
35  }
36 
37  public function ‪tearDown(): void
38  {
39  GeneralUtility::resetSingletonInstances([]);
40  parent::tearDown();
41  }
42 
43  #[Test]
45  {
46  $this->expectException(PropertyException::class);
47  $this->expectExceptionCode(1528588036);
48 
49  $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false);
50 
51  $prototypeName = 'standard';
52  ‪$identifier = 'some-text';
53 
54  $sessionToken = '123';
55 
56  $validationDto = new ‪ValidationDto($prototypeName, 'Text', ‪$identifier);
57 
58  $input = [
59  'label' => 'xxx',
60  '_orig_label' => [
61  'value' => 'aaa',
62  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'label', 'aaa']), $sessionToken),
63  ],
64  ];
65 
66  $typeConverter->_call('validateAllFormElementPropertyValuesByHmac', $input, $sessionToken, $validationDto);
67  }
68 
69  #[Test]
71  {
72  $this->expectException(PropertyException::class);
73  $this->expectExceptionCode(1528588037);
74 
75  $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false);
76 
77  $prototypeName = 'standard';
78  ‪$identifier = 'some-text';
79 
80  $sessionToken = '123';
81 
82  $validationDto = new ‪ValidationDto($prototypeName, 'Text', ‪$identifier);
83 
84  $input = [
85  'label' => 'xxx',
86  ];
87 
88  $typeConverter->_call('validateAllFormElementPropertyValuesByHmac', $input, $sessionToken, $validationDto);
89  }
90 
91  #[Test]
93  {
94  $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false);
95 
96  $prototypeName = 'standard';
97  ‪$identifier = 'some-text';
98 
99  $sessionToken = '123';
100 
101  $validationDto = new ‪ValidationDto($prototypeName, 'Text', ‪$identifier);
102 
103  $input = [
104  'label' => 'aaa',
105  '_orig_label' => [
106  'value' => 'aaa',
107  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'label', 'aaa']), $sessionToken),
108  ],
109  ];
110 
111  $failed = false;
112  try {
113  $typeConverter->_call(
114  'validateAllFormElementPropertyValuesByHmac',
115  $input,
116  $sessionToken,
117  $validationDto
118  );
119  } catch (‪PropertyException) {
120  $failed = true;
121  }
122  self::assertFalse($failed);
123  }
124 
125  #[Test]
127  {
128  $this->expectException(PropertyException::class);
129  $this->expectExceptionCode(1528591586);
130 
131  $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false);
132 
133  $prototypeName = 'standard';
134  ‪$identifier = 'some-text';
135 
136  $sessionToken = '123';
137 
138  $validationDto = new ‪ValidationDto($prototypeName, 'Text', ‪$identifier, null, 'validators');
139 
140  $input = [
141  'identifier' => 'StringLength',
142  '_orig_identifier' => [
143  'value' => 'StringLength',
144  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'validators', 'StringLength', 'identifier', 'StringLength']), $sessionToken),
145  ],
146  'options' => [
147  'test' => 'xxx',
148  '_orig_test' => [
149  'value' => 'aaa',
150  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'validators', 'StringLength', 'options.test', 'aaa']), $sessionToken),
151  ],
152  ],
153  ];
154 
155  $typeConverter->_call(
156  'validateAllPropertyCollectionElementValuesByHmac',
157  $input,
158  $sessionToken,
159  $validationDto
160  );
161  }
162 
163  #[Test]
165  {
166  $this->expectException(PropertyException::class);
167  $this->expectExceptionCode(1528591585);
168 
169  $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false);
170 
171  $prototypeName = 'standard';
172  ‪$identifier = 'some-text';
173 
174  $sessionToken = '123';
175 
176  $validationDto = new ‪ValidationDto($prototypeName, 'Text', ‪$identifier, null, 'validators');
177 
178  $input = [
179  'identifier' => 'StringLength',
180  '_orig_identifier' => [
181  'value' => 'StringLength',
182  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'validators', 'StringLength', 'identifier', 'StringLength']), $sessionToken),
183  ],
184  'options' => [
185  'test' => 'xxx',
186  ],
187  ];
188 
189  $typeConverter->_call(
190  'validateAllPropertyCollectionElementValuesByHmac',
191  $input,
192  $sessionToken,
193  $validationDto
194  );
195  }
196 
197  #[Test]
199  {
200  $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false);
201 
202  $prototypeName = 'standard';
203  ‪$identifier = 'some-text';
204 
205  $sessionToken = '123';
206 
207  $validationDto = new ‪ValidationDto($prototypeName, 'Text', ‪$identifier, null, 'validators');
208 
209  $input = [
210  'identifier' => 'StringLength',
211  '_orig_identifier' => [
212  'value' => 'StringLength',
213  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'validators', 'StringLength', 'identifier', 'StringLength']), $sessionToken),
214  ],
215  'options' => [
216  'test' => 'aaa',
217  '_orig_test' => [
218  'value' => 'aaa',
219  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'validators', 'StringLength', 'options.test', 'aaa']), $sessionToken),
220  ],
221  ],
222  ];
223 
224  $failed = false;
225  try {
226  $typeConverter->_call(
227  'validateAllPropertyCollectionElementValuesByHmac',
228  $input,
229  $sessionToken,
230  $validationDto
231  );
232  } catch (‪PropertyException) {
233  $failed = true;
234  }
235  self::assertFalse($failed);
236  }
237 
239  {
240  // Be aware that the $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] assignment in setUp is done
241  // after the dataProvider intitialization. Therefore, the encryption key must also be defined here.
242  ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = '12345';
243 
244  $sessionToken = '54321';
245  ‪$identifier = 'text-1';
246 
247  $validationDto = new ‪ValidationDto('standard', 'Text', ‪$identifier);
248  $formElement = [
249  'test' => 'xxx',
250  '_orig_test' => [
251  'value' => 'xxx',
252  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'test', 'xxx']), $sessionToken),
253  ],
254  ];
255 
256  $formElementWithoutHmac = [
257  'test' => 'xxx',
258  ];
259 
260  $invalidFormElement = [
261  'test' => 'xxx1',
262  '_orig_test' => [
263  'value' => 'xxx',
264  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'test', 'xxx']), $sessionToken),
265  ],
266  ];
267 
268  // Unset global encryption key, so following tests do not use it. Data providers are not covered by phpunit backupGlobals.
269  // @todo: Refactor this out of the data provider.
270  unset(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
271 
272  return [
273  [
274  [
275  'isFormElementPropertyDefinedInFormEditorSetup' => true,
276  'isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
277  'getFormElementPredefinedDefaultValueFromFormEditorSetup' => '',
278  ],
279  $formElement,
280  $sessionToken,
281  -1,
282  $validationDto,
283  ],
284  [
285  [
286  'isFormElementPropertyDefinedInFormEditorSetup' => false,
287  'isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
288  'getFormElementPredefinedDefaultValueFromFormEditorSetup' => 'default',
289  ],
290  $formElement,
291  $sessionToken,
292  -1,
293  $validationDto,
294  ],
295  [
296  [
297  'isFormElementPropertyDefinedInFormEditorSetup' => false,
298  'isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
299  'getFormElementPredefinedDefaultValueFromFormEditorSetup' => 'default',
300  ],
301  ['test' => 'xxx'],
302  $sessionToken,
303  1528588037,
304  $validationDto,
305  ],
306  [
307  [
308  'isFormElementPropertyDefinedInFormEditorSetup' => false,
309  'isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
310  'getFormElementPredefinedDefaultValueFromFormEditorSetup' => 'default',
311  ],
312  ['test' => 'xxx', '_orig_test' => []],
313  $sessionToken,
314  1528538222,
315  $validationDto,
316  ],
317  [
318  [
319  'isFormElementPropertyDefinedInFormEditorSetup' => false,
320  'isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
321  'getFormElementPredefinedDefaultValueFromFormEditorSetup' => 'default',
322  ],
323  ['test' => 'xxx', '_orig_test' => ['hmac' => '4242']],
324  $sessionToken,
325  1528538252,
326  $validationDto,
327  ],
328  [
329  [
330  'isFormElementPropertyDefinedInFormEditorSetup' => false,
331  'isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
332  'getFormElementPredefinedDefaultValueFromFormEditorSetup' => 'default',
333  ],
334  $invalidFormElement,
335  $sessionToken,
336  1528588036,
337  $validationDto,
338  ],
339  [
340  [
341  'isFormElementPropertyDefinedInFormEditorSetup' => false,
342  'isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => true,
343  'getFormElementPredefinedDefaultValueFromFormEditorSetup' => 'xxx',
344  ],
345  $formElement,
346  $sessionToken,
347  -1,
348  $validationDto,
349  ],
350  [
351  [
352  'isFormElementPropertyDefinedInFormEditorSetup' => false,
353  'isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => true,
354  'getFormElementPredefinedDefaultValueFromFormEditorSetup' => 'default',
355  ],
356  $formElement,
357  $sessionToken,
358  -1,
359  $validationDto,
360  ],
361  [
362  [
363  'isFormElementPropertyDefinedInFormEditorSetup' => false,
364  'isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => true,
365  'getFormElementPredefinedDefaultValueFromFormEditorSetup' => 'default',
366  ],
367  $formElementWithoutHmac,
368  $sessionToken,
369  1528588035,
370  $validationDto,
371  ],
372  ];
373  }
374 
375  #[DataProvider('validateAllPropertyValuesFromCreatableFormElementDataProvider')]
376  #[Test]
378  array $mockConfiguration,
379  array $formElement,
380  string $sessionToken,
381  int $exceptionCode,
382  ‪ValidationDto $validationDto
383  ): void {
384  $configurationService = $this->createMock(ConfigurationService::class);
385  $configurationService
386  ->method('isFormElementPropertyDefinedInFormEditorSetup')
387  ->willReturn($mockConfiguration['isFormElementPropertyDefinedInFormEditorSetup']);
388  $configurationService
389  ->method('isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup')
390  ->willReturn($mockConfiguration['isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup']);
391  $configurationService
392  ->method('getFormElementPredefinedDefaultValueFromFormEditorSetup')
393  ->willReturn($mockConfiguration['getFormElementPredefinedDefaultValueFromFormEditorSetup']);
394  $formDefinitionValidationService = $this->getAccessibleMock(FormDefinitionValidationService::class, null);
395  GeneralUtility::setSingletonInstance(FormDefinitionValidationService::class, $formDefinitionValidationService);
396  GeneralUtility::setSingletonInstance(ConfigurationService::class, $configurationService);
397 
398  $subject = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false);
399  $returnedExceptionCode = -1;
400  try {
401  $subject->_call(
402  'validateAllPropertyValuesFromCreatableFormElement',
403  $formElement,
404  $sessionToken,
405  $validationDto
406  );
407  } catch (‪PropertyException $e) {
408  $returnedExceptionCode = $e->getCode();
409  }
410  self::assertEquals($returnedExceptionCode, $exceptionCode);
411  }
412 
414  {
415  // Be aware that the $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] assignment in setUp is done
416  // after the dataProvider intitialization. Therefore, the encryption key must also be defined here.
417  ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = '12345';
418 
419  $sessionToken = '54321';
420  ‪$identifier = 'text-1';
421 
422  $validationDto = new ‪ValidationDto('standard', 'Text', ‪$identifier, null, 'validators', 'StringLength');
423  $formElement = [
424  'test' => 'xxx',
425  '_orig_test' => [
426  'value' => 'xxx',
427  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'validators', 'StringLength', 'test', 'xxx']), $sessionToken),
428  ],
429  ];
430 
431  $formElementWithoutHmac = [
432  'test' => 'xxx',
433  ];
434 
435  $invalidFormElement = [
436  'test' => 'xxx1',
437  '_orig_test' => [
438  'value' => 'xxx',
439  'hmac' => ‪GeneralUtility::hmac(serialize([‪$identifier, 'validators', 'StringLength', 'test', 'xxx']), $sessionToken),
440  ],
441  ];
442 
443  // Unset global encryption key, so following tests do not use it. Data providers are not covered by phpunit backupGlobals.
444  // @todo: Refactor this out of the data provider.
445  unset(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
446 
447  return [
448  [
449  [
450  'isPropertyCollectionPropertyDefinedInFormEditorSetup' => true,
451  'isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
452  'getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup' => 'default',
453  ],
454  $formElement,
455  $sessionToken,
456  -1,
457  $validationDto,
458  ],
459  [
460  [
461  'isPropertyCollectionPropertyDefinedInFormEditorSetup' => false,
462  'isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
463  'getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup' => 'default',
464  ],
465  $formElement,
466  $sessionToken,
467  -1,
468  $validationDto,
469  ],
470  [
471  [
472  'isPropertyCollectionPropertyDefinedInFormEditorSetup' => false,
473  'isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
474  'getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup' => 'default',
475  ],
476  ['test' => 'xxx'],
477  $sessionToken,
478  1528591585,
479  $validationDto,
480  ],
481  [
482  [
483  'isPropertyCollectionPropertyDefinedInFormEditorSetup' => false,
484  'isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
485  'getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup' => 'default',
486  ],
487  ['test' => 'xxx', '_orig_test' => []],
488  $sessionToken,
489  1528538222,
490  $validationDto,
491  ],
492  [
493  [
494  'isPropertyCollectionPropertyDefinedInFormEditorSetup' => false,
495  'isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
496  'getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup' => 'default',
497  ],
498  ['test' => 'xxx', '_orig_test' => ['hmac' => '4242']],
499  $sessionToken,
500  1528538252,
501  $validationDto,
502  ],
503  [
504  [
505  'isPropertyCollectionPropertyDefinedInFormEditorSetup' => false,
506  'isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => false,
507  'getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup' => 'default',
508  ],
509  $invalidFormElement,
510  $sessionToken,
511  1528591586,
512  $validationDto,
513  ],
514 
515  [
516  [
517  'isPropertyCollectionPropertyDefinedInFormEditorSetup' => false,
518  'isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => true,
519  'getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup' => 'xxx',
520  ],
521  $formElement,
522  $sessionToken,
523  -1,
524  $validationDto,
525  ],
526  [
527  [
528  'isPropertyCollectionPropertyDefinedInFormEditorSetup' => false,
529  'isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => true,
530  'getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup' => 'default',
531  ],
532  $formElement,
533  $sessionToken,
534  -1,
535  $validationDto,
536  ],
537  [
538  [
539  'isPropertyCollectionPropertyDefinedInFormEditorSetup' => false,
540  'isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup' => true,
541  'getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup' => 'default',
542  ],
543  $formElementWithoutHmac,
544  $sessionToken,
545  1528591502,
546  $validationDto,
547  ],
548  ];
549  }
550 
551  #[DataProvider('validateAllPropertyValuesFromCreatablePropertyCollectionElementDataProvider')]
552  #[Test]
554  array $mockConfiguration,
555  array $formElement,
556  string $sessionToken,
557  int $exceptionCode,
558  ‪ValidationDto $validationDto
559  ): void {
560  $configurationService = $this->createMock(ConfigurationService::class);
561  $configurationService
562  ->method('isPropertyCollectionPropertyDefinedInFormEditorSetup')
563  ->willReturn($mockConfiguration['isPropertyCollectionPropertyDefinedInFormEditorSetup']);
564  $configurationService->method(
565  'isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup'
566  )->willReturn($mockConfiguration['isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup']);
567  $configurationService->method(
568  'getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup'
569  )->willReturn($mockConfiguration['getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup']);
570  $formDefinitionValidationService = $this->getAccessibleMock(FormDefinitionValidationService::class, null);
571  GeneralUtility::setSingletonInstance(FormDefinitionValidationService::class, $formDefinitionValidationService);
572  GeneralUtility::setSingletonInstance(ConfigurationService::class, $configurationService);
573 
574  $subject = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false);
575  $returnedExceptionCode = -1;
576  try {
577  $subject->_call(
578  'validateAllPropertyValuesFromCreatablePropertyCollectionElement',
579  $formElement,
580  $sessionToken,
581  $validationDto
582  );
583  } catch (‪PropertyException $e) {
584  $returnedExceptionCode = $e->getCode();
585  }
586  self::assertEquals($returnedExceptionCode, $exceptionCode);
587  }
588 }
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\validateAllPropertyValuesFromCreatablePropertyCollectionElementDataProvider
‪static validateAllPropertyValuesFromCreatablePropertyCollectionElementDataProvider()
Definition: FormDefinitionValidationServiceTest.php:413
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\validateAllPropertyValuesFromCreatableFormElement
‪validateAllPropertyValuesFromCreatableFormElement(array $mockConfiguration, array $formElement, string $sessionToken, int $exceptionCode, ValidationDto $validationDto)
Definition: FormDefinitionValidationServiceTest.php:377
‪TYPO3\CMS\Extbase\Property\Exception
Definition: DuplicateObjectException.php:18
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\validateAllFormElementPropertyValuesByHmacThrowsExceptionIfHmacDoesNotExists
‪validateAllFormElementPropertyValuesByHmacThrowsExceptionIfHmacDoesNotExists()
Definition: FormDefinitionValidationServiceTest.php:70
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\validateAllPropertyCollectionElementValuesByHmacThrowsExceptionIfHmacIsInvalid
‪validateAllPropertyCollectionElementValuesByHmacThrowsExceptionIfHmacIsInvalid()
Definition: FormDefinitionValidationServiceTest.php:126
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\validateAllFormElementPropertyValuesByHmacThrowsExceptionIfHmacIsInvalid
‪validateAllFormElementPropertyValuesByHmacThrowsExceptionIfHmacIsInvalid()
Definition: FormDefinitionValidationServiceTest.php:44
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto
Definition: ValidationDto.php:23
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinitionValidationService
Definition: FormDefinitionValidationService.php:35
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest
Definition: FormDefinitionValidationServiceTest.php:30
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration
Definition: ConfigurationServiceTest.php:18
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\validateAllPropertyValuesFromCreatablePropertyCollectionElement
‪validateAllPropertyValuesFromCreatablePropertyCollectionElement(array $mockConfiguration, array $formElement, string $sessionToken, int $exceptionCode, ValidationDto $validationDto)
Definition: FormDefinitionValidationServiceTest.php:553
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\tearDown
‪tearDown()
Definition: FormDefinitionValidationServiceTest.php:37
‪TYPO3\CMS\Core\Utility\GeneralUtility\hmac
‪static string hmac($input, $additionalSecret='')
Definition: GeneralUtility.php:474
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\validateAllFormElementPropertyValuesByHmacThrowsNoExceptionIfHmacIsValid
‪validateAllFormElementPropertyValuesByHmacThrowsNoExceptionIfHmacIsValid()
Definition: FormDefinitionValidationServiceTest.php:92
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\setUp
‪setUp()
Definition: FormDefinitionValidationServiceTest.php:31
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService
Definition: ConfigurationService.php:50
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\validateAllPropertyCollectionElementValuesByHmacThrowsExceptionIfHmacDoesNotExists
‪validateAllPropertyCollectionElementValuesByHmacThrowsExceptionIfHmacDoesNotExists()
Definition: FormDefinitionValidationServiceTest.php:164
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Form\Domain\Configuration\Exception\PropertyException
Definition: PropertyException.php:25
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\validateAllPropertyValuesFromCreatableFormElementDataProvider
‪static validateAllPropertyValuesFromCreatableFormElementDataProvider()
Definition: FormDefinitionValidationServiceTest.php:238
‪TYPO3\CMS\Webhooks\Message\$identifier
‪identifier readonly string $identifier
Definition: FileAddedMessage.php:37
‪TYPO3\CMS\Form\Tests\Unit\Domain\Configuration\FormDefinitionValidationServiceTest\validateAllPropertyCollectionElementValuesByHmacThrowsNoExceptionIfHmacIsValid
‪validateAllPropertyCollectionElementValuesByHmacThrowsNoExceptionIfHmacIsValid()
Definition: FormDefinitionValidationServiceTest.php:198