phpunit --filter UrlUtilsTest would execute no tests because the class was already loaded by the GlobalFunctions data providers via the autoloader, so PHPUnit sees no additional classes when it examines UrlUtilsTest.php. So, split out all providers in UrlUtilsTest to a separate class which can be safely autoloaded. Change-Id: I483736ee70e598cdb19f8203bc6885f1c234fc42
19 lines
488 B
PHP
19 lines
488 B
PHP
<?php
|
|
|
|
/**
|
|
* @group GlobalFunctions
|
|
* @covers ::wfRemoveDotSegments
|
|
*/
|
|
class WfRemoveDotSegmentsTest extends MediaWikiUnitTestCase {
|
|
/**
|
|
* Same tests as the UrlUtils method to ensure they don't fall out of sync
|
|
* @dataProvider UrlUtilsProviders::provideRemoveDotSegments
|
|
*/
|
|
public function testWfRemoveDotSegments( $inputPath, $outputPath ) {
|
|
$this->assertEquals(
|
|
$outputPath,
|
|
wfRemoveDotSegments( $inputPath ),
|
|
"Testing $inputPath expands to $outputPath"
|
|
);
|
|
}
|
|
}
|