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

testIgnoresDuplicateLegend() public method

Tests that duplicate legends are ignored.
    public function testIgnoresDuplicateLegend()
    {
        $pm = PaletteManipulator::create()->addLegend('foobar_legend', '', PaletteManipulator::POSITION_APPEND)->addField('bar', 'foo', PaletteManipulator::POSITION_AFTER);
        $this->assertEquals('{foobar_legend},foo,bar;{other_legend},other', $pm->applyToString('{foobar_legend},foo;{other_legend},other'));
    }