4 * @coversDefaultClass NullFileJournal
6 class NullFileJournalTest
extends MediaWikiUnitTestCase
{
7 public function newObj() : NullFileJournal
{
8 return FileJournal
::factory( [ 'class' => NullFileJournal
::class ], '' );
12 * @covers ::doLogChangeBatch
14 public function testLogChangeBatch() {
15 $this->assertEquals( StatusValue
::newGood(), $this->newObj()->logChangeBatch( [ 1 ], '' ) );
19 * @covers ::doGetCurrentPosition
21 public function testGetCurrentPosition() {
22 $this->assertFalse( $this->newObj()->getCurrentPosition() );
26 * @covers ::doGetPositionAtTime
28 public function testGetPositionAtTime() {
29 $this->assertFalse( $this->newObj()->getPositionAtTime( 2 ) );
33 * @covers ::doGetChangeEntries
35 public function testGetChangeEntries() {
37 $entries = $this->newObj()->getChangeEntries( null, 0, $next );
38 $this->assertSame( [], $entries );
39 $this->assertNull( $next );
43 * @covers ::doPurgeOldLogs
45 public function testPurgeOldLogs() {
46 $this->assertEquals( StatusValue
::newGood(), $this->newObj()->purgeOldLogs() );