‪TYPO3CMS  11.5
CheckFlexFormValueTest.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 
22 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
23 
27 class ‪CheckFlexFormValueTest extends UnitTestCase
28 {
33  {
34  $currentFlexFormDataArray = [
35  'foo' => [
36  'bar' => 'baz',
37  'qux' => [
38  'quux' => 'quuux',
39  'switchableControllerActions' => [],
40  ],
41  'switchableControllerActions' => [],
42  ],
43  'switchableControllerActions' => [],
44  ];
45 
46  $expectedFlexFormDataArray = [
47  'foo' => [
48  'bar' => 'baz',
49  'qux' => [
50  'quux' => 'quuux',
51  ],
52  ],
53  ];
54 
55  $dataHandler = $this->createMock(DataHandler::class);
56 
57  $newFlexFormDataArray = [];
58  $checkFlexFormValue = $this->getMockBuilder(CheckFlexFormValue::class)
59  ->addMethods(['dummy'])
60  ->getMock();
61  $checkFlexFormValue->checkFlexFormValue_beforeMerge($dataHandler, $currentFlexFormDataArray, $newFlexFormDataArray);
62 
63  self::assertSame($expectedFlexFormDataArray, $currentFlexFormDataArray);
64  }
65 }
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:86
‪TYPO3\CMS\Extbase\Tests\Unit\Hook\DataHandler\CheckFlexFormValueTest
Definition: CheckFlexFormValueTest.php:28
‪TYPO3\CMS\Extbase\Tests\Unit\Hook\DataHandler\CheckFlexFormValueTest\checkFlexFormValueBeforeMergeRemovesSwitchableControllerActions
‪checkFlexFormValueBeforeMergeRemovesSwitchableControllerActions()
Definition: CheckFlexFormValueTest.php:32
‪TYPO3\CMS\Extbase\Tests\Unit\Hook\DataHandler
Definition: CheckFlexFormValueTest.php:18
‪TYPO3\CMS\Extbase\Hook\DataHandler\CheckFlexFormValue
Definition: CheckFlexFormValue.php:25