‪TYPO3CMS  10.4
CheckFlexFormValueTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
20 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
21 
25 class ‪CheckFlexFormValueTest extends UnitTestCase
26 {
31  {
32  $currentFlexFormDataArray = [
33  'foo' => [
34  'bar' => 'baz',
35  'qux' => [
36  'quux' => 'quuux',
37  'switchableControllerActions' => []
38  ],
39  'switchableControllerActions' => []
40  ],
41  'switchableControllerActions' => []
42  ];
43 
44  $expectedFlexFormDataArray = [
45  'foo' => [
46  'bar' => 'baz',
47  'qux' => [
48  'quux' => 'quuux',
49  ],
50  ],
51  ];
52 
54  $dataHandler = $this->createMock(DataHandler::class);
55 
56  $newFlexFormDataArray = [];
58  $checkFlexFormValue = $this->getMockBuilder(CheckFlexFormValue::class)
59  ->setMethods(['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:84
‪TYPO3\CMS\Extbase\Tests\Unit\Hook\DataHandler\CheckFlexFormValueTest
Definition: CheckFlexFormValueTest.php:26
‪TYPO3\CMS\Extbase\Tests\Unit\Hook\DataHandler\CheckFlexFormValueTest\checkFlexFormValueBeforeMergeRemovesSwitchableControllerActions
‪checkFlexFormValueBeforeMergeRemovesSwitchableControllerActions()
Definition: CheckFlexFormValueTest.php:30
‪TYPO3\CMS\Extbase\Tests\Unit\Hook\DataHandler
Definition: CheckFlexFormValueTest.php:16
‪TYPO3\CMS\Extbase\Hook\DataHandler\CheckFlexFormValue
Definition: CheckFlexFormValue.php:25