Code Duplication    Length = 13-13 lines in 2 locations

projects/plugins/jetpack/tests/php/general/test_class.jetpack.php 2 locations

@@ 582-594 (lines=13) @@
579
		update_option( 'siteurl', $original_siteurl );
580
	}
581
582
	function test_normalize_url_protocol_agnostic_strips_protocol_and_www_for_subdir_subdomain() {
583
		$url = 'https://www.subdomain.myfaketestsite.com/what';
584
		$url_normalized = Jetpack::normalize_url_protocol_agnostic( $url );
585
		$this->assertTrue( 'subdomain.myfaketestsite.com/what/' === $url_normalized );
586
587
		$url = 'http://subdomain.myfaketestsite.com';
588
		$url_normalized = Jetpack::normalize_url_protocol_agnostic( $url );
589
		$this->assertTrue( 'subdomain.myfaketestsite.com/' === $url_normalized );
590
591
		$url = 'www.subdomain.myfaketestsite.com';
592
		$url_normalized = Jetpack::normalize_url_protocol_agnostic( $url );
593
		$this->assertTrue( 'subdomain.myfaketestsite.com/' === $url_normalized );
594
	}
595
596
	function test_normalize_url_protocol_agnostic_strips_protocol_and_www_for_normal_urls() {
597
		$url = 'https://www.myfaketestsite.com';
@@ 596-608 (lines=13) @@
593
		$this->assertTrue( 'subdomain.myfaketestsite.com/' === $url_normalized );
594
	}
595
596
	function test_normalize_url_protocol_agnostic_strips_protocol_and_www_for_normal_urls() {
597
		$url = 'https://www.myfaketestsite.com';
598
		$url_normalized = Jetpack::normalize_url_protocol_agnostic( $url );
599
		$this->assertTrue( 'myfaketestsite.com/' === $url_normalized );
600
601
		$url = 'www.myfaketestsite.com';
602
		$url_normalized = Jetpack::normalize_url_protocol_agnostic( $url );
603
		$this->assertTrue( 'myfaketestsite.com/' === $url_normalized );
604
605
		$url = 'myfaketestsite.com';
606
		$url_normalized = Jetpack::normalize_url_protocol_agnostic( $url );
607
		$this->assertTrue( 'myfaketestsite.com/' === $url_normalized );
608
	}
609
610
	function test_normalize_url_protocol_agnostic_strips_protocol_for_ip() {
611
		$url = 'http://123.456.789.0';