mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge branch '3.3.x'
This commit is contained in:
@@ -13,27 +13,26 @@
|
||||
|
||||
class phpbb_text_processing_strip_bbcode_test extends phpbb_test_case
|
||||
{
|
||||
public function test_legacy()
|
||||
|
||||
public function data_strip_bbcode()
|
||||
{
|
||||
$original = '[b:20m4ill1]bold[/b:20m4ill1]';
|
||||
$expected = ' bold ';
|
||||
|
||||
$actual = $original;
|
||||
strip_bbcode($actual);
|
||||
|
||||
$this->assertSame($expected, $actual, '20m4ill1');
|
||||
return [
|
||||
['[b:20m4ill1]bold[/b:20m4ill1]', ' bold '],
|
||||
['<r><B><s>[b]</s>bold<e>[/b]</e></B></r>', ' bold '],
|
||||
['[b:20m4ill1]bo & ld[/b:20m4ill1]', ' bo & ld '],
|
||||
['<r><B><s>[b]</s>bo & ld<e>[/b]</e></B></r>', ' bo & ld ']
|
||||
];
|
||||
}
|
||||
|
||||
public function test_s9e()
|
||||
/**
|
||||
* @dataProvider data_strip_bbcode
|
||||
*/
|
||||
public function test_strip_bbcode($input, $expected)
|
||||
{
|
||||
$phpbb_container = $this->get_test_case_helpers()->set_s9e_services();
|
||||
|
||||
$original = '<r><B><s>[b]</s>bold<e>[/b]</e></B></r>';
|
||||
$expected = ' bold ';
|
||||
strip_bbcode($input);
|
||||
|
||||
$actual = $original;
|
||||
strip_bbcode($actual);
|
||||
|
||||
$this->assertSame($expected, $actual);
|
||||
$this->assertSame($expected, $input);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user