Docblock update
[htmlpurifier.git] / tests / HTMLPurifier / HTMLModule / SafeEmbedTest.php
blob6ee0de859879d81e6175e96a532103c1ec47df8f
1 <?php
3 class HTMLPurifier_HTMLModule_SafeEmbedTest extends HTMLPurifier_HTMLModuleHarness
6 public function setUp()
8 parent::setUp();
9 $def = $this->config->getHTMLDefinition(true);
10 $def->manager->addModule('SafeEmbed');
13 public function testMinimal()
15 $this->assertResult(
16 '<embed src="http://www.youtube.com/v/RVtEQxH7PWA&amp;hl=en" />',
17 '<embed src="http://www.youtube.com/v/RVtEQxH7PWA&amp;hl=en" allowscriptaccess="never" allownetworking="internal" type="application/x-shockwave-flash" />'
21 public function testYouTube()
23 $this->assertResult(
24 '<embed src="http://www.youtube.com/v/RVtEQxH7PWA&amp;hl=en" type="application/x-shockwave-flash" width="425" height="344"></embed>',
25 '<embed src="http://www.youtube.com/v/RVtEQxH7PWA&amp;hl=en" type="application/x-shockwave-flash" width="425" height="344" allowscriptaccess="never" allownetworking="internal" />'
29 public function testMalicious()
31 $this->assertResult(
32 '<embed src="http://example.com/bad.swf" type="application/x-shockwave-flash" width="9999999" height="3499994" allowscriptaccess="always" allownetworking="always" />',
33 '<embed src="http://example.com/bad.swf" type="application/x-shockwave-flash" width="1200" height="1200" allowscriptaccess="never" allownetworking="internal" />'
37 public function testFull()
39 $this->assertResult(
40 '<b><embed src="http://www.youtube.com/v/RVtEQxH7PWA&amp;hl=en" type="application/x-shockwave-flash" width="24" height="23" allowscriptaccess="never" allownetworking="internal" wmode="window" /></b>'
46 // vim: et sw=4 sts=4