WordPress.org

Make WordPress Core

Changeset 259 in tests


Ignore:
Timestamp:
11/13/2009 07:17:19 PM (9 years ago)
Author:
westi
Message:

test association of page templates within a sub dir with a theme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_theme.php

    r257 r259  
    306306            'My Theme/theme1', // duplicate theme should be given a unique name
    307307            'My Subdir Theme',// theme in a subdirectory should work
     308            'Page Template Theme', // theme with page templates for other test code
    308309        );
    309310       
     
    321322        $this->assertEquals($expected, $wp_broken_themes);
    322323    }
     324   
     325    function test_page_templates() {
     326        $themes = get_themes();
     327
     328        $theme = $themes['Page Template Theme'];
     329        $this->assertFalse( empty($theme) );
     330       
     331        $templates = $theme['Template Files'];
     332        $this->assertTrue( in_array( $this->theme_root . '/page-templates/template-top-level.php', $templates));
     333        $this->assertTrue( in_array( $this->theme_root . '/page-templates/subdir/template-sub-dir.php', $templates));
     334    }
    323335}
    324336
Note: See TracChangeset for help on using the changeset viewer.