Page MenuHomeWickedGov Phorge

DumpRevTest.php
No OneTemporary

Size
769 B
Referenced Files
None
Subscribers
None

DumpRevTest.php

<?php
namespace MediaWiki\Tests\Maintenance;
use DumpRev;
/**
* @covers \DumpRev
* @group Database
* @author Dreamy Jazz
*/
class DumpRevTest extends MaintenanceBaseTestCase {
protected function getMaintenanceClass() {
return DumpRev::class;
}
public function testExecuteForMissingRevisionId() {
$this->maintenance->setArg( 'rev-id', 123 );
$this->expectCallToFatalError();
$this->expectOutputRegex( '/Row not found/' );
$this->maintenance->execute();
}
public function testExecute() {
$revId = $this->editPage( $this->getNonexistingTestPage(), 'testing1234' )->getNewRevision()->getId();
$this->maintenance->setArg( 'rev-id', $revId );
$this->maintenance->execute();
$this->expectOutputString( "Text length: 11\ntesting1234\n" );
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Jul 3, 17:15 (7 h, 29 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
68/80/c28c7d79b0b37f3414f6b3918595
Default Alt Text
DumpRevTest.php (769 B)

Event Timeline