PhpbbWrapperTest::testBbcodeStripping()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 *
4
 * @copyright (c) 2013 phpBB Group
5
 * @license http://opensource.org/licenses/gpl-3.0.php GNU General Public License v3
6
 * @author MichaelC
7
 *
8
 */
9
10
namespace AppBundle\Tests;
11
12
use AppBundle\Wrappers\PhpbbHandling;
13
14
class PhpbbWrapperTest extends \PHPUnit_Framework_TestCase
15
{
16
	public function testBbcodeStripping()
17
	{
18
		$content = '[b:32fdkg1c]b[/b:32fdkg1c][i:32fdkg1c]i[/i:32fdkg1c][u:32fdkg1c]u[/u:32fdkg1c] [url=http&#58;//www&#46;phpbb&#46;com:32fdkg1c].com[/url:32fdkg1c] [size=85:32fdkg1c]sm[/size:32fdkg1c][color=#FF0000:32fdkg1c]re[/color:32fdkg1c][code:32fdkg1c]hi[/code:32fdkg1c][quote=&quot;MichaelC&quot;:32fdkg1c]hi[/quote:32fdkg1c][list:32fdkg1c][*:32fdkg1c]one[/*:m:32fdkg1c][*:32fdkg1c]another[/*:m:32fdkg1c][/list:u:32fdkg1c]';
19
		$uid = '32fdkg1c';
20
		$expected = ' b  i  u   .com   sm  re  hi  hi   one  another  ';
21
22
		$this->assertEquals(PhpbbHandling::bbcodeStripping($content, $uid), $expected);
23
	}
24
}
25