‪TYPO3CMS  ‪main
EvaluateDisplayConditionsTestClass.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 
21 {
28  public function ‪addDataEvaluatesUserConditionCallback(array $parameter): void
29  {
30  $expected = [
31  'record' => [],
32  'flexContext' => [],
33  'flexformValueKey' => 'vDEF',
34  'conditionParameters' => [
35  0 => 'more',
36  1 => 'arguments',
37  ],
38  ];
39  if ($expected === $parameter) {
40  throw new \RuntimeException('testing', 1488130499);
41  }
42  }
43 
50  public function ‪addDataPassesFlexContextToUserConditionCallback(array $parameter): bool
51  {
52  $expected = [
53  'context' => 'flexField',
54  'sheetNameFieldNames' => [
55  'sDEF.foo' => [
56  'sheetName' => 'sDEF',
57  'fieldName' => 'foo',
58  ],
59  ],
60  'currentSheetName' => 'sDEF',
61  'currentFieldName' => 'foo',
62  'flexFormDataStructure' => [
63  'sheets' => [
64  'sDEF' => [
65  'ROOT' => [
66  'type' => 'array',
67  'el' => [
68  'foo' => [
69  'displayCond' => 'USER:' . self::class . '->addDataPassesFlexContextToUserConditionCallback:some:info',
70  ],
71  ],
72  ],
73  ],
74  ],
75  ],
76  'flexFormRowData' => null,
77  ];
78  if ($expected !== $parameter['flexContext']) {
79  throw new \RuntimeException('testing', 1538057402);
80  }
81  return true;
82  }
83 }
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\Fixtures\EvaluateDisplayConditionsTestClass\addDataEvaluatesUserConditionCallback
‪addDataEvaluatesUserConditionCallback(array $parameter)
Definition: EvaluateDisplayConditionsTestClass.php:28
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\Fixtures\EvaluateDisplayConditionsTestClass\addDataPassesFlexContextToUserConditionCallback
‪addDataPassesFlexContextToUserConditionCallback(array $parameter)
Definition: EvaluateDisplayConditionsTestClass.php:50
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\Fixtures
Definition: EvaluateDisplayConditionsTestClass.php:18
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\Fixtures\EvaluateDisplayConditionsTestClass
Definition: EvaluateDisplayConditionsTestClass.php:21