Code Duplication    Length = 23-24 lines in 2 locations

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

@@ 1063-1085 (lines=23) @@
1060
        $this->assertHtml($expected, $result);
1061
    }
1062
1063
    public function testHtml5Video()
1064
    {
1065
        //* setup
1066
        $bbcodeImg = Configure::read('Saito.Settings.bbcode_img');
1067
        Configure::write('Saito.Settings.bbcode_img', true);
1068
1069
        //* @td write video tests
1070
        $url = 'http://example.com/audio.mp4';
1071
        $input = "[video]{$url}[/video]";
1072
        $result = $this->_Parser->parse($input);
1073
        $expected = [
1074
            'video' => [
1075
                'src' => $url,
1076
                'preload' => 'auto',
1077
                'controls' => 'controls',
1078
                'x-webkit-airplay' => 'allow'
1079
            ],
1080
        ];
1081
        $this->assertHtml($expected, $result);
1082
1083
        //* teardown
1084
        Configure::write('Saito.Settings.bbcode_img', $bbcodeImg);
1085
    }
1086
1087
    public function testHr()
1088
    {
@@ 1156-1179 (lines=24) @@
1153
        $this->assertHtml($expected, $result);
1154
    }
1155
1156
    public function testHtml5Audio()
1157
    {
1158
        //* setup
1159
        $bbcodeImg = Configure::read('Saito.Settings.bbcode_img');
1160
        Configure::write('Saito.Settings.bbcode_img', true);
1161
1162
        //* simple test
1163
        $url = 'http://example.com/audio3.m4a';
1164
        $input = "[audio]{$url}[/audio]";
1165
        $result = $this->_Parser->parse($input);
1166
        $expected = [
1167
            'audio' => [
1168
                'src' => $url,
1169
                'controls' => 'controls',
1170
                'preload' => 'auto',
1171
                'x-webkit-airplay' => 'allow',
1172
            ],
1173
            '/audio',
1174
        ];
1175
        $this->assertHtml($expected, $result);
1176
1177
        //* teardown
1178
        Configure::write('Saito.Settings.bbcode_img', $bbcodeImg);
1179
    }
1180
1181
    /* ******************** Setup ********************** */
1182