1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-10-18 07:26:13 +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:
Marcus Bointon
2013-07-16 13:56:14 +02:00
committed by Edward Z. Yang
parent 19eee14899
commit fac747bdbd
433 changed files with 13302 additions and 6690 deletions

View File

@@ -3,12 +3,14 @@
class HTMLPurifier_AttrTransform_ImgRequiredTest extends HTMLPurifier_AttrTransformHarness
{
function setUp() {
public function setUp()
{
parent::setUp();
$this->obj = new HTMLPurifier_AttrTransform_ImgRequired();
}
function testAddMissingAttr() {
public function testAddMissingAttr()
{
$this->config->set('Core.RemoveInvalidImg', false);
$this->assertResult(
array(),
@@ -16,7 +18,8 @@ class HTMLPurifier_AttrTransform_ImgRequiredTest extends HTMLPurifier_AttrTransf
);
}
function testAlternateDefaults() {
public function testAlternateDefaults()
{
$this->config->set('Attr.DefaultInvalidImage', 'blank.png');
$this->config->set('Attr.DefaultInvalidImageAlt', 'Pawned!');
$this->config->set('Attr.DefaultImageAlt', 'not pawned');
@@ -27,14 +30,16 @@ class HTMLPurifier_AttrTransform_ImgRequiredTest extends HTMLPurifier_AttrTransf
);
}
function testGenerateAlt() {
public function testGenerateAlt()
{
$this->assertResult(
array('src' => '/path/to/foobar.png'),
array('src' => '/path/to/foobar.png', 'alt' => 'foobar.png')
);
}
function testAddDefaultSrc() {
public function testAddDefaultSrc()
{
$this->config->set('Core.RemoveInvalidImg', false);
$this->assertResult(
array('alt' => 'intrigue'),
@@ -42,7 +47,8 @@ class HTMLPurifier_AttrTransform_ImgRequiredTest extends HTMLPurifier_AttrTransf
);
}
function testAddDefaultAlt() {
public function testAddDefaultAlt()
{
$this->config->set('Attr.DefaultImageAlt', 'default');
$this->assertResult(
array('src' => ''),