3 class HTMLPurifier_HTMLModule_ImageTest
extends HTMLPurifier_HTMLModuleHarness
7 function testNormal() {
8 $this->assertResult('<img height="40" width="40" src="" alt="" />');
11 function testLengthTooLarge() {
13 '<img height="40000" width="40000" src="" alt="" />',
14 '<img height="1200" width="1200" src="" alt="" />'
18 function testLengthPercentage() {
20 '<img height="100%" width="100%" src="" alt="" />',
21 '<img src="" alt="" />'
25 function testLengthCustomMax() {
26 $this->config
->set('HTML.MaxImgLength', 20);
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);
36 '<img height="100%" width="100%" src="" alt="" />'
39 '<img height="40000" width="40000" src="" alt="" />'
43 function testLengthTrusted() {
44 $this->config
->set('HTML.Trusted', true);
46 '<img height="100%" width="100%" src="" alt="" />'
49 '<img height="40000" width="40000" src="" alt="" />'