Contao\CoreBundle\Test\DataContainer\PaletteManipulatorTest::testAfterLegend PHP Method

testAfterLegend() public method

Tests adding a legend after another legend.
public testAfterLegend ( )
    public function testAfterLegend()
    {
        $pm = PaletteManipulator::create()->addLegend('config_legend', 'foo_legend', PaletteManipulator::POSITION_AFTER)->addField('foo', 'config_legend');
        $this->assertEquals('{foo_legend},baz;{config_legend},foo', $pm->applyToString('{foo_legend},baz'));
        $this->assertEquals('{bar_legend},baz;{config_legend},foo', $pm->applyToString('{bar_legend},baz'));
    }