mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-09 23:28:42 +00:00
e66a98c396
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1229 48356398-32a2-884e-a903-53898d9a118a
27 lines
862 B
PHP
27 lines
862 B
PHP
<?php
|
|
|
|
require_once 'HTMLPurifier/Language.php';
|
|
|
|
class HTMLPurifier_LanguageTest extends UnitTestCase
|
|
{
|
|
|
|
var $lang;
|
|
|
|
function test_getMessage() {
|
|
$lang = new HTMLPurifier_Language();
|
|
$lang->_loaded = true;
|
|
$lang->messages['HTMLPurifier'] = 'HTML Purifier';
|
|
$this->assertIdentical($lang->getMessage('HTMLPurifier'), 'HTML Purifier');
|
|
$this->assertIdentical($lang->getMessage('LanguageTest: Totally non-existent key'), '[LanguageTest: Totally non-existent key]');
|
|
}
|
|
|
|
function test_formatMessage() {
|
|
$lang = new HTMLPurifier_Language();
|
|
$lang->_loaded = true;
|
|
$lang->messages['LanguageTest: Error'] = 'Error is $1 on line $2';
|
|
$this->assertIdentical($lang->formatMessage('LanguageTest: Error', array(1=>'fatal', 32)), 'Error is fatal on line 32');
|
|
}
|
|
|
|
}
|
|
|
|
?>
|