Make WordPress Core

Changeset 333 in tests


Ignore:
Timestamp:
02/09/2011 02:13:03 PM (15 years ago)
Author:
duck_
Message:

Fix test_wp_enqueue_style. media='all' by default, #WP8000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_wp-styles.php

    r287 r333  
    22class TestWP_Styles extends WPTestCase {
    33    var $old_wp_styles;
    4    
     4
    55    function setUp() {
    66        parent::setUp();
     
    99        $GLOBALS['wp_styles'] = new WP_Styles();
    1010        $GLOBALS['wp_styles']->default_version = get_bloginfo( 'version' );
    11        
    1211    }
    13    
     12
    1413    function tearDown() {
    1514        $GLOBALS['wp_styles'] = $this->old_wp_styles;
     
    1716        parent::tearDown();
    1817    }
    19    
    20     // Test versioning
     18
     19    // Test versioning #11315
    2120    function test_wp_enqueue_style() {
    22         $this->knownWPBug(11315);
    23         wp_enqueue_style('no-deps-no-version', 'example.com', array());
    24         wp_enqueue_style('empty-deps-no-version', 'example.com' );
    25         wp_enqueue_style('empty-deps-version', 'example.com', array(), 1.2);
    26         wp_enqueue_style('empty-deps-null-version', 'example.com', array(), null);
     21        wp_enqueue_style('no-deps-no-version', 'example.com' );
     22        wp_enqueue_style('no-deps-version', 'example.com', array(), 1.2);
     23        wp_enqueue_style('no-deps-null-version', 'example.com', array(), null);
     24        wp_enqueue_style('no-deps-null-version-print-media', 'example.com', array(), null, 'print');
    2725        $ver = get_bloginfo( 'version' );
    28         $expected = "<link rel='stylesheet' id='no-deps-no-version-css'  href='http://example.com?ver=$ver' type='text/css' media='' />
    29 <link rel='stylesheet' id='empty-deps-no-version-css'  href='http://example.com?ver=$ver' type='text/css' media='' />
    30 <link rel='stylesheet' id='empty-deps-version-css'  href='http://example.com?ver=1.2' type='text/css' media='' />
    31 <link rel='stylesheet' id='empty-deps-null-version-css'  href='http://example.com' type='text/css' media='' />
     26        $expected = "<link rel='stylesheet' id='no-deps-no-version-css'  href='http://example.com?ver=$ver' type='text/css' media='all' />
     27<link rel='stylesheet' id='no-deps-version-css'  href='http://example.com?ver=1.2' type='text/css' media='all' />
     28<link rel='stylesheet' id='no-deps-null-version-css'  href='http://example.com' type='text/css' media='all' />
     29<link rel='stylesheet' id='no-deps-null-version-print-media-css'  href='http://example.com' type='text/css' media='print' />
    3230";
    3331        $this->assertEquals($expected, get_echo('wp_print_styles'));
Note: See TracChangeset for help on using the changeset viewer.