Merge "Fix use of GenderCache in ApiPageSet::processTitlesArray"
[lhc/web/wiklou.git] / tests / phpunit / unit / includes / libs / filebackend / filejournal / TestFileJournal.php
1 <?php
2
3 class TestFileJournal extends NullFileJournal {
4 /** @var bool */
5 private $purged = false;
6
7 public function getTtlDays() {
8 return $this->ttlDays;
9 }
10
11 public function getBackend() {
12 return $this->backend;
13 }
14
15 protected function doLogChangeBatch( array $entries, $batchId ) {
16 return StatusValue::newGood( 'Logged' );
17 }
18
19 protected function doGetCurrentPosition() {
20 return 613;
21 }
22
23 protected function doGetPositionAtTime( $time ) {
24 return 248;
25 }
26
27 protected function doGetChangeEntries( $start, $limit ) {
28 return array_slice( [
29 [ 'id' => 1 ],
30 [ 'id' => 2 ],
31 [ 'id' => 3 ],
32 ], $start === null ? 0 : $start - 1, $limit ? $limit : null );
33 }
34
35 protected function doPurgeOldLogs() {
36 $this->purged = true;
37 }
38
39 public function getPurged() {
40 return $this->purged;
41 }
42 }