Localisation updates from https://translatewiki.net.
[mediawiki.git] / tests / phpunit / maintenance / PageExistsTest.php
blob77187adc73b640a09f05951698d5b309d2907761
1 <?php
3 namespace MediaWiki\Tests\Maintenance;
5 use PageExists;
7 /**
8 * @covers \PageExists
9 * @group Database
10 * @author Dreamy Jazz
12 class PageExistsTest extends MaintenanceBaseTestCase {
14 protected function getMaintenanceClass() {
15 return PageExists::class;
18 public function testExecuteForNonExistingPage() {
19 $nonExistentTestPage = $this->getNonexistingTestPage();
20 $this->maintenance->setArg( 'title', $nonExistentTestPage );
21 $this->maintenance->execute();
22 $this->expectOutputString(
23 "$nonExistentTestPage doesn't exist.\n"
27 public function testExecuteForExistingPage() {
28 $existingTestPage = $this->getExistingTestPage();
29 $this->maintenance->setArg( 'title', $existingTestPage );
30 $this->maintenance->execute();
31 $this->expectOutputString(
32 "$existingTestPage exists.\n"