diff options
| author | Thomas Backlund <tmb@mageia.org> | 2017-05-26 20:02:07 +0300 |
|---|---|---|
| committer | Thomas Backlund <tmb@mageia.org> | 2017-05-26 20:02:07 +0300 |
| commit | 5e6803684739dc0963d784c0cefd86697ad397f3 (patch) | |
| tree | 8ab6acff6c8069c5ba3035cba3adec90dba24ba1 /tests/text_processing | |
| parent | 8fc97191a3533a1cce0b051baa55db68d83b5dc4 (diff) | |
| parent | 11242dd07d6359a725f22f3674028adfdddb49d6 (diff) | |
| download | forums-5e6803684739dc0963d784c0cefd86697ad397f3.tar forums-5e6803684739dc0963d784c0cefd86697ad397f3.tar.gz forums-5e6803684739dc0963d784c0cefd86697ad397f3.tar.bz2 forums-5e6803684739dc0963d784c0cefd86697ad397f3.tar.xz forums-5e6803684739dc0963d784c0cefd86697ad397f3.zip | |
Merge tag 'release-3.0.14' of https://github.com/phpbb/phpbb
Merge upstream 3.0.14 release.
Diffstat (limited to 'tests/text_processing')
| -rw-r--r-- | tests/text_processing/generate_text_for_display_test.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/text_processing/generate_text_for_display_test.php b/tests/text_processing/generate_text_for_display_test.php new file mode 100644 index 0000000000..a157fe7d9a --- /dev/null +++ b/tests/text_processing/generate_text_for_display_test.php @@ -0,0 +1,38 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2013 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; + + parent::setUp(); + + $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)); + } +} |
