1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-11 16:44:59 +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

@@ -3,7 +3,7 @@
class HTMLPurifier_URITest extends HTMLPurifier_URIHarness
{
function createURI($uri) {
protected function createURI($uri) {
$parser = new HTMLPurifier_URIParser();
return $parser->parse($uri);
}
@@ -16,7 +16,7 @@ class HTMLPurifier_URITest extends HTMLPurifier_URIHarness
protected $oldRegistry;
function &setUpSchemeRegistryMock() {
protected function &setUpSchemeRegistryMock() {
$this->oldRegistry = HTMLPurifier_URISchemeRegistry::instance();
generate_mock_once('HTMLPurifier_URIScheme');
generate_mock_once('HTMLPurifier_URISchemeRegistry');
@@ -26,19 +26,19 @@ class HTMLPurifier_URITest extends HTMLPurifier_URIHarness
return $registry;
}
function setUpSchemeMock($name) {
protected function setUpSchemeMock($name) {
$registry = $this->setUpSchemeRegistryMock();
$scheme_mock = new HTMLPurifier_URISchemeMock();
$registry->setReturnValue('getScheme', $scheme_mock, array($name, '*', '*'));
return $scheme_mock;
}
function setUpNoValidSchemes() {
protected function setUpNoValidSchemes() {
$registry = $this->setUpSchemeRegistryMock();
$registry->setReturnValue('getScheme', false, array('*', '*', '*'));
}
function tearDownSchemeRegistryMock() {
protected function tearDownSchemeRegistryMock() {
HTMLPurifier_URISchemeRegistry::instance($this->oldRegistry);
}
@@ -88,7 +88,7 @@ class HTMLPurifier_URITest extends HTMLPurifier_URIHarness
$this->tearDownSchemeRegistryMock();
}
function assertToString($expect_uri, $scheme, $userinfo, $host, $port, $path, $query, $fragment) {
protected function assertToString($expect_uri, $scheme, $userinfo, $host, $port, $path, $query, $fragment) {
$uri = new HTMLPurifier_URI($scheme, $userinfo, $host, $port, $path, $query, $fragment);
$string = $uri->toString();
$this->assertIdentical($string, $expect_uri);
@@ -136,7 +136,7 @@ class HTMLPurifier_URITest extends HTMLPurifier_URIHarness
);
}
function assertValidation($uri, $expect_uri = true) {
protected function assertValidation($uri, $expect_uri = true) {
if ($expect_uri === true) $expect_uri = $uri;
$uri = $this->createURI($uri);
$result = $uri->validate($this->config, $this->context);