<?php
+use MediaWiki\MediaWikiServices;
+
/**
* @group Database
* @group Title
*/
public function testSecureAndSplitValid( $text ) {
$this->secureAndSplitGlobals();
- $this->assertInstanceOf( 'Title', Title::newFromText( $text ), "Valid: $text" );
+ $this->assertInstanceOf( Title::class, Title::newFromText( $text ), "Valid: $text" );
}
/**
$this->setContentLang( $contLang );
$title = Title::newFromText( $titleText );
- $this->assertInstanceOf( 'Title', $title,
+ $this->assertInstanceOf( Title::class, $title,
"Test must be passed a valid title text, you gave '$titleText'"
);
$this->assertEquals( $expected,
*/
public function testExists() {
$title = Title::makeTitle( NS_PROJECT, 'New page' );
- $linkCache = LinkCache::singleton();
+ $linkCache = MediaWikiServices::getInstance()->getLinkCache();
$article = new Article( $title );
$page = $article->getPage();