RevisionNoContentModelDbTest.php 954 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. use MediaWiki\Tests\Storage\PreMcrSchemaOverride;
  3. /**
  4. * Tests Revision against the pre-MCR, pre ContentHandler DB schema.
  5. *
  6. * @covers Revision
  7. *
  8. * @group Revision
  9. * @group Storage
  10. * @group ContentHandler
  11. * @group Database
  12. * @group medium
  13. */
  14. class RevisionNoContentModelDbTest extends RevisionDbTestBase {
  15. use PreMcrSchemaOverride;
  16. protected function getContentHandlerUseDB() {
  17. return false;
  18. }
  19. public function provideGetTextId() {
  20. yield [ [], null ];
  21. $row = (object)[
  22. 'rev_id' => 7,
  23. 'rev_page' => 1, // should match actual page id
  24. 'rev_text_id' => 789,
  25. 'rev_timestamp' => '20180101000000',
  26. 'rev_len' => 7,
  27. 'rev_minor_edit' => 0,
  28. 'rev_deleted' => 0,
  29. 'rev_parent_id' => 0,
  30. 'rev_sha1' => 'deadbeef',
  31. 'rev_comment' => 'some comment',
  32. 'rev_comment_text' => 'some comment',
  33. 'rev_comment_data' => '{}',
  34. 'rev_user' => 17,
  35. 'rev_user_text' => 'some user',
  36. ];
  37. yield [ $row, 789 ];
  38. }
  39. }