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