first commit
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
class HTMLPurifier_AttrTransform_ImgSpaceTest extends HTMLPurifier_AttrTransformHarness
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
function setUp() {
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$this->obj = new HTMLPurifier_AttrTransform_ImgSpace('vspace');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function testEmptyInput() {
|
||||
|
||||
$this->assertResult( array() );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function testVerticalBasicUsage() {
|
||||
|
||||
$this->assertResult(
|
||||
|
||||
array('vspace' => '1'),
|
||||
|
||||
array('style' => 'margin-top:1px;margin-bottom:1px;')
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function testLenientHandlingOfInvalidInput() {
|
||||
|
||||
$this->assertResult(
|
||||
|
||||
array('vspace' => '10%'),
|
||||
|
||||
array('style' => 'margin-top:10%px;margin-bottom:10%px;')
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user