We renamed many classes to be namespaced, but the `@covers` and `@coversDefaultClass` annotations weren't updated properly. PHPUnit didn't support short cover annotations with `use` statements, these didn't trigger any errors yet, because they are class alias. This patch is populated by a modified version of PhpunitAnnotationsSniff. Change-Id: I6c602290a30099239b17d2dc0d67b1488b4eaeeb
27 lines
639 B
PHP
27 lines
639 B
PHP
<?php
|
|
|
|
use MediaWiki\Specials\SpecialCreateAccount;
|
|
|
|
/**
|
|
* @covers MediaWiki\Specials\SpecialCreateAccount
|
|
*/
|
|
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();
|
|
}
|
|
}
|