aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/RevisionNoContentModelDbTest.php
blob: f07d1692e59063aca42f93d6a363ec75c060eb28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php

use MediaWiki\Tests\Storage\PreMcrSchemaOverride;

/**
 * Tests Revision against the pre-MCR, pre ContentHandler DB schema.
 *
 * @covers Revision
 *
 * @group Revision
 * @group Storage
 * @group ContentHandler
 * @group Database
 * @group medium
 */
class RevisionNoContentModelDbTest extends RevisionDbTestBase {

	use PreMcrSchemaOverride;

	protected function getContentHandlerUseDB() {
		return false;
	}

	public function provideGetTextId() {
		yield [ [], null ];

		$row = (object)[
			'rev_id' => 7,
			'rev_page' => 1, // should match actual page id
			'rev_text_id' => 789,
			'rev_timestamp' => '20180101000000',
			'rev_len' => 7,
			'rev_minor_edit' => 0,
			'rev_deleted' => 0,
			'rev_parent_id' => 0,
			'rev_sha1' => 'deadbeef',
			'rev_comment' => 'some comment',
			'rev_comment_text' => 'some comment',
			'rev_comment_data' => '{}',
			'rev_user' => 17,
			'rev_user_text' => 'some user',
		];

		yield [ $row, 789 ];
	}

}