4 * @group GlobalFunctions
5 * @covers ::wfRemoveDotSegments
7 class WfRemoveDotSegmentsTest
extends MediaWikiTestCase
{
9 * @dataProvider providePaths
11 public function testWfRemoveDotSegments( $inputPath, $outputPath ) {
14 wfRemoveDotSegments( $inputPath ),
15 "Testing $inputPath expands to $outputPath"
20 * Provider of URL paths for testing wfRemoveDotSegments()
24 public static function providePaths() {
26 [ '/a/b/c/./../../g', '/a/g' ],
27 [ 'mid/content=5/../6', 'mid/6' ],
28 [ '/a//../b', '/a/b' ],
29 [ '/.../a', '/.../a' ],
67 [ 'b/../../a', '/a' ],
79 [ '/b/../../a', '/a' ],
80 [ '/b/.././a', '/a' ],
81 [ '/b/./../a', '/a' ],
82 [ '/b/././a', '/b/a' ],