public function testApplyToDcaPalette()
{
$pm = PaletteManipulator::create()->addLegend('foobar_legend', '', PaletteManipulator::POSITION_APPEND)->addField(['foo', 'bar'], 'foobar_legend', PaletteManipulator::POSITION_APPEND);
$GLOBALS['TL_DCA']['tl_test']['palettes']['default'] = '{name_legend},name';
$pm->applyToPalette('default', 'tl_test');
$this->assertEquals('{name_legend},name;{foobar_legend},foo,bar', $GLOBALS['TL_DCA']['tl_test']['palettes']['default']);
}