public function test_get_scripts__empty()
 {
     $source = '<video width="300" height="300" src="https://archive.org/download/WebmVp8Vorbis/webmvp8_512kb.mp4"></video>';
     $expected = array();
     $dom = AMP_DOM_Utils::get_dom_from_content($source);
     $sanitizer = new AMP_Video_Sanitizer($dom);
     $sanitizer->sanitize();
     $scripts = $sanitizer->get_scripts();
     $this->assertEquals($expected, $scripts);
 }
Exemplo n.º 2
0
 public function test_get_scripts__empty()
 {
     $source = '<video width="300" height="300" src="https://example.com/video.mp4"></video>';
     $expected = array();
     $dom = AMP_DOM_Utils::get_dom_from_content($source);
     $sanitizer = new AMP_Video_Sanitizer($dom);
     $sanitizer->sanitize();
     $scripts = $sanitizer->get_scripts();
     $this->assertEquals($expected, $scripts);
 }