WordPress.org

Make WordPress Core

Changeset 871 in tests


Ignore:
Timestamp:
07/03/12 14:03:49 (22 months ago)
Author:
nacin
Message:

Fix failing verbose rewrite rule tests in test_query.php. see #96.

Most of these factory posts did not have an author assigned to them, which means an %author% permalink was broken. Switch to %category% for something more consistent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-testcase/test_query.php

    r865 r871  
    602602    // '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&page=$matches[5]', 
    603603    function test_post_paged_short() { 
    604         $this->factory->post->create( array( 
     604        $post_id = $this->factory->post->create( array( 
    605605            'post_date' => '2007-09-04 00:00:00', 
    606606            'post_title' => 'a-post-with-multiple-pages', 
    607607            'post_content' => 'Page 1 <!--nextpage--> Page 2' 
    608608        ) ); 
    609         $this->go_to('/2007/09/04/a-post-with-multiple-pages/2/'); 
     609        $this->go_to( get_permalink( $post_id ) . '2/' ); 
    610610        // should is_paged be true also? 
    611611        $this->assertQueryTrue('is_single', 'is_singular'); 
     
    638638        parent::setUp(); 
    639639        global $wp_rewrite; 
    640         update_option( 'permalink_structure', '/%author%/%year%/%postname%/' ); 
     640        update_option( 'permalink_structure', '/%category%/%year%/%postname%/' ); 
    641641        create_initial_taxonomies(); 
    642642        $GLOBALS['wp_rewrite']->init(); 
Note: See TracChangeset for help on using the changeset viewer.