1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-04 21:28:06 +02:00

Classname() constructors to __construct() constructors, as per SimpleTest. Also normalized ppp declarations; no public declaration for test methods, public/protected for the rest

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1663 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-04-21 15:24:18 +00:00
parent 5dbd455afb
commit 59605d592b
38 changed files with 101 additions and 101 deletions

View File

@@ -18,12 +18,12 @@ class HTMLPurifier_StringHashParserTest extends UnitTestCase
/**
* Assert that $file gets parsed into the form of $expect
*/
public function assertParse($file, $expect) {
protected function assertParse($file, $expect) {
$result = $this->parser->parseFile(dirname(__FILE__) . '/StringHashParser/' . $file);
$this->assertIdentical($result, $expect);
}
public function testSimple() {
function testSimple() {
$this->assertParse('Simple.txt', array(
'ID' => 'Namespace.Directive',
'TYPE' => 'string',
@@ -33,26 +33,26 @@ class HTMLPurifier_StringHashParserTest extends UnitTestCase
));
}
public function testOverrideSingle() {
function testOverrideSingle() {
$this->assertParse('OverrideSingle.txt', array(
'KEY' => 'New',
));
}
public function testAppendMultiline() {
function testAppendMultiline() {
$this->assertParse('AppendMultiline.txt', array(
'KEY' => "Line1\nLine2\n",
));
}
public function testDefault() {
function testDefault() {
$this->parser->default = 'NEW-ID';
$this->assertParse('Default.txt', array(
'NEW-ID' => 'DefaultValue',
));
}
public function testError() {
function testError() {
try {
$this->parser->parseFile('NoExist.txt');
} catch (HTMLPurifier_ConfigSchema_Exception $e) {
@@ -60,7 +60,7 @@ class HTMLPurifier_StringHashParserTest extends UnitTestCase
}
}
public function testParseMultiple() {
function testParseMultiple() {
$result = $this->parser->parseMultiFile(dirname(__FILE__) . '/StringHashParser/Multi.txt');
$this->assertIdentical(
$result,