Skip to content

Commit c1457fb

Browse files
test: add tests for redirect_canonical() protocol mid-path
1 parent 9ae4693 commit c1457fb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/phpunit/tests/canonical.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,13 @@ public function data_canonical() {
263263
array( '/2008%20', '/2008' ),
264264
array( '//2008////', '/2008/' ),
265265

266+
// Protocols mid-path.
267+
array( '/https://example.com', '/example.com' ),
268+
array( '/https://example.com/123/abc', '/example.com/123/abc' ),
269+
array( '/https://example.com/https://123123', '/example.com/123123' ),
270+
array( '/https://example.com/xyz//https:///abcd', '/example.com/xyz/abcd' ),
271+
array( '/http://', '/' ),
272+
266273
// @todo Endpoints (feeds, trackbacks, etc). More fuzzed mixed query variables, comment paging, Home page (static).
267274
);
268275
}

0 commit comments

Comments
 (0)