Fix some PSR12.Properties.ConstantVisibility.NotFound in tests/phpunit/

Change-Id: I0f678049dc274f0cd29f543bb293c33da51d8529
This commit is contained in:
Reedy 2020-05-10 00:32:25 +01:00
parent f648dd236e
commit ead6b1e53f
8 changed files with 13 additions and 13 deletions

View file

@ -127,7 +127,7 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase {
/**
* Table name prefix.
*/
const DB_PREFIX = 'unittest_';
public const DB_PREFIX = 'unittest_';
/**
* @var array

View file

@ -7,10 +7,10 @@ abstract class ResourceLoaderTestCase extends MediaWikiTestCase {
// Version hash for a blank file module.
// Result of ResourceLoader::makeHash(), ResourceLoaderTestModule
// and ResourceLoaderFileModule::getDefinitionSummary().
const BLANK_VERSION = '9p30q';
public const BLANK_VERSION = '9p30q';
// Result of ResoureLoader::makeVersionQuery() for a blank file module.
// In other words, result of ResourceLoader::makeHash( BLANK_VERSION );
const BLANK_COMBI = 'rbml8';
public const BLANK_COMBI = 'rbml8';
/**
* @param array|string $options Language code or options array

View file

@ -2,7 +2,7 @@
class DummyContentForTesting extends AbstractContent {
const MODEL_ID = "testing";
public const MODEL_ID = "testing";
public function __construct( $data ) {
parent::__construct( self::MODEL_ID );

View file

@ -12,7 +12,7 @@ use MediaWiki\Session\UserInfo;
*/
class DummySessionProvider extends SessionProvider {
const ID = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
public const ID = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
public function provideSessionInfo( WebRequest $request ) {
return new SessionInfo( SessionInfo::MIN_PRIORITY, [

View file

@ -32,11 +32,11 @@ class ParserTestTopLevelSuite extends TestSuite {
*/
/** Include files shipped with MediaWiki core */
const CORE_ONLY = 1;
public const CORE_ONLY = 1;
/** Include non core files as set in $wgParserTestFiles */
const NO_CORE = 2;
public const NO_CORE = 2;
/** Include anything set via $wgParserTestFiles */
const WITH_ALL = self::CORE_ONLY | self::NO_CORE;
public const WITH_ALL = self::CORE_ONLY | self::NO_CORE;
/** @} */

View file

@ -7,7 +7,7 @@ use MediaWiki\BadFileLookup;
*/
class BadFileLookupTest extends MediaWikiUnitTestCase {
/** Shared with GlobalWithDBTest */
const BLACKLIST = <<<WIKITEXT
public const BLACKLIST = <<<WIKITEXT
Comment line, no effect [[File:Good.jpg]]
* Indented list is also a comment [[File:Good.jpg]]
* [[File:Bad.jpg]] except [[Nasty page]]

View file

@ -10,7 +10,7 @@ use MediaWiki\Languages\LanguageNameUtils;
class LanguageFallbackTest extends MediaWikiUnitTestCase {
use LanguageFallbackTestTrait;
const DATA = [
private const DATA = [
'en' => [],
'fr' => [],
'sco' => [ 'en' ],

View file

@ -9,10 +9,10 @@ class XmlTypeCheckTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator;
const WELL_FORMED_XML = "<root><child /></root>";
const MAL_FORMED_XML = "<root><child /></error>";
private const WELL_FORMED_XML = "<root><child /></root>";
private const MAL_FORMED_XML = "<root><child /></error>";
// phpcs:ignore Generic.Files.LineLength
const XML_WITH_PIH = '<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/w/index.php"?><svg><child /></svg>';
private const XML_WITH_PIH = '<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/w/index.php"?><svg><child /></svg>';
/**
* @covers XMLTypeCheck::newFromString