Make WordPress Core

Changeset 372 in tests


Ignore:
Timestamp:
06/20/2011 08:04:18 PM (15 years ago)
Author:
ryan
Message:

sanitize_mime_type() tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_formatting.php

    r366 r372  
    636636}
    637637
     638class TestSanitizeMimeType extends WPTestCase {
     639        // 17855
     640        function test_sanitize_valid_mime_type() {
     641                $inputs = array(
     642                        'application/atom+xml',
     643                        'application/EDI-X12',
     644                        'application/EDIFACT',
     645                        'application/json',
     646                        'application/javascript',
     647                        'application/octet-stream',
     648                        'application/ogg',
     649                        'application/pdf',
     650                        'application/postscript',
     651                        'application/soap+xml',
     652                        'application/x-woff',
     653                        'application/xhtml+xml',
     654                        'application/xml-dtd',
     655                        'application/xop+xml',
     656                        'application/zip',
     657                        'application/x-gzip',
     658                        'audio/basic',
     659                        'image/jpeg',
     660                        'text/css',
     661                        'text/html',
     662                        'text/plain',
     663                        'video/mpeg',
     664                );
     665       
     666                foreach ( $inputs as $input ) {
     667                        $this->assertEquals($input, sanitize_mime_type($input));
     668                }
     669        }
     670}
     671
    638672?>
Note: See TracChangeset for help on using the changeset viewer.