SiteConfiguration: Add unit test for tag/suffix conflict scenario
This is currently broken per T246858. Will be fixed in the next commit. Bug: T246858 Change-Id: Ifb5239e118f8707ccc397d55e4ae3eb8287906a3
This commit is contained in:
parent
9ce8f505e5
commit
44dd120f5a
1 changed files with 23 additions and 0 deletions
|
|
@ -408,4 +408,27 @@ class SiteConfigurationTest extends \MediaWikiUnitTestCase {
|
|||
'extractAllGlobals(): merging setting'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers SiteConfiguration
|
||||
*/
|
||||
public function testSuffixAndTagConflict() {
|
||||
$conf = new SiteConfiguration;
|
||||
|
||||
$conf->suffixes = [ 'foo', 'bar', 'baz' ];
|
||||
$conf->wikis = [ 'aabar', 'bbbar', 'ccbar' ];
|
||||
$conf->settings = [
|
||||
'MyVariable' => [
|
||||
'default' => [ 'x' ],
|
||||
'+bar' => [ 'y' ],
|
||||
],
|
||||
];
|
||||
|
||||
$this->assertSame(
|
||||
// FIXME: This is broken (T246858)
|
||||
[ 'y', 'y', 'x' ],
|
||||
$conf->get( 'MyVariable', 'bbbar', 'bar', [], [ 'alpha', 'bar' ] ),
|
||||
'get(): variable with +merge for a tag that is also a suffix'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue