2011-11-09 22:44:12 +00:00
|
|
|
<?php
|
2014-07-18 19:35:43 +00:00
|
|
|
|
2011-11-09 22:44:12 +00:00
|
|
|
/**
|
2014-07-18 19:35:43 +00:00
|
|
|
* @group GlobalFunctions
|
2014-07-24 12:55:43 +00:00
|
|
|
* @covers ::wfRemoveDotSegments
|
2011-11-09 22:44:12 +00:00
|
|
|
*/
|
2019-07-13 20:50:28 +00:00
|
|
|
class WfRemoveDotSegmentsTest extends MediaWikiUnitTestCase {
|
2013-10-24 09:53:24 +00:00
|
|
|
/**
|
2022-05-16 02:14:33 +00:00
|
|
|
* Same tests as the UrlUtils method to ensure they don't fall out of sync
|
|
|
|
|
* @dataProvider UrlUtilsProviders::provideRemoveDotSegments
|
2013-10-24 09:53:24 +00:00
|
|
|
*/
|
2011-11-09 22:44:12 +00:00
|
|
|
public function testWfRemoveDotSegments( $inputPath, $outputPath ) {
|
2011-11-10 15:20:01 +00:00
|
|
|
$this->assertEquals(
|
|
|
|
|
$outputPath,
|
|
|
|
|
wfRemoveDotSegments( $inputPath ),
|
|
|
|
|
"Testing $inputPath expands to $outputPath"
|
|
|
|
|
);
|
2011-11-09 22:44:12 +00:00
|
|
|
}
|
|
|
|
|
}
|