Code Duplication    Length = 15-16 lines in 2 locations

tests/phpunit/tests/functions.php 2 locations

@@ 333-348 (lines=16) @@
330
	/**
331
	 * @ticket 21594
332
	 */
333
	function test_get_allowed_mime_types() {
334
		$mimes = get_allowed_mime_types();
335
336
		$this->assertInternalType( 'array', $mimes );
337
		$this->assertNotEmpty( $mimes );
338
339
		add_filter( 'upload_mimes', '__return_empty_array' );
340
		$mimes = get_allowed_mime_types();
341
		$this->assertInternalType( 'array', $mimes );
342
		$this->assertEmpty( $mimes );
343
344
		remove_filter( 'upload_mimes', '__return_empty_array' );
345
		$mimes = get_allowed_mime_types();
346
		$this->assertInternalType( 'array', $mimes );
347
		$this->assertNotEmpty( $mimes );
348
	}
349
350
	/**
351
	 * @ticket 21594
@@ 840-854 (lines=15) @@
837
	/**
838
	 * @ticket 35987
839
	 */
840
	public function test_wp_get_ext_types() {
841
		$extensions = wp_get_ext_types();
842
843
		$this->assertInternalType( 'array', $extensions );
844
		$this->assertNotEmpty( $extensions );
845
846
		add_filter( 'ext2type', '__return_empty_array' );
847
		$extensions = wp_get_ext_types();
848
		$this->assertSame( array(), $extensions );
849
850
		remove_filter( 'ext2type', '__return_empty_array' );
851
		$extensions = wp_get_ext_types();
852
		$this->assertInternalType( 'array', $extensions );
853
		$this->assertNotEmpty( $extensions );
854
	}
855
856
	/**
857
	 * @ticket 35987