Make WordPress Core

Ticket #17661: 17661-tests.patch

File 17661-tests.patch, 3.4 KB (added by boonebgorges, 11 years ago)

Removing from trunk as per #30284

  • tests/phpunit/tests/canonical.php

    diff --git tests/phpunit/tests/canonical.php tests/phpunit/tests/canonical.php
    index 522bc33..7f18c37 100644
    class Tests_Canonical extends WP_Canonical_UnitTestCase { 
    7272                        array( '/category/cat-a/page/1/?test=one%20two', '/category/cat-a/?test=one%20two', 18086), // Extra query vars should stay encoded
    7373
    7474                        // Categories with Dates
    75                         array( '/2008/04/?cat=1', array( 'url' => '/2008/04/?cat=1', 'qv' => array('cat' => '1', 'year' => '2008', 'monthnum' => '04' ) ), 17661 ),
     75                        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 ),
     76//                      array( '/2008/04/?cat=1', array( 'url' => '/2008/04/?cat=1', 'qv' => array('cat' => '1', 'year' => '2008', 'monthnum' => '04' ) ), 17661 ),
     77                        array( '/2008/04/?cat=1', array( 'url' => '/category/uncategorized/?year=2008&monthnum=04', 'qv' => array('category_name' => 'uncategorized', 'year' => '2008', 'monthnum' => '04' ) ), 17661 ),
    7678//                      array( '/2008/?category_name=cat-a', array( 'url' => '/2008/?category_name=cat-a', 'qv' => array('category_name' => 'cat-a', 'year' => '2008' ) ) ),
    7779                        array( '/2008/?category_name=cat-a', array( 'url' => '/category/cat-a/?year=2008', 'qv' => array('category_name' => 'cat-a', 'year' => '2008' ) ), 20386 ),
     80//                      array( '/category/uncategorized/?year=2008', array( 'url' => '/2008/?category_name=uncategorized', 'qv' => array('category_name' => 'uncategorized', 'year' => '2008' ) ), 17661 ),
     81                        array( '/category/uncategorized/?year=2008', array( 'url' => '/category/uncategorized/?year=2008', 'qv' => array('category_name' => 'uncategorized', 'year' => '2008' ) ), 17661 ),
    7882
    7983                        // Pages
    8084                        array( '/sample%20page/', array( 'url' => '/sample-page/', 'qv' => array('pagename' => 'sample-page', 'page' => '' ) ), 17653 ), // Page rules always set 'page'
    class Tests_Canonical extends WP_Canonical_UnitTestCase { 
    128132                        // Authors
    129133                        array( '/?author=%d', '/author/canonical-author/' ),
    130134//                      array( '/?author=%d&year=2008', '/2008/?author=3'),
     135                        array( '/?author=%d&year=2008', '/author/canonical-author/?year=2008', 17661 ),
    131136//                      array( '/author/canonical-author/?year=2008', '/2008/?author=3'), //Either or, see previous testcase.
     137                        array( '/author/canonical-author/?year=2008', '/author/canonical-author/?year=2008', 17661 ),
    132138
    133139                        // Feeds
    134140                        array( '/?feed=atom', '/feed/atom/' ),
  • tests/phpunit/tests/canonical/customRules.php

    diff --git tests/phpunit/tests/canonical/customRules.php tests/phpunit/tests/canonical/customRules.php
    index 24a968f..2873e53 100644
    class Tests_Canonical_CustomRules extends WP_Canonical_UnitTestCase { 
    3535                        // Custom Rewrite rules leading to Categories
    3636                        array( '/ccr/uncategorized/sort/asc/', array( 'url' => '/ccr/uncategorized/sort/asc/', 'qv' => array( 'category_name' => 'uncategorized', 'order' => 'asc' ) ) ),
    3737                        array( '/ccr/uncategorized/sort/desc/', array( 'url' => '/ccr/uncategorized/sort/desc/', 'qv' => array( 'category_name' => 'uncategorized', 'order' => 'desc' ) ) ),
     38                        array( '/ccr/uncategorized/sort/desc/?year=2008', array( 'url' => '/ccr/uncategorized/sort/desc/?year=2008', 'qv' => array( 'category_name' => 'uncategorized', 'order' => 'desc', 'year' => '2008' ) ), 17661 ),
    3839                );
    3940        }
    4041}