TYPO3 CMS  TYPO3_6-2
FlexFormToolsTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
19 
24 
28  public function traverseFlexFormXmlDataRecurseDoesNotFailOnNotExistingField() {
29  $dataStruct = array(
30  'dummy_field' => array(
31  'TCEforms' => array(
32  'config' => array(),
33  ),
34  ),
35  );
36  $pA = array(
37  'vKeys' => array('ES'),
38  'callBackMethod_value' => 'dummy',
39  );
40  $editData = '';
42  $subject = $this->getMock('TYPO3\\CMS\\Core\\Configuration\\FlexForm\\FlexFormTools', array('executeCallBackMethod'));
43  $subject->expects($this->never())->method('executeCallBackMethod');
44  $subject->traverseFlexFormXMLData_recurse($dataStruct, $editData, $pA);
45  }
46 
50  public function traverseFlexFormXmlDataRecurseDoesNotFailOnNotExistingArrayField() {
51  $dataStruct = array(
52  'dummy_field' => array(
53  'type' => 'array',
54  'el' => 'field_not_in_data',
55  ),
56  );
57  $pA = array(
58  'vKeys' => array('ES'),
59  'callBackMethod_value' => 'dummy',
60  );
61  $editData = array(
62  'field' => array(
63  'el' => 'dummy',
64  ),
65  );
66  $editData2 = '';
68  $subject = $this->getMock('TYPO3\\CMS\\Core\\Configuration\\FlexForm\\FlexFormTools');
69  $this->assertEquals(
70  $subject->traverseFlexFormXMLData_recurse($dataStruct, $editData, $pA),
71  $subject->traverseFlexFormXMLData_recurse($dataStruct, $editData2, $pA)
72  );
73  }
74 
75 }