MediaWiki
REL1_31
WikiPageContentHandlerDbTest.php
Go to the documentation of this file.
1
<?php
2
8
class
WikiPageContentHandlerDbTest
extends
WikiPageDbTestBase
{
9
10
protected
function
getContentHandlerUseDB
() {
11
return
true
;
12
}
13
17
public
function
testGetContentModel
() {
18
$page = $this->
createPage
(
19
__METHOD__,
20
"some text"
,
21
CONTENT_MODEL_JAVASCRIPT
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"
,
35
CONTENT_MODEL_JAVASCRIPT
36
);
37
38
$page =
new
WikiPage
( $page->getTitle() );
39
$this->assertEquals( JavaScriptContentHandler::class, get_class( $page->getContentHandler() ) );
40
}
41
42
}
WikiPageContentHandlerDbTest
ContentHandler Database medium.
Definition
WikiPageContentHandlerDbTest.php:8
WikiPageContentHandlerDbTest\testGetContentModel
testGetContentModel()
WikiPage::getContentModel.
Definition
WikiPageContentHandlerDbTest.php:17
WikiPageContentHandlerDbTest\testGetContentHandler
testGetContentHandler()
WikiPage::getContentHandler.
Definition
WikiPageContentHandlerDbTest.php:31
WikiPageContentHandlerDbTest\getContentHandlerUseDB
getContentHandlerUseDB()
Definition
WikiPageContentHandlerDbTest.php:10
WikiPageDbTestBase
Definition
WikiPageDbTestBase.php:3
WikiPageDbTestBase\createPage
createPage( $page, $text, $model=null)
Definition
WikiPageDbTestBase.php:81
WikiPage
Class representing a MediaWiki article and history.
Definition
WikiPage.php:37
CONTENT_MODEL_JAVASCRIPT
const CONTENT_MODEL_JAVASCRIPT
Definition
Defines.php:246
tests
phpunit
includes
page
WikiPageContentHandlerDbTest.php
Generated on Mon Nov 25 2024 15:36:29 for MediaWiki by
1.10.0