Fix SpecialPage alias test
This was testing regex with completely unecessary long string. I believe it was meant to be the test message instead of being the haystack. Only the value of $alias may contain the slash, the rest of the string has no any other slash, this is already known. Also use simple string assertion instead of regex matching Change-Id: I47eb0bfcd510e4f1c92099a9cb53b584a34036ce
This commit is contained in:
parent
e2894e92ea
commit
c2743edd26
1 changed files with 2 additions and 2 deletions
|
|
@ -20,8 +20,8 @@ class SpecialPageAliasTest extends MediaWikiIntegrationTestCase {
|
|||
public function testValidSpecialPageAliases( $code, $specialPageAliases ) {
|
||||
foreach ( $specialPageAliases as $specialPage => $aliases ) {
|
||||
foreach ( $aliases as $alias ) {
|
||||
$msg = "$specialPage alias '$alias' in $code is valid with no slashes";
|
||||
$this->assertRegExp( '/^[^\/]*$/', $msg );
|
||||
$msg = "Special:$specialPage alias '$alias' in $code must not contain slashes";
|
||||
$this->assertStringNotContainsString( '/', $alias, $msg );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue