18 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
35 $input =
'<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
39 <language index="lDEF">
40 <field index="settings.foo">
41 <value index="vDEF">Foo-Value</value>
43 <field index="settings.bar">
46 <itemType index="_arrayContainer">
49 <value index="vDEF">Baz1-Value</value>
52 <value index="vDEF">Bum1-Value</value>
54 <field index="dot.one">
55 <value index="vDEF">dot.one-Value</value>
57 <field index="dot.two">
58 <value index="vDEF">dot.two-Value</value>
62 <itemType index="_TOGGLE">0</itemType>
65 <itemType index="_arrayContainer">
68 <value index="vDEF">Baz2-Value</value>
71 <value index="vDEF">Bum2-Value</value>
75 <itemType index="_TOGGLE">0</itemType>
89 'baz' =>
'Baz1-Value',
90 'bum' =>
'Bum1-Value',
92 'one' =>
'dot.one-Value',
93 'two' =>
'dot.two-Value',
97 'baz' =>
'Baz2-Value',
106 $cacheManagerMock = $this->createMock(\
TYPO3\CMS\Core\Cache\CacheManager::class);
107 $cacheMock = $this->createMock(\
TYPO3\CMS\Core\Cache\Frontend\FrontendInterface::class);
108 $cacheManagerMock->expects($this->any())->method(
'getCache')->will($this->returnValue($cacheMock));
109 GeneralUtility::setSingletonInstance(\
TYPO3\CMS\Core\Cache\CacheManager::class, $cacheManagerMock);
111 $flexFormService = $this->getMockBuilder(\
TYPO3\CMS\Core\Service\FlexFormService::class)
112 ->setMethods([
'dummy'])
113 ->disableOriginalConstructor()
115 $convertedFlexFormArray = $flexFormService->convertFlexFormContentToArray($input);
116 $this->assertSame($expected, $convertedFlexFormArray);