MediaWiki REL1_33
WikiPagePreMcrDbTest.php
Go to the documentation of this file.
1<?php
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}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
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:45
const CONTENT_MODEL_JAVASCRIPT
Definition Defines.php:245