<?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,
}
/**
+ * @covers Title::newFromTitleValue
* @dataProvider provideNewFromTitleValue
*/
public function testNewFromTitleValue( TitleValue $value ) {
}
/**
+ * @covers Title::getTitleValue
* @dataProvider provideGetTitleValue
*/
public function testGetTitleValue( $text ) {
}
/**
+ * @covers Title::getFragment
* @dataProvider provideGetFragment
*
* @param string $full
*/
public function testExists() {
$title = Title::makeTitle( NS_PROJECT, 'New page' );
- $linkCache = LinkCache::singleton();
+ $linkCache = MediaWikiServices::getInstance()->getLinkCache();
$article = new Article( $title );
$page = $article->getPage();
}
/**
+ * @covers Title::getFragmentForURL
* @dataProvider provideGetFragmentForURL
*
* @param string $titleStr