Localisation updates from https://translatewiki.net.
[mediawiki.git] / tests / phpunit / maintenance / storage / DumpRevTest.php
blob17d4c1cc5e77bace1374b6f484eebba66ec6a81b
1 <?php
3 namespace MediaWiki\Tests\Maintenance;
5 use DumpRev;
7 /**
8 * @covers \DumpRev
9 * @group Database
10 * @author Dreamy Jazz
12 class DumpRevTest extends MaintenanceBaseTestCase {
14 protected function getMaintenanceClass() {
15 return DumpRev::class;
18 public function testExecuteForMissingRevisionId() {
19 $this->maintenance->setArg( 'rev-id', 123 );
20 $this->expectCallToFatalError();
21 $this->expectOutputRegex( '/Row not found/' );
22 $this->maintenance->execute();
25 public function testExecute() {
26 $revId = $this->editPage( $this->getNonexistingTestPage(), 'testing1234' )->getNewRevision()->getId();
27 $this->maintenance->setArg( 'rev-id', $revId );
28 $this->maintenance->execute();
29 $this->expectOutputString( "Text length: 11\ntesting1234\n" );