Added: - ContentHandlerFactory Tests: - PHPUnit Changed - Calls of changed and deprecated - DI for some service/api Deprecated: - ContentHandler::* then similar to ContentHandlerFactory - ContentHandler::getForTitle - ContentHandler::$handlers Bug: T235165 Change-Id: I59246938c7ad7b3e70e46c9e698708ef9bc672c6
28 lines
708 B
PHP
28 lines
708 B
PHP
<?php
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
/**
|
|
* Test class for SpecialChangeContentModel class
|
|
*
|
|
* @group Database
|
|
*
|
|
* @covers SpecialChangeContentModel
|
|
*/
|
|
class SpecialChangeContentModelTest extends MediaWikiTestCase {
|
|
|
|
/**
|
|
* @covers \SpecialChangeContentModel::__construct
|
|
* @covers \SpecialChangeContentModel::doesWrites
|
|
*/
|
|
public function testBasic() {
|
|
$contentModel = $this->getChangeContentModel();
|
|
$this->assertInstanceOf( SpecialChangeContentModel::class, $contentModel );
|
|
$this->assertTrue( $contentModel->doesWrites() );
|
|
}
|
|
|
|
private function getChangeContentModel() {
|
|
return MediaWikiServices::getInstance()->getSpecialPageFactory()
|
|
->getPage( 'ChangeContentModel' );
|
|
}
|
|
}
|