Make WordPress Core


Ignore:
Timestamp:
09/11/2013 06:39:09 PM (11 years ago)
Author:
wonderboymusic
Message:

Update the unit test methods in Tests_Admin_includesTheme. Use wp_get_theme() instead of get_theme().

See #25282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesTheme.php

    r25254 r25355  
    4141     */
    4242    function test_page_templates() {
    43         $theme = get_theme('Page Template Theme');
    44         $this->assertFalse( empty($theme) );
     43        $theme = wp_get_theme( 'page-templates' );
     44        $this->assertNotEmpty( $theme );
    4545
    46         switch_theme($theme['Template'], $theme['Stylesheet']);
     46        switch_theme( $theme['Template'], $theme['Stylesheet'] );
    4747
    4848        $templates = get_page_templates();
    49         $this->assertEquals(3, count($templates));
    50         $this->assertEquals("template-top-level.php", $templates['Top Level']);
    51         $this->assertEquals("subdir/template-sub-dir.php", $templates['Sub Dir']);
    52         $this->assertEquals("template-header.php", $templates['This Template Header Is On One Line']);
     49        $this->assertCount( 3, $templates );
     50        $this->assertEquals( "template-top-level.php", $templates['Top Level'] );
     51        $this->assertEquals( "subdir/template-sub-dir.php", $templates['Sub Dir'] );
     52        $this->assertEquals( "template-header.php", $templates['This Template Header Is On One Line'] );
    5353    }
    5454}
Note: See TracChangeset for help on using the changeset viewer.