mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +02:00
PSR-2 reformatting PHPDoc corrections
With minor corrections. Signed-off-by: Marcus Bointon <marcus@synchromedia.co.uk> Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
committed by
Edward Z. Yang
parent
19eee14899
commit
fac747bdbd
@@ -8,14 +8,16 @@ class HTMLPurifier_LanguageTest extends HTMLPurifier_Harness
|
||||
|
||||
protected $lang;
|
||||
|
||||
protected function generateEnLanguage() {
|
||||
protected function generateEnLanguage()
|
||||
{
|
||||
$factory = HTMLPurifier_LanguageFactory::instance();
|
||||
$config = HTMLPurifier_Config::create(array('Core.Language' => 'en'));
|
||||
$context = new HTMLPurifier_Context();
|
||||
return $factory->create($config, $context);
|
||||
}
|
||||
|
||||
function test_getMessage() {
|
||||
public function test_getMessage()
|
||||
{
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$context = new HTMLPurifier_Context();
|
||||
$lang = new HTMLPurifier_Language($config, $context);
|
||||
@@ -25,7 +27,8 @@ class HTMLPurifier_LanguageTest extends HTMLPurifier_Harness
|
||||
$this->assertIdentical($lang->getMessage('LanguageTest: Totally non-existent key'), '[LanguageTest: Totally non-existent key]');
|
||||
}
|
||||
|
||||
function test_formatMessage() {
|
||||
public function test_formatMessage()
|
||||
{
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$context = new HTMLPurifier_Context();
|
||||
$lang = new HTMLPurifier_Language($config, $context);
|
||||
@@ -34,7 +37,8 @@ class HTMLPurifier_LanguageTest extends HTMLPurifier_Harness
|
||||
$this->assertIdentical($lang->formatMessage('LanguageTest: Error', array(1=>'fatal', 32)), 'Error is fatal on line 32');
|
||||
}
|
||||
|
||||
function test_formatMessage_tokenParameter() {
|
||||
public function test_formatMessage_tokenParameter()
|
||||
{
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$context = new HTMLPurifier_Context();
|
||||
$generator = new HTMLPurifier_Generator($config, $context); // replace with mock if this gets icky
|
||||
@@ -51,14 +55,16 @@ class HTMLPurifier_LanguageTest extends HTMLPurifier_Harness
|
||||
'Data Token: data>, data>, data>, 23');
|
||||
}
|
||||
|
||||
function test_listify() {
|
||||
public function test_listify()
|
||||
{
|
||||
$lang = $this->generateEnLanguage();
|
||||
$this->assertEqual($lang->listify(array('Item')), 'Item');
|
||||
$this->assertEqual($lang->listify(array('Item', 'Item2')), 'Item and Item2');
|
||||
$this->assertEqual($lang->listify(array('Item', 'Item2', 'Item3')), 'Item, Item2 and Item3');
|
||||
}
|
||||
|
||||
function test_formatMessage_arrayParameter() {
|
||||
public function test_formatMessage_arrayParameter()
|
||||
{
|
||||
$lang = $this->generateEnLanguage();
|
||||
|
||||
$array = array('Item1', 'Item2', 'Item3');
|
||||
|
Reference in New Issue
Block a user