aboutsummaryrefslogtreecommitdiffstats
path: root/tests/text_processing/generate_text_for_display.php
blob: 4088e33f300476f046004daba601b193c6dedbc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?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';
require_once dirname(__FILE__) . '/../mock/user.php';
require_once dirname(__FILE__) . '/../mock/cache.php';

class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_case
{
	public function setUp()
	{
		global $cache, $user;

		$cache = new phpbb_mock_cache;

		$user = new phpbb_mock_user;
		$user->optionset('viewcensors', false);
	}

	public function test_empty_string()
	{
		$this->assertSame('', generate_text_for_display('', '', '', 0));
	}

	public function test_zero_string()
	{
		$this->assertSame('0', generate_text_for_display('0', '', '', 0));
	}
}