Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add stub special page * Try type hint
- Loading branch information
Showing
6 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
$specialPageAliases = []; | ||
|
||
$specialPageAliases['en'] = [ | ||
'WikibaseExport' => [ 'WikibaseExport' ], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare( strict_types = 1 ); | ||
|
||
namespace ProfessionalWiki\WikibaseExport; | ||
|
||
use SpecialPage; | ||
|
||
class SpecialWikibaseExport extends SpecialPage { | ||
|
||
public function __construct() { | ||
parent::__construct( 'WikibaseExport' ); | ||
} | ||
|
||
public function execute( $subPage ): void { | ||
parent::execute( $subPage ); | ||
$this->getOutput()->addHTML( 'TODO' ); | ||
} | ||
|
||
public function getGroupName(): string { | ||
return 'wikibase'; | ||
} | ||
|
||
public function getDescription(): string { | ||
return $this->msg( 'special-wikibase-export' )->escaped(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare( strict_types = 1 ); | ||
|
||
namespace ProfessionalWiki\WikibaseExport\Tests; | ||
|
||
use ProfessionalWiki\WikibaseExport\SpecialWikibaseExport; | ||
use SpecialPageTestBase; | ||
|
||
/** | ||
* @covers \ProfessionalWiki\WikibaseExport\SpecialWikibaseExport | ||
*/ | ||
class SpecialWikibaseExportTest extends SpecialPageTestBase { | ||
|
||
protected function newSpecialPage(): SpecialWikibaseExport { | ||
return new SpecialWikibaseExport(); | ||
} | ||
|
||
public function testStub(): void { | ||
/** @var string $output */ | ||
list( $output ) = $this->executeSpecialPage(); | ||
|
||
$this->assertStringContainsString( | ||
'TODO', | ||
$output | ||
); | ||
} | ||
|
||
} |