Changeset 65164
- Timestamp:
- 11/01/2026 05:26:55 PM (7 days ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions.php
r64745 r65164 1148 1148 /** 1149 1149 * @ticket 35987 1150 * @ticket 65819 1151 * @covers ::wp_ext2type 1150 1152 */ 1151 1153 public function test_wp_ext2type() { … … 1153 1155 1154 1156 $this->assertNotEmpty( $extensions ); 1157 1158 // Literal mappings stay independent of the current registry contents. 1159 $this->assertSame( 'image', wp_ext2type( 'jpg' ) ); 1160 $this->assertSame( 'image', wp_ext2type( 'PNG' ) ); 1161 $this->assertSame( 'audio', wp_ext2type( 'mp3' ) ); 1162 $this->assertSame( 'video', wp_ext2type( 'mp4' ) ); 1163 $this->assertSame( 'document', wp_ext2type( 'pdf' ) ); 1155 1164 1156 1165 foreach ( $extensions as $type => $extension_list ) { … … 2266 2275 /** 2267 2276 * @ticket 53668 2277 * @ticket 65819 2278 * @covers ::wp_get_default_extension_for_mime_type 2268 2279 */ 2269 2280 public function test_wp_get_default_extension_for_mime_type() { … … 2271 2282 $this->assertNotSame( 'jpeg', wp_get_default_extension_for_mime_type( 'image/jpeg' ), 'jpeg should not be returned as default extension for "image/jpeg"' ); 2272 2283 $this->assertSame( 'png', wp_get_default_extension_for_mime_type( 'image/png' ), 'png not returned as default extension for "image/png"' ); 2284 $this->assertSame( 'pdf', wp_get_default_extension_for_mime_type( 'application/pdf' ), 'pdf not returned as default extension for "application/pdf"' ); 2285 $this->assertSame( 'mp3', wp_get_default_extension_for_mime_type( 'audio/mpeg' ), 'mp3 not returned as default extension for "audio/mpeg"' ); 2273 2286 $this->assertFalse( wp_get_default_extension_for_mime_type( 'wibble/wobble' ), 'false not returned for unrecognized mime type' ); 2274 2287 $this->assertFalse( wp_get_default_extension_for_mime_type( '' ), 'false not returned when empty string as mime type supplied' );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)