mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 06:07:26 +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
@@ -3,7 +3,8 @@
|
||||
class HTMLPurifier_URIDefinitionTest extends HTMLPurifier_URIHarness
|
||||
{
|
||||
|
||||
protected function createFilterMock($expect = true, $result = true, $post = false, $setup = true) {
|
||||
protected function createFilterMock($expect = true, $result = true, $post = false, $setup = true)
|
||||
{
|
||||
static $i = 0;
|
||||
generate_mock_once('HTMLPurifier_URIFilter');
|
||||
$mock = new HTMLPurifier_URIFilterMock();
|
||||
@@ -16,7 +17,8 @@ class HTMLPurifier_URIDefinitionTest extends HTMLPurifier_URIHarness
|
||||
return $mock;
|
||||
}
|
||||
|
||||
function test_filter() {
|
||||
public function test_filter()
|
||||
{
|
||||
$def = new HTMLPurifier_URIDefinition();
|
||||
$def->addFilter($this->createFilterMock(), $this->config);
|
||||
$def->addFilter($this->createFilterMock(), $this->config);
|
||||
@@ -24,7 +26,8 @@ class HTMLPurifier_URIDefinitionTest extends HTMLPurifier_URIHarness
|
||||
$this->assertTrue($def->filter($uri, $this->config, $this->context));
|
||||
}
|
||||
|
||||
function test_filter_earlyAbortIfFail() {
|
||||
public function test_filter_earlyAbortIfFail()
|
||||
{
|
||||
$def = new HTMLPurifier_URIDefinition();
|
||||
$def->addFilter($this->createFilterMock(true, false), $this->config);
|
||||
$def->addFilter($this->createFilterMock(false), $this->config); // never called
|
||||
@@ -32,7 +35,8 @@ class HTMLPurifier_URIDefinitionTest extends HTMLPurifier_URIHarness
|
||||
$this->assertFalse($def->filter($uri, $this->config, $this->context));
|
||||
}
|
||||
|
||||
function test_setupMemberVariables_collisionPrecedenceIsHostBaseScheme() {
|
||||
public function test_setupMemberVariables_collisionPrecedenceIsHostBaseScheme()
|
||||
{
|
||||
$this->config->set('URI.Host', $host = 'example.com');
|
||||
$this->config->set('URI.Base', $base = 'http://sub.example.com/foo/bar.html');
|
||||
$this->config->set('URI.DefaultScheme', 'ftp');
|
||||
@@ -43,14 +47,16 @@ class HTMLPurifier_URIDefinitionTest extends HTMLPurifier_URIHarness
|
||||
$this->assertIdentical($def->defaultScheme, 'http'); // not ftp!
|
||||
}
|
||||
|
||||
function test_setupMemberVariables_onlyScheme() {
|
||||
public function test_setupMemberVariables_onlyScheme()
|
||||
{
|
||||
$this->config->set('URI.DefaultScheme', 'ftp');
|
||||
$def = new HTMLPurifier_URIDefinition();
|
||||
$def->setup($this->config);
|
||||
$this->assertIdentical($def->defaultScheme, 'ftp');
|
||||
}
|
||||
|
||||
function test_setupMemberVariables_onlyBase() {
|
||||
public function test_setupMemberVariables_onlyBase()
|
||||
{
|
||||
$this->config->set('URI.Base', 'http://sub.example.com/foo/bar.html');
|
||||
$def = new HTMLPurifier_URIDefinition();
|
||||
$def->setup($this->config);
|
||||
|
Reference in New Issue
Block a user