WordPress.org

Make WordPress Core

Changeset 248 in tests


Ignore:
Timestamp:
10/15/2009 08:55:06 PM (9 years ago)
Author:
westi
Message:

Add some extra theme header testcases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_theme.php

    r126 r248  
    3434
    3535            // important attributes should all be set
     36            $default_headers = array(
     37                'Name' => 'Theme Name',
     38                'URI' => 'Theme URI',
     39                'Description' => 'Description',
     40                'Author' => 'Author',
     41                'AuthorURI' => 'Author URI',
     42                'Version' => 'Version',
     43                'Template' => 'Template',
     44                'Status' => 'Status',
     45                'Tags' => 'Tags'
     46                );
     47            foreach ($default_headers as $name => $value) {
     48                $this->assertTrue(isset($data[$name]));
     49            }
     50
     51            // important attributes should all not be empty as well
    3652            $this->assertTrue(!empty($theme['Description']));
    3753            $this->assertTrue(!empty($theme['Author']));
     
    3955            $this->assertTrue(!empty($theme['Template']));
    4056            $this->assertTrue(!empty($theme['Stylesheet']));
    41 
     57           
    4258            // template files should all exist
    4359            $this->assertTrue(is_array($theme['Template Files']));
Note: See TracChangeset for help on using the changeset viewer.