WordPress.org

Make WordPress Core

Changeset 612 in tests


Ignore:
Timestamp:
04/05/2012 08:14:29 PM (6 years ago)
Author:
markjaquith
Message:

More reliable way of getting array members (no longer numerically indexed in WP). Fixes one failed test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_theme.php

    r591 r612  
    276276        $this->assertEquals( 'sandbox', $theme['Template'] );
    277277        $this->assertEquals( 'sandbox', $theme['Stylesheet'] );
    278         $this->assertEquals( $this->theme_root.'/sandbox/functions.php', $theme['Template Files'][0] );
    279         $this->assertEquals( $this->theme_root.'/sandbox/index.php', $theme['Template Files'][1] );
    280 
    281         $this->assertEquals( $this->theme_root.'/sandbox/style.css', $theme['Stylesheet Files'][0] );
     278        $this->assertEquals( $this->theme_root.'/sandbox/functions.php', reset($theme['Template Files']) );
     279        $this->assertEquals( $this->theme_root.'/sandbox/index.php', next($theme['Template Files']) );
     280
     281        $this->assertEquals( $this->theme_root.'/sandbox/style.css', reset($theme['Stylesheet Files']) );
    282282
    283283        $this->assertEquals( $this->theme_root.'/sandbox', $theme['Template Dir'] );
Note: See TracChangeset for help on using the changeset viewer.