3 class HTMLPurifier_HTMLModule_ImageTest
extends HTMLPurifier_HTMLModuleHarness
7 public function testNormal()
9 $this->assertResult('<img height="40" width="40" src="" alt="" />');
12 public function testLengthTooLarge()
15 '<img height="40000" width="40000" src="" alt="" />',
16 '<img height="1200" width="1200" src="" alt="" />'
20 public function testLengthPercentage()
23 '<img height="100%" width="100%" src="" alt="" />',
24 '<img src="" alt="" />'
28 public function testLengthCustomMax()
30 $this->config
->set('HTML.MaxImgLength', 20);
32 '<img height="30" width="30" src="" alt="" />',
33 '<img height="20" width="20" src="" alt="" />'
37 public function testLengthCrashFixDisabled()
39 $this->config
->set('HTML.MaxImgLength', null);
41 '<img height="100%" width="100%" src="" alt="" />'
44 '<img height="40000" width="40000" src="" alt="" />'
48 public function testLengthTrusted()
50 $this->config
->set('HTML.Trusted', true);
52 '<img height="100%" width="100%" src="" alt="" />'
55 '<img height="40000" width="40000" src="" alt="" />'