Code Duplication    Length = 10-11 lines in 2 locations

tests/YouTubeShortCodeHandlerTest.php 2 locations

@@ 20-30 (lines=11) @@
17
		$this->assertContains($expected, $html);
18
	}
19
20
	public function testVideoWithCaption() {
21
		$page = $this->objFromFixture('Page', 'VideoWithCaption');
22
		$html = ShortcodeParser::get_active()->parse($page->Content);
23
		$this->assertContains('<div class="YouTube">', $html);
24
		$expected = '<iframe width="560" height="315" src="https://www.youtube'
25
				  . '.com/embed/5XQwWATPReA" frameborder="0" allowfullscreen=""'
26
				  . '></iframe>';
27
		$this->assertContains('<p>This is a caption</p>', $html);
28
29
		$this->assertContains($expected, $html);
30
	}
31
32
	public function testVideoWithWidth() {
33
		$page = $this->objFromFixture('Page', 'VideoWithWidth');
@@ 52-61 (lines=10) @@
49
		$this->assertContains($expected, $html);
50
	}
51
52
	public function testVideoWithAll() {
53
		$page = $this->objFromFixture('Page', 'VideoWithAll');
54
		$html = ShortcodeParser::get_active()->parse($page->Content);
55
		$this->assertContains('<div class="YouTube">', $html);
56
		$expected = '<iframe width="314" height="418" src="https://www.youtube'
57
				  . '.com/embed/5XQwWATPReA" frameborder="0" allowfullscreen=""'
58
				  . '></iframe>';
59
		$this->assertContains($expected, $html);
60
		$this->assertContains('<p>This is a caption</p>', $html);
61
	}
62
63
	public function testVideoWithNoID() {
64
		$page = $this->objFromFixture('Page', 'VideoWithNoID');