Index: tests/phpunit/tests/functions.php
===================================================================
--- tests/phpunit/tests/functions.php	(revisão 36692)
+++ tests/phpunit/tests/functions.php	(cópia de trabalho)
@@ -717,4 +717,42 @@
 		the_date( 'Y', 'before ', ' after', false );
 		$this->assertEquals( '', ob_get_clean() );
 	}
+
+	/**
+	 * @ticket 35987
+	 */
+	function test_wp_get_ext_types() {
+		$extensionList = wp_get_ext_types();
+
+		$this->assertInternalType( 'array', $extensionList);
+		$this->assertNotEmpty($extensionList);
+
+		add_filter( 'ext_types', '__return_empty_array' );
+		$mimes = wp_get_ext_types();
+		$this->assertInternalType( 'array', $mimes );
+		$this->assertEmpty( $mimes );
+
+		remove_filter( 'ext_types', '__return_empty_array' );
+		$mimes = wp_get_ext_types();
+		$this->assertInternalType( 'array', $mimes );
+		$this->assertNotEmpty( $mimes );
+
+		$this->assertTrue(in_array('jpg', $extensionList['image']));
+		$this->assertTrue(in_array('php', $extensionList['code']));
+		$this->assertTrue(in_array('xls', $extensionList['spreadsheet']));
+	}
+
+	/**
+	 * @ticket 35987
+	 */
+	function test_wp_ext2type() {
+		$extensions = wp_get_ext_types();
+
+		foreach ($extensions as $type => $extension) {
+			#Using just the first extension in array file for testing to don't decrease the test performance
+			$this->assertEquals($type, wp_ext2type($extension[0]));
+			$this->assertEquals($type, wp_ext2type(strtoupper($extension[0])));
+		}
+		$this->assertNull(wp_ext2type('unknown_format'));
+	}
 }
