MediaWiki REL1_31
WikiPageContentHandlerDbTest.php
Go to the documentation of this file.
1<?php
2
9
10 protected function getContentHandlerUseDB() {
11 return true;
12 }
13
17 public function testGetContentModel() {
18 $page = $this->createPage(
19 __METHOD__,
20 "some text",
22 );
23
24 $page = new WikiPage( $page->getTitle() );
25 $this->assertEquals( CONTENT_MODEL_JAVASCRIPT, $page->getContentModel() );
26 }
27
31 public function testGetContentHandler() {
32 $page = $this->createPage(
33 __METHOD__,
34 "some text",
36 );
37
38 $page = new WikiPage( $page->getTitle() );
39 $this->assertEquals( JavaScriptContentHandler::class, get_class( $page->getContentHandler() ) );
40 }
41
42}
ContentHandler Database medium.
testGetContentModel()
WikiPage::getContentModel.
testGetContentHandler()
WikiPage::getContentHandler.
createPage( $page, $text, $model=null)
Class representing a MediaWiki article and history.
Definition WikiPage.php:37
const CONTENT_MODEL_JAVASCRIPT
Definition Defines.php:246