Code Duplication    Length = 15-26 lines in 2 locations

plugins/BbcodeParser/tests/TestCase/Lib/BbcodeParserTest.php 2 locations

@@ 461-475 (lines=15) @@
458
        $this->assertEquals(trim($expected), trim($actual));
459
    }
460
461
    public function testFloat()
462
    {
463
        $expected = [
464
            ['div' => ['class' => 'clearfix']],
465
            '/div',
466
            ['div' => ['class' => 'richtext-float']],
467
            'text',
468
            '/div',
469
            'more'
470
        ];
471
472
        $input = '[float]text[/float]more';
473
        $result = $this->_Parser->parse($input);
474
        $this->assertHtml($expected, $result);
475
    }
476
477
    public function testLinkAuto()
478
    {
@@ 798-823 (lines=26) @@
795
        unset($_SERVER['HTTPS']);
796
    }
797
798
    public function testImageNestedInExternalLink()
799
    {
800
        $input = '[url=http://heise.de][img]http://heise.de/img.png[/img][/url]';
801
802
        /*
803
        $expected = "<a href='http://heise.de' rel='external' target='_blank'><img src=\"http://heise.de/img.png\" class=\"external_image\" style=\"\" width=\"auto\" height=\"auto\" alt=\"\" /></a>";
804
        */
805
        $expected = [
806
            [
807
                'a' => [
808
                    'href' => 'http://heise.de',
809
                    'rel' => 'external',
810
                    'target' => '_blank',
811
                ]
812
            ],
813
            [
814
                'img' => [
815
                    'src' => 'http://heise.de/img.png',
816
                    'alt' => '',
817
                ]
818
            ],
819
            '/a'
820
        ];
821
        $result = $this->_Parser->parse($input);
822
        $this->assertHtml($expected, $result);
823
    }
824
825
    /**
826
     * [uploads]<image>[/uploads]