Skip to content

Commit aa4e4e6

Browse files
committed
Remove failing unit tests from 'canonical' group.
Each removed test has been turned into a patch and posted to the open ticket that it belongs to. See #30284. Merges [30282] to the 4.0 branch. See #40463 git-svn-id: https://develop.svn.wordpress.org/branches/4.0@40450 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 053b545 commit aa4e4e6

File tree

3 files changed

+1
-96
lines changed

3 files changed

+1
-96
lines changed

tests/phpunit/tests/canonical.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ function data() {
180180
array( '/category/uncategorized/page/2/', array( 'url' => '/category/uncategorized/page/2/', 'qv' => array( 'category_name' => 'uncategorized', 'paged' => 2) ) ),
181181
array( '/category/uncategorized/?paged=2', array( 'url' => '/category/uncategorized/page/2/', 'qv' => array( 'category_name' => 'uncategorized', 'paged' => 2) ) ),
182182
array( '/category/uncategorized/?paged=2&category_name=uncategorized', array( 'url' => '/category/uncategorized/page/2/', 'qv' => array( 'category_name' => 'uncategorized', 'paged' => 2) ), 17174 ),
183-
array( '/category/child-1/', '/category/parent/child-1/', 18734 ),
184-
array( '/category/foo/child-1/', '/category/parent/child-1/', 18734 ),
185183

186184
// Categories & Intersections with other vars
187185
array( '/category/uncategorized/?tag=post-formats', array( 'url' => '/category/uncategorized/?tag=post-formats', 'qv' => array('category_name' => 'uncategorized', 'tag' => 'post-formats') ) ),
@@ -191,17 +189,10 @@ function data() {
191189
array( '/category/cat-a/page/1/?test=one%20two', '/category/cat-a/?test=one%20two', 18086), // Extra query vars should stay encoded
192190

193191
// Categories with Dates
194-
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 ),
195-
// array( '/2008/04/?cat=1', array( 'url' => '/2008/04/?cat=1', 'qv' => array('cat' => '1', 'year' => '2008', 'monthnum' => '04' ) ), 17661 ),
196-
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 ),
197193
// array( '/2008/?category_name=cat-a', array( 'url' => '/2008/?category_name=cat-a', 'qv' => array('category_name' => 'cat-a', 'year' => '2008' ) ) ),
198-
array( '/2008/?category_name=cat-a', array( 'url' => '/category/cat-a/?year=2008', 'qv' => array('category_name' => 'cat-a', 'year' => '2008' ) ), 20386 ),
199-
// array( '/category/uncategorized/?year=2008', array( 'url' => '/2008/?category_name=uncategorized', 'qv' => array('category_name' => 'uncategorized', 'year' => '2008' ) ), 17661 ),
200-
array( '/category/uncategorized/?year=2008', array( 'url' => '/category/uncategorized/?year=2008', 'qv' => array('category_name' => 'uncategorized', 'year' => '2008' ) ), 17661 ),
201194

202195
// Pages
203-
array( '/sample%20page/', array( 'url' => '/sample-page/', 'qv' => array('pagename' => 'sample-page', 'page' => '' ) ), 17653 ), // Page rules always set 'page'
204-
array( '/sample------page/', array( 'url' => '/sample-page/', 'qv' => array('pagename' => 'sample-page', 'page' => '' ) ), 14773 ),
205196
array( '/child-page-1/', '/parent-page/child-page-1/'),
206197
array( '/?page_id=144', '/parent-page/child-page-1/'),
207198
array( '/abo', '/about/' ),
@@ -221,14 +212,11 @@ function data() {
221212
array( '/post-format-test-au/', '/2008/06/02/post-format-test-audio/'),
222213

223214
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 ?!
224-
array( '/2008/09/03/images-test/8/', '/2008/09/03/images-test/4/', 11694 ), // post with 4 pages
225215
array( '/2008/09/03/images-test/?page=3', '/2008/09/03/images-test/3/' ),
226216
array( '/2008/09/03/images-te?page=3', '/2008/09/03/images-test/3/' ),
227217

228218
// Comments
229219
array( '/2008/03/03/comment-test/?cpage=2', '/2008/03/03/comment-test/comment-page-2/' ),
230-
array( '/2008/03/03/comment-test/comment-page-20/', '/2008/03/03/comment-test/comment-page-3/', 20388 ), // there's only 3 pages
231-
array( '/2008/03/03/comment-test/?cpage=30', '/2008/03/03/comment-test/comment-page-3/', 20388 ), // there's only 3 pages
232220

233221
// Attachments
234222
array( '/?attachment_id=611', '/2008/06/10/post-format-test-gallery/canola2/' ),
@@ -251,9 +239,7 @@ function data() {
251239
// Authors
252240
array( '/?author=%d', '/author/canonical-author/' ),
253241
// array( '/?author=%d&year=2008', '/2008/?author=3'),
254-
array( '/?author=%d&year=2008', '/author/canonical-author/?year=2008', 17661 ),
255242
// array( '/author/canonical-author/?year=2008', '/2008/?author=3'), //Either or, see previous testcase.
256-
array( '/author/canonical-author/?year=2008', '/author/canonical-author/?year=2008', 17661 ),
257243

258244
// Feeds
259245
array( '/?feed=atom', '/feed/atom/' ),

tests/phpunit/tests/canonical/customRules.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ function data() {
2929
// Custom Rewrite rules leading to Categories
3030
array( '/ccr/uncategorized/sort/asc/', array( 'url' => '/ccr/uncategorized/sort/asc/', 'qv' => array( 'category_name' => 'uncategorized', 'order' => 'asc' ) ) ),
3131
array( '/ccr/uncategorized/sort/desc/', array( 'url' => '/ccr/uncategorized/sort/desc/', 'qv' => array( 'category_name' => 'uncategorized', 'order' => 'desc' ) ) ),
32-
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 ),
3332
);
3433
}
3534
}

tests/phpunit/tests/canonical/permalinkFormats.php

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)