MediaWiki  1.23.2
wfRemoveDotSegmentsTest.php
Go to the documentation of this file.
1 <?php
9  public function testWfRemoveDotSegments( $inputPath, $outputPath ) {
10  $this->assertEquals(
11  $outputPath,
12  wfRemoveDotSegments( $inputPath ),
13  "Testing $inputPath expands to $outputPath"
14  );
15  }
16 
22  public static function providePaths() {
23  return array(
24  array( '/a/b/c/./../../g', '/a/g' ),
25  array( 'mid/content=5/../6', 'mid/6' ),
26  array( '/a//../b', '/a/b' ),
27  array( '/.../a', '/.../a' ),
28  array( '.../a', '.../a' ),
29  array( '', '' ),
30  array( '/', '/' ),
31  array( '//', '//' ),
32  array( '.', '' ),
33  array( '..', '' ),
34  array( '...', '...' ),
35  array( '/.', '/' ),
36  array( '/..', '/' ),
37  array( './', '' ),
38  array( '../', '' ),
39  array( './a', 'a' ),
40  array( '../a', 'a' ),
41  array( '../../a', 'a' ),
42  array( '.././a', 'a' ),
43  array( './../a', 'a' ),
44  array( '././a', 'a' ),
45  array( '../../', '' ),
46  array( '.././', '' ),
47  array( './../', '' ),
48  array( '././', '' ),
49  array( '../..', '' ),
50  array( '../.', '' ),
51  array( './..', '' ),
52  array( './.', '' ),
53  array( '/../../a', '/a' ),
54  array( '/.././a', '/a' ),
55  array( '/./../a', '/a' ),
56  array( '/././a', '/a' ),
57  array( '/../../', '/' ),
58  array( '/.././', '/' ),
59  array( '/./../', '/' ),
60  array( '/././', '/' ),
61  array( '/../..', '/' ),
62  array( '/../.', '/' ),
63  array( '/./..', '/' ),
64  array( '/./.', '/' ),
65  array( 'b/../../a', '/a' ),
66  array( 'b/.././a', '/a' ),
67  array( 'b/./../a', '/a' ),
68  array( 'b/././a', 'b/a' ),
69  array( 'b/../../', '/' ),
70  array( 'b/.././', '/' ),
71  array( 'b/./../', '/' ),
72  array( 'b/././', 'b/' ),
73  array( 'b/../..', '/' ),
74  array( 'b/../.', '/' ),
75  array( 'b/./..', '/' ),
76  array( 'b/./.', 'b/' ),
77  array( '/b/../../a', '/a' ),
78  array( '/b/.././a', '/a' ),
79  array( '/b/./../a', '/a' ),
80  array( '/b/././a', '/b/a' ),
81  array( '/b/../../', '/' ),
82  array( '/b/.././', '/' ),
83  array( '/b/./../', '/' ),
84  array( '/b/././', '/b/' ),
85  array( '/b/../..', '/' ),
86  array( '/b/../.', '/' ),
87  array( '/b/./..', '/' ),
88  array( '/b/./.', '/b/' ),
89  );
90  }
91 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
WfRemoveDotSegmentsTest
@covers wfRemoveDotSegments
Definition: wfRemoveDotSegmentsTest.php:5
wfRemoveDotSegments
wfRemoveDotSegments( $urlPath)
Remove all dot-segments in the provided URL path.
Definition: GlobalFunctions.php:617
WfRemoveDotSegmentsTest\testWfRemoveDotSegments
testWfRemoveDotSegments( $inputPath, $outputPath)
@dataProvider providePaths
Definition: wfRemoveDotSegmentsTest.php:9
MediaWikiTestCase
Definition: MediaWikiTestCase.php:6
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
WfRemoveDotSegmentsTest\providePaths
static providePaths()
Provider of URL paths for testing wfRemoveDotSegments()
Definition: wfRemoveDotSegmentsTest.php:22