TYPO3 CMS  TYPO3_6-2
CheckFlexFormValueTest.php
Go to the documentation of this file.
1 <?php
3 
21 
25  public function checkFlexFormValueBeforeMergeRemovesSwitchableControllerActions() {
26  $currentFlexFormDataArray = array(
27  'foo' => array(
28  'bar' => 'baz',
29  'qux' => array(
30  'quux' => 'quuux',
31  'switchableControllerActions' => array()
32  ),
33  'switchableControllerActions' => array()
34  ),
35  'switchableControllerActions' => array()
36  );
37 
38  $expectedFlexFormDataArray = array(
39  'foo' => array(
40  'bar' => 'baz',
41  'qux' => array(
42  'quux' => 'quuux',
43  ),
44  ),
45  );
46 
48  $dataHandler = $this->getMock('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
49 
50  $newFlexFormDataArray = array();
52  $checkFlexFormValue = $this->getMock('TYPO3\\CMS\\Extbase\\Hook\\DataHandler\\CheckFlexFormValue', array('dummy'));
53  $checkFlexFormValue->checkFlexFormValue_beforeMerge($dataHandler, $currentFlexFormDataArray, $newFlexFormDataArray);
54 
55  $this->assertSame($expectedFlexFormDataArray, $currentFlexFormDataArray);
56  }
57 }