WordPress.org

Make WordPress Core

Changeset 970 in tests


Ignore:
Timestamp:
08/14/12 18:37:23 (2 years ago)
Author:
nacin
Message:

Basic tests for wp_get_theme()'s contents. see #WP21549.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/theme.php

    r909 r970  
    133133    } 
    134134 
     135    function test_wp_get_theme_contents() { 
     136        $theme = wp_get_theme( $this->theme_slug ); 
     137 
     138        $this->assertEquals( $this->theme_name, $theme->get( 'Name' ) ); 
     139        $this->assertNotEmpty( $theme->get( 'Description' ) ); 
     140        $this->assertNotEmpty( $theme->get( 'Author' ) ); 
     141        $this->assertNotEmpty( $theme->get( 'Version' ) ); 
     142        $this->assertNotEmpty( $theme->get( 'AuthorURI' ) ); 
     143        $this->assertNotEmpty( $theme->get( 'ThemeURI' ) ); 
     144        $this->assertEquals( $this->theme_slug, $theme->get_stylesheet() ); 
     145        $this->assertEquals( $this->theme_slug, $theme->get_template() ); 
     146 
     147        $this->assertEquals('publish', $theme->get( 'Status' ) ); 
     148 
     149        $this->assertEquals( WP_CONTENT_DIR . '/themes/' . $this->theme_slug, $theme->get_stylesheet_directory(), 'get_stylesheet_directory' ); 
     150        $this->assertEquals( WP_CONTENT_DIR . '/themes/' . $this->theme_slug, $theme->get_template_directory(), 'get_template_directory' ); 
     151        $this->assertEquals( content_url( 'themes/' . $this->theme_slug ), $theme->get_stylesheet_directory_uri(), 'get_stylesheet_directory_uri' ); 
     152        $this->assertEquals( content_url( 'themes/' . $this->theme_slug ), $theme->get_template_directory_uri(), 'get_template_directory_uri' ); 
     153    } 
     154 
    135155    /** 
    136156     * @ticket 20897 
Note: See TracChangeset for help on using the changeset viewer.