Make WordPress Core


Ignore:
Timestamp:
02/21/2020 01:05:39 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Fix the Travis CI build for the 3.8 branch.

Among other fixes, this backports [26871], [26909-26910], [26940], [27086], [27168], [28799], [28873], [28943], [28961], [28964], [28966-28967], [29120], [29251], [29503], [29860], [29869], [29954], [30001], [30160], [30282], [30285], [30289-30291], [30513-30514], [30516-30521], [30524], [30526], [30529-30530], [31253-31254], [31257-31259], [31622], [40241], [40255], [40257], [40259], [40269], [40271], [40446], [40449], [40457], [40604], [40538], [40833], [41082], [41303], [41306], [44993].

See #49485.

Location:
branches/3.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.8

  • branches/3.8/tests/phpunit/tests/canonical.php

    r32150 r47338  
    2020
    2121    function setUp() {
     22        global $wp_rewrite;
     23
    2224        parent::setUp();
    2325
     
    2628        update_option( 'posts_per_page', 5 );
    2729
    28         update_option( 'permalink_structure', $this->structure );
     30        $wp_rewrite->init();
     31        $wp_rewrite->set_permalink_structure( $this->structure );
     32
    2933        create_initial_taxonomies();
    30         $GLOBALS['wp_rewrite']->init();
    31         flush_rewrite_rules();
     34
     35        $wp_rewrite->flush_rules();
    3236
    3337        $this->old_current_user = get_current_user_id();
     
    8185
    8286    function tearDown() {
     87        global $wp_rewrite;
    8388        wp_set_current_user( $this->old_current_user );
    8489
    85         $GLOBALS['wp_rewrite']->init();
     90        $wp_rewrite->init();
    8691        parent::tearDown();
    8792    }
     
    176181            array( '/category/uncategorized/?paged=2', array( 'url' => '/category/uncategorized/page/2/', 'qv' => array( 'category_name' => 'uncategorized', 'paged' => 2) ) ),
    177182            array( '/category/uncategorized/?paged=2&category_name=uncategorized', array( 'url' => '/category/uncategorized/page/2/', 'qv' => array( 'category_name' => 'uncategorized', 'paged' => 2) ), 17174 ),
    178             array( '/category/child-1/', '/category/parent/child-1/', 18734 ),
    179             array( '/category/foo/child-1/', '/category/parent/child-1/', 18734 ),
    180183
    181184            // Categories & Intersections with other vars
     
    187190
    188191            // Categories with Dates
    189             array( '/category/uncategorized/?paged=2&year=2008', array( 'url' => '/category/uncategorized/page/2/?year=2008', 'qv' => array( 'category_name' => 'uncategorized', 'paged' => 2, 'year' => 2008) ), 17661 ),
    190 //          array( '/2008/04/?cat=1', array( 'url' => '/2008/04/?cat=1', 'qv' => array('cat' => '1', 'year' => '2008', 'monthnum' => '04' ) ), 17661 ),
    191             array( '/2008/04/?cat=1', array( 'url' => '/category/uncategorized/?year=2008&monthnum=04', 'qv' => array('category_name' => 'uncategorized', 'year' => '2008', 'monthnum' => '04' ) ), 17661 ),
     192            array( '/2008/04/?cat=1', array( 'url' => '/2008/04/?cat=1', 'qv' => array('cat' => '1', 'year' => '2008', 'monthnum' => '04' ) ), 17661 ),
    192193//          array( '/2008/?category_name=cat-a', array( 'url' => '/2008/?category_name=cat-a', 'qv' => array('category_name' => 'cat-a', 'year' => '2008' ) ) ),
    193             array( '/2008/?category_name=cat-a', array( 'url' => '/category/cat-a/?year=2008', 'qv' => array('category_name' => 'cat-a', 'year' => '2008' ) ), 20386 ),
    194 //          array( '/category/uncategorized/?year=2008', array( 'url' => '/2008/?category_name=uncategorized', 'qv' => array('category_name' => 'uncategorized', 'year' => '2008' ) ), 17661 ),
    195             array( '/category/uncategorized/?year=2008', array( 'url' => '/category/uncategorized/?year=2008', 'qv' => array('category_name' => 'uncategorized', 'year' => '2008' ) ), 17661 ),
    196194
    197195            // Pages
    198             array( '/sample%20page/', array( 'url' => '/sample-page/', 'qv' => array('pagename' => 'sample-page', 'page' => '' ) ), 17653 ), // Page rules always set 'page'
    199             array( '/sample------page/', array( 'url' => '/sample-page/', 'qv' => array('pagename' => 'sample-page', 'page' => '' ) ), 14773 ),
    200196            array( '/child-page-1/', '/parent-page/child-page-1/'),
    201197            array( '/?page_id=144', '/parent-page/child-page-1/'),
     
    217213
    218214            array( '/2008/09/03/images-test/3/', array( 'url' => '/2008/09/03/images-test/3/', 'qv' => array( 'name' => 'images-test', 'year' => '2008', 'monthnum' => '09', 'day' => '03', 'page' => '/3' ) ) ), // page = /3 ?!
    219             array( '/2008/09/03/images-test/8/', '/2008/09/03/images-test/4/', 11694 ), // post with 4 pages
    220215            array( '/2008/09/03/images-test/?page=3', '/2008/09/03/images-test/3/' ),
    221216            array( '/2008/09/03/images-te?page=3', '/2008/09/03/images-test/3/' ),
     
    223218            // Comments
    224219            array( '/2008/03/03/comment-test/?cpage=2', '/2008/03/03/comment-test/comment-page-2/' ),
    225             array( '/2008/03/03/comment-test/comment-page-20/', '/2008/03/03/comment-test/comment-page-3/', 20388 ), // there's only 3 pages
    226             array( '/2008/03/03/comment-test/?cpage=30', '/2008/03/03/comment-test/comment-page-3/', 20388 ), // there's only 3 pages
    227220
    228221            // Attachments
     
    247240            array( '/?author=%d', '/author/canonical-author/' ),
    248241//          array( '/?author=%d&year=2008', '/2008/?author=3'),
    249             array( '/?author=%d&year=2008', '/author/canonical-author/?year=2008', 17661 ),
    250242//          array( '/author/canonical-author/?year=2008', '/2008/?author=3'), //Either or, see previous testcase.
    251             array( '/author/canonical-author/?year=2008', '/author/canonical-author/?year=2008', 17661 ),
    252243
    253244            // Feeds
Note: See TracChangeset for help on using the changeset viewer.