MediaWiki REL1_32
WikiPagePreMcrDbTest.php
Go to the documentation of this file.
1<?php
2use MediaWiki\Tests\Revision\PreMcrSchemaOverride;
3
16
17 use PreMcrSchemaOverride;
18
19 protected function getContentHandlerUseDB() {
20 return true;
21 }
22
26 public function testGetContentModel() {
27 $page = $this->createPage(
28 __METHOD__,
29 "some text",
31 );
32
33 $page = new WikiPage( $page->getTitle() );
34 $this->assertEquals( CONTENT_MODEL_JAVASCRIPT, $page->getContentModel() );
35 }
36
40 public function testGetContentHandler() {
41 $page = $this->createPage(
42 __METHOD__,
43 "some text",
45 );
46
47 $page = new WikiPage( $page->getTitle() );
48 $this->assertEquals( JavaScriptContentHandler::class, get_class( $page->getContentHandler() ) );
49 }
50
51}
createPage( $page, $content, $model=null, $user=null)
Tests WikiPage against the pre-MCR DB schema.
testGetContentHandler()
WikiPage::getContentHandler.
testGetContentModel()
WikiPage::getContentModel.
Class representing a MediaWiki article and history.
Definition WikiPage.php:44
const CONTENT_MODEL_JAVASCRIPT
Definition Defines.php:236