Fix two minor bugs, updating Phorum and removing unused $dir variable.
[htmlpurifier/darkodev.git] / tests / HTMLPurifier / HTMLModule / ImageTest.php
blob30e36f1d16364c86cddd119f2918195e0f4adb36
1 <?php
3 class HTMLPurifier_HTMLModule_ImageTest extends HTMLPurifier_HTMLModuleHarness
7 function testNormal() {
8 $this->assertResult('<img height="40" width="40" src="" alt="" />');
11 function testLengthTooLarge() {
12 $this->assertResult(
13 '<img height="40000" width="40000" src="" alt="" />',
14 '<img height="1200" width="1200" src="" alt="" />'
18 function testLengthPercentage() {
19 $this->assertResult(
20 '<img height="100%" width="100%" src="" alt="" />',
21 '<img src="" alt="" />'
25 function testLengthCustomMax() {
26 $this->config->set('HTML.MaxImgLength', 20);
27 $this->assertResult(
28 '<img height="30" width="30" src="" alt="" />',
29 '<img height="20" width="20" src="" alt="" />'
33 function testLengthCrashFixDisabled() {
34 $this->config->set('HTML.MaxImgLength', null);
35 $this->assertResult(
36 '<img height="100%" width="100%" src="" alt="" />'
38 $this->assertResult(
39 '<img height="40000" width="40000" src="" alt="" />'
43 function testLengthTrusted() {
44 $this->config->set('HTML.Trusted', true);
45 $this->assertResult(
46 '<img height="100%" width="100%" src="" alt="" />'
48 $this->assertResult(
49 '<img height="40000" width="40000" src="" alt="" />'
55 // vim: et sw=4 sts=4