.pipeline/config.yaml: rename dev stage to publish
[lhc/web/wiklou.git] / tests / phpunit / includes / page / WikiPagePreMcrDbTest.php
1 <?php
2
3 use MediaWiki\Tests\Revision\PreMcrSchemaOverride;
4
5 /**
6 * Tests WikiPage against the pre-MCR DB schema.
7 *
8 * @covers WikiPage
9 *
10 * @group WikiPage
11 * @group Storage
12 * @group ContentHandler
13 * @group Database
14 * @group medium
15 */
16 class WikiPagePreMcrDbTest extends WikiPageDbTestBase {
17
18 use PreMcrSchemaOverride;
19
20 protected function getContentHandlerUseDB() {
21 return true;
22 }
23
24 /**
25 * @covers WikiPage::getContentModel
26 */
27 public function testGetContentModel() {
28 $page = $this->createPage(
29 __METHOD__,
30 "some text",
31 CONTENT_MODEL_JAVASCRIPT
32 );
33
34 $page = new WikiPage( $page->getTitle() );
35 $this->assertEquals( CONTENT_MODEL_JAVASCRIPT, $page->getContentModel() );
36 }
37
38 /**
39 * @covers WikiPage::getContentHandler
40 */
41 public function testGetContentHandler() {
42 $page = $this->createPage(
43 __METHOD__,
44 "some text",
45 CONTENT_MODEL_JAVASCRIPT
46 );
47
48 $page = new WikiPage( $page->getTitle() );
49 $this->assertEquals( JavaScriptContentHandler::class, get_class( $page->getContentHandler() ) );
50 }
51
52 }