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

testBeforeLegend() public method

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