This information is from the code coverage report (see http://coverage.cwgordon.com/coverage).

We need to test:

1) Changing the site theme.
2) Full testing of hook_theme() possibilities.
3) list_themes(TRUE).
4) Patterned theme functions.
5) Theme settings (logo, favicon, etc)
6) Theming non-link links (such as freetagging previewed terms).
7) theme_submenu()
8) theme('table') with colgroups.
9) theme('table') without headers.
10) 'updated' node marks.
11) Recursive theme('item_list')'s.
12) theme('xml_icon')
13) theme('progress_bar')
14) Site slogans
15) Theming nodes without the taxonomy module enabled.

CommentFileSizeAuthor
#1 theme_inc_tests_01.patch6.08 KBcwgordon7
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cwgordon7’s picture

Status: Active » Needs review
FileSize
6.08 KB

Attached patch tests #1.

cwgordon7’s picture

Bump.

dropcube’s picture

Status: Needs review » Needs work

Does not seem very elegant to have core themes hard coded in an array, would be good to get the list of available themes dynamically. Also, this line of code is not so elegant:

    // Minnelli is the only core theme without a style.css file, so we use
    // minnelli.css as an indicator instead.
    $file = $theme == 'minnelli' ? 'minnelli.css' : 'style.css';

This makes test dependent of the theme internal, and should not be, at least this is my thought.

cwgordon7’s picture

Agreed, it would be cool to do some stuff with system_theme_data(). :)

dropcube’s picture

I am not sure if themes administration should be tested in theme.inc tests. I was working on #265541: Theme administration needs tests, implementing tests for themes administration.

I get frustrated because I didn't find an accurate way to detect the theme that were being used based on the request response (at least a way to make the tests independent of themes, which they should be).

#266220: Exposing metadata to tests may be a good approach to deal with this, making the testing system independent of the theme and the them layer. For example, the XML response may include a tag like this:

<simpletest>
...
 <theme name="garland">
   <files>
    ...
   </files>
   <settings>
    ...
    </settings>
 </theme>
...
</simpletest>
dropcube’s picture

I was also thinking about this #282540: Tests for themes. Core tests may provide tests for Drupal default themeable output, and let theme-specific tests to test theme-specific functionality at the theme layer level. Here we can provide base tests classes that can be extended by theme test cases. What do you think cwgordon7 ;) ?

catch’s picture

Component: tests » base system
Category: bug » task
Priority: Critical » Normal

Fixing the critical / pending bugs queues to reflect things which are really bugs or release critical.