/** * @test */ public function migrateFixesReferenceToLinkHandler() { $input = ['aTable' => ['columns' => ['aCol' => ['config' => ['wizards' => ['link' => ['module' => ['name' => 'wizard_element_browser', 'urlParameters' => ['mode' => 'wizard']]]]]]]]]; $expected = ['aTable' => ['columns' => ['aCol' => ['config' => ['wizards' => ['link' => ['module' => ['name' => 'wizard_link']]]]]]]]; $subject = new TcaMigration(); $this->assertEquals($expected, $subject->migrate($input)); }
/** * @test */ public function migrateSpecialConfigurationAndRemoveShowItemStylePointerConfigDoesNotAddMessageIfOnlySyntaxChanged() { $input = array( 'aTable' => array( 'columns' => array( 'anotherField' => array( ), ), 'types' => array( 0 => array( 'showitem' => 'aField;;;', ), ), ), ); $subject = new TcaMigration(); $subject->migrate($input); $this->assertEmpty($subject->getMessages()); }
/** * @test */ public function migrateRewritesColorpickerWizard() { $input = ['aTable' => ['columns' => ['aCol' => ['config' => ['wizards' => ['colorpicker' => ['type' => 'colorbox', 'title' => 'Color picker', 'module' => ['name' => 'wizard_colorpicker'], 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1']]]]]]]; $expected = ['aTable' => ['columns' => ['aCol' => ['config' => ['renderType' => 'colorpicker']]]]]; $subject = new TcaMigration(); $this->assertEquals($expected, $subject->migrate($input)); }
/** * @test * @dataProvider migrateRemovesRteTransformOptionsDataProvider * @param array $givenConfig * @param array $expectedConfig */ public function migrateRemovesRteTransformOptions(array $givenConfig, array $expectedConfig) { $subject = new TcaMigration(); $this->assertEquals($expectedConfig, $subject->migrate($givenConfig)); }
/** * @test */ public function migrateIconsForFormFieldWizardsToNewLocation() { $input = array('aTable' => array('columns' => array('bodytext' => array('config' => array('wizards' => array('t3editorHtml' => array('icon' => 'wizard_table.gif'))))))); $expected = array('aTable' => array('columns' => array('bodytext' => array('config' => array('wizards' => array('t3editorHtml' => array('icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_table.gif'))))))); $subject = new TcaMigration(); $this->assertEquals($expected, $subject->migrate($input)); }