MediaWiki
REL1_32
WikiPageNoContentModelDbTest.php
Go to the documentation of this file.
1
<?php
2
use MediaWiki\Tests\Revision\PreMcrSchemaOverride;
3
15
class
WikiPageNoContentModelDbTest
extends
WikiPageDbTestBase
{
16
17
use PreMcrSchemaOverride;
18
19
protected
function
getContentHandlerUseDB
() {
20
return
false
;
21
}
22
23
public
function
testGetDeletionUpdates
() {
24
$mainContent1 =
new
WikitextContent
(
''
);
25
26
$title = Title::makeTitle( $this->
getDefaultWikitextNS
(), __METHOD__ );
27
$page =
new
WikiPage
( $title );
28
$page = $this->
createPage
(
29
$page,
30
[
'main'
=> $mainContent1 ]
31
);
32
33
$dataUpdates = $page->getDeletionUpdates( $page->getRevisionRecord() );
34
$this->assertNotEmpty( $dataUpdates );
35
36
$updateNames = array_map(
function
( $du ) {
37
return
isset( $du->_name ) ? $du->_name : get_class( $du );
38
}, $dataUpdates );
39
40
$this->assertContains( LinksDeletionUpdate::class, $updateNames );
41
}
42
43
}
MediaWikiTestCase\getDefaultWikitextNS
getDefaultWikitextNS()
Returns the ID of a namespace that defaults to Wikitext.
Definition
MediaWikiTestCase.php:2177
WikiPageDbTestBase
WikiPage.
Definition
WikiPageDbTestBase.php:13
WikiPageDbTestBase\createPage
createPage( $page, $content, $model=null, $user=null)
Definition
WikiPageDbTestBase.php:114
WikiPageNoContentModelDbTest
Tests WikiPage against the pre-MCR, pre ContentHandler DB schema.
Definition
WikiPageNoContentModelDbTest.php:15
WikiPageNoContentModelDbTest\testGetDeletionUpdates
testGetDeletionUpdates()
Definition
WikiPageNoContentModelDbTest.php:23
WikiPageNoContentModelDbTest\getContentHandlerUseDB
getContentHandlerUseDB()
Definition
WikiPageNoContentModelDbTest.php:19
WikiPage
Class representing a MediaWiki article and history.
Definition
WikiPage.php:44
WikitextContent
Content object for wiki text pages.
Definition
WikitextContent.php:35
tests
phpunit
includes
page
WikiPageNoContentModelDbTest.php
Generated on Mon Nov 25 2024 15:58:48 for MediaWiki by
1.10.0