2021-05-24 13:40:37 +00:00
|
|
|
<?php
|
|
|
|
|
|
2023-03-17 15:04:04 +00:00
|
|
|
use MediaWiki\Specials\SpecialCreateAccount;
|
|
|
|
|
|
2021-05-24 13:40:37 +00:00
|
|
|
/**
|
2023-05-27 09:43:12 +00:00
|
|
|
* @covers MediaWiki\Specials\SpecialCreateAccount
|
2021-05-24 13:40:37 +00:00
|
|
|
*/
|
|
|
|
|
class SpecialCreateAccountTest extends SpecialPageTestBase {
|
|
|
|
|
/**
|
|
|
|
|
* @inheritDoc
|
|
|
|
|
*/
|
|
|
|
|
protected function newSpecialPage() {
|
|
|
|
|
$services = $this->getServiceContainer();
|
|
|
|
|
return new SpecialCreateAccount(
|
|
|
|
|
$services->getAuthManager()
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testCheckPermissions() {
|
|
|
|
|
$readOnlyMode = $this->getServiceContainer()->getReadOnlyMode();
|
|
|
|
|
$readOnlyMode->setReason( 'Test' );
|
|
|
|
|
|
|
|
|
|
$this->expectException( ErrorPageError::class );
|
|
|
|
|
$specialPage = $this->newSpecialPage();
|
|
|
|
|
$specialPage->checkPermissions();
|
|
|
|
|
}
|
|
|
|
|
}
|