boo
foo.

'; $filter = new Html($html, 'http://www.google.ca/'); $this->assertEquals('

boo
foo.

', $filter->execute()); } public function testIframe() { $data = ''; $f = new Html($data, 'http://blabla'); $this->assertEmpty($f->execute()); $data = ''; $expected = ''; $f = new Html($data, 'http://blabla'); $this->assertEquals($expected, $f->execute()); } public function testEmptyTags() { $data = << EOD; $f = new Html($data, 'http://blabla'); $output = $f->execute(); $this->assertEquals('', $output); } public function testBadAttributes() { $data = ''; $f = new Html($data, 'http://blabla'); $this->assertEquals('', $f->execute()); } public function testRelativeScheme() { $f = new Html('link', 'http://blabla'); $this->assertEquals('link', $f->execute()); } public function testAttributes() { $f = new Html('\'quote', 'http://blabla'); $this->assertEquals(''quote', $f->execute()); $f = new Html('', 'http://blabla'); $this->assertEquals('', $f->execute()); $f = new Html("", 'http://blabla'); $this->assertEquals('', $f->execute()); } public function testCode() { $data = '
HEAD / HTTP/1.1
Accept: text/html
Accept-Encoding: gzip, deflate, compress
Host: www.amazon.com
User-Agent: HTTPie/0.6.0



HTTP/1.1 405 MethodNotAllowed
Content-Encoding: gzip
Content-Type: text/html; charset=ISO-8859-1
Date: Mon, 15 Jul 2013 02:05:59 GMT
Server: Server
Set-Cookie: skin=noskin; path=/; domain=.amazon.com; expires=Mon, 15-Jul-2013 02:05:59 GMT
Vary: Accept-Encoding,User-Agent
allow: POST, GET
x-amz-id-1: 11WD3K15FC268R5GBJY5
x-amz-id-2: DDjqfqz2ZJufzqRAcj1mh+9XvSogrPohKHwXlo8IlkzH67G6w4wnjn9HYgbs4uI0
'; $f = new Html($data, 'http://blabla'); $this->assertEquals($data, $f->execute()); } public function testRemoveNoBreakingSpace() { $f = new Html('

  truc

', 'http://blabla'); $this->assertEquals('

truc

', $f->execute()); } public function testRemoveEmptyTags() { $f = new Html('

toto


', 'http://blabla'); $this->assertEquals('

toto


', $f->execute()); $f = new Html('

', 'http://blabla'); $this->assertEquals('', $f->execute()); $f = new Html('

 

', 'http://blabla'); $this->assertEquals('', $f->execute()); } public function testRemoveEmptyTable() { $f = new Html('
', 'http://blabla'); $this->assertEquals('', $f->execute()); $f = new Html('
', 'http://blabla'); $this->assertEquals('', $f->execute()); } /* public function testFilter() { $input = <<
Flaque de pluie
La Saussaye, France, 6 août 2014

Spring had truly arrived. Countless streams suddenly materialized all over the roads, fields, grasslands, and thickets; flowing as if the melting snow's waters were spilling over.

Takiji Kobayashi, Yasuko.

La pluie abonde. La forêt humide resplendit. L'eau monte, l'eau déborde. Il reste pourtant notre humanité. Toute entière, resplendissante.

EOD; $expected = << Flaque de pluie
La Saussaye, France, 6 août 2014

Spring had truly arrived. Countless streams suddenly materialized all over the roads, fields, grasslands, and thickets; flowing as if the melting snow's waters were spilling over.

Takiji Kobayashi, Yasuko.

La pluie abonde. La forêt humide resplendit. L'eau monte, l'eau déborde. Il reste pourtant notre humanité. Toute entière, resplendissante.

EOD; $f = new Html($input, 'http://www.la-grange.net/'); $this->assertEquals($expected, $f->execute()); }*/ }