MediaWiki REL1_32
ContentModelLogFormatterTest.php
Go to the documentation of this file.
1<?php
2
7 public static function provideContentModelLogDatabaseRows() {
8 return [
9 [
10 [
11 'type' => 'contentmodel',
12 'action' => 'new',
13 'comment' => 'new content model comment',
14 'namespace' => NS_MAIN,
15 'title' => 'ContentModelPage',
16 'params' => [
17 '5::newModel' => 'testcontentmodel',
18 ],
19 ],
20 [
21 'text' => 'User created the page ContentModelPage ' .
22 'using a non-default content model ' .
23 '"testcontentmodel"',
24 'api' => [
25 'newModel' => 'testcontentmodel',
26 ],
27 ],
28 ],
29 [
30 [
31 'type' => 'contentmodel',
32 'action' => 'change',
33 'comment' => 'change content model comment',
34 'namespace' => NS_MAIN,
35 'title' => 'ContentModelPage',
36 'params' => [
37 '4::oldmodel' => 'wikitext',
38 '5::newModel' => 'testcontentmodel',
39 ],
40 ],
41 [
42 'text' => 'User changed the content model of the page ' .
43 'ContentModelPage from "wikitext" to ' .
44 '"testcontentmodel"',
45 'api' => [
46 'oldmodel' => 'wikitext',
47 'newModel' => 'testcontentmodel',
48 ],
49 ],
50 ],
51 ];
52 }
53
57 public function testContentModelLogDatabaseRows( $row, $extra ) {
58 $this->doTestLogFormatter( $row, $extra );
59 }
60}
testContentModelLogDatabaseRows( $row, $extra)
provideContentModelLogDatabaseRows
doTestLogFormatter( $row, $extra)
const NS_MAIN
Definition Defines.php:64