wiki.techinc.nl/tests/phpunit/includes/specials/SpecialChangeContentModelTest.php
ArtBaltai 30e54b3962 Introduce ContentHandlerFactory
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
2020-02-07 00:53:51 +03:00

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' );
}
}