1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[ticket/11768] This commit integrates s9e\TextFormatter

This commit integrates s9e\TextFormatter as outlined in
http://area51.phpbb.com/phpBB/viewtopic.php?f=108&t=44467

PHPBB3-11768
This commit is contained in:
s9e
2014-11-22 20:00:58 +01:00
committed by JoshyPHP
parent eb7e6d7c23
commit 147a713cc0
75 changed files with 5967 additions and 161 deletions

View File

@@ -0,0 +1,38 @@
<?php
/**
*
* @package testing
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
class phpbb_text_processing_strip_bbcode_test extends phpbb_test_case
{
public function test_legacy()
{
$original = '[b:20m4ill1]bold[/b:20m4ill1]';
$expected = ' bold ';
$actual = $original;
strip_bbcode($actual);
$this->assertSame($expected, $actual, '20m4ill1');
}
public function test_s9e()
{
$phpbb_container = $this->get_test_case_helpers()->set_s9e_services();
$original = '<r><B><s>[b]</s>bold<e>[/b]</e></B></r>';
$expected = ' bold ';
$actual = $original;
strip_bbcode($actual);
$this->assertSame($expected, $actual);
}
}