[!!!][TASK] Drop core 6->7 auto TCA migrations
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Tests / UnitDeprecated / Form / FormDataProvider / TcaFlexPrepareTest.php
index 48d54ff..90b37d4 100644 (file)
@@ -22,11 +22,12 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
- * Test case for TcaFlexPrepare to render the functionality when a TCA migration happened
+ * Test case
  */
-class TcaFlexPrepareTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class TcaFlexPrepareTest extends UnitTestCase
 {
     /**
      * @var TcaFlexPrepare
@@ -39,14 +40,10 @@ class TcaFlexPrepareTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     protected $backendUserProphecy;
 
     /**
-     * @var array A backup of registered singleton instances
+     * Set up
      */
-    protected $singletonInstances = [];
-
     protected function setUp()
     {
-        $this->singletonInstances = GeneralUtility::getSingletonInstances();
-
         // Suppress cache foo in xml helpers of GeneralUtility
         /** @var CacheManager|ObjectProphecy $cacheManagerProphecy */
         $cacheManagerProphecy = $this->prophesize(CacheManager::class);
@@ -57,10 +54,12 @@ class TcaFlexPrepareTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
         $this->subject = new TcaFlexPrepare();
     }
 
+    /**
+     * Tear down
+     */
     protected function tearDown()
     {
         GeneralUtility::purgeInstances();
-        GeneralUtility::resetSingletonInstances($this->singletonInstances);
         parent::tearDown();
     }
 
@@ -95,22 +94,9 @@ class TcaFlexPrepareTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
                                                             <TCEforms>
                                                                 <label>aFlexFieldLabel</label>
                                                                 <config>
-                                                                    <type>text</type>
-                                                                    <default>defaultValue</default>
-                                                                    <wizards>
-                                                                        <t3editor>
-                                                                            <type>userFunc</type>
-                                                                            <userFunc>TYPO3\\CMS\\T3editor\\FormWizard->main</userFunc>
-                                                                            <title>t3editor</title>
-                                                                            <icon>content-table</icon>
-                                                                            <module>
-                                                                                <name>wizard_table</name>
-                                                                            </module>
-                                                                            <params>
-                                                                                <format>html</format>
-                                                                            </params>
-                                                                        </t3editor>
-                                                                    </wizards>
+                                                                    <type>input</type>
+                                                                    <renderType>inputDateTime</renderType>
+                                                                    <max>42</max>
                                                                 </config>
                                                             </TCEforms>
                                                         </aFlexField>
@@ -141,10 +127,8 @@ class TcaFlexPrepareTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
                             'aFlexField' => [
                                 'label' => 'aFlexFieldLabel',
                                 'config' => [
-                                    'type' => 'text',
-                                    'default' => 'defaultValue',
-                                    'renderType' => 't3editor',
-                                    'format' => 'html',
+                                    'type' => 'input',
+                                    'renderType' => 'inputDateTime',
                                 ],
                             ],
                         ],
@@ -197,22 +181,9 @@ class TcaFlexPrepareTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
                                                                             <TCEforms>
                                                                                 <label>aFlexFieldLabel</label>
                                                                                 <config>
-                                                                                    <type>text</type>
-                                                                                    <default>defaultValue</default>
-                                                                                    <wizards>
-                                                                                        <t3editor>
-                                                                                            <type>userFunc</type>
-                                                                                            <userFunc>TYPO3\\CMS\\T3editor\\FormWizard->main</userFunc>
-                                                                                            <title>t3editor</title>
-                                                                                            <icon>content-table</icon>
-                                                                                            <module>
-                                                                                                <name>wizard_table</name>
-                                                                                            </module>
-                                                                                            <params>
-                                                                                                <format>html</format>
-                                                                                            </params>
-                                                                                        </t3editor>
-                                                                                    </wizards>
+                                                                                    <type>input</type>
+                                                                                    <renderType>inputDateTime</renderType>
+                                                                                    <max>42</max>
                                                                                 </config>
                                                                             </TCEforms>
                                                                         </aFlexField>
@@ -256,10 +227,8 @@ class TcaFlexPrepareTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
                                             'aFlexField' => [
                                                 'label' => 'aFlexFieldLabel',
                                                 'config' => [
-                                                    'type' => 'text',
-                                                    'default' => 'defaultValue',
-                                                    'renderType' => 't3editor',
-                                                    'format' => 'html',
+                                                    'type' => 'input',
+                                                    'renderType' => 'inputDateTime',
                                                 ],
                                             ],
                                         ],