Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
33.33% covered (danger)
33.33%
3 / 9
50.00% covered (danger)
50.00%
1 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
phpbb_text_processing_strip_bbcode_test
33.33% covered (danger)
33.33%
3 / 9
50.00% covered (danger)
50.00%
1 / 2
3.19
0.00% covered (danger)
0.00%
0 / 1
 data_strip_bbcode
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
2
 test_strip_bbcode
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2/**
3*
4* This file is part of the phpBB Forum Software package.
5*
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
7* @license GNU General Public License, version 2 (GPL-2.0)
8*
9* For full copyright and license information, please see
10* the docs/CREDITS.txt file.
11*
12*/
13
14class phpbb_text_processing_strip_bbcode_test extends phpbb_test_case
15{
16
17    public static function data_strip_bbcode()
18    {
19        return [
20            ['[b:20m4ill1]bold[/b:20m4ill1]', ' bold '],
21            ['<r><B><s>[b]</s>bold<e>[/b]</e></B></r>', ' bold '],
22            ['[b:20m4ill1]bo &amp; ld[/b:20m4ill1]', ' bo &amp; ld '],
23            ['<r><B><s>[b]</s>bo &amp; ld<e>[/b]</e></B></r>', ' bo &amp; ld ']
24        ];
25    }
26
27    /**
28     * @dataProvider data_strip_bbcode
29     */
30    public function test_strip_bbcode($input, $expected)
31    {
32        $phpbb_container = $this->get_test_case_helpers()->set_s9e_services();
33
34        strip_bbcode($input);
35
36        $this->assertSame($expected, $input);
37    }
38}