| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
namespace MediaWiki\Extension\OATHAuth\Tests\Integration\Special; |
| 22 |
|
| 23 |
use MediaWiki\Extension\OATHAuth\OATHAuthServices; |
| 24 |
use MediaWiki\Extension\OATHAuth\Special\OATHManage; |
| 25 |
use MediaWiki\MainConfigNames; |
| 26 |
use SpecialPageTestBase; |
| 27 |
|
| 28 |
|
| 29 |
tf> |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
class OATHManageTest extends SpecialPageTestBase { |
| 34 |
protected function setUp(): void { |
| 35 |
parent::setUp(); |
| 36 |
$this->overrideConfigValue( MainConfigNames::CentralIdLookupProvider, 'local' ); |
| 37 |
} |
| 38 |
|
| 39 |
protected function newSpecialPage() { |
| 40 |
$services = OATHAuthServices::getInstance( $this->getServiceContainer() ); |
| 41 |
return new OATHManage( |
| 42 |
$services->getUserRepository(), |
| 43 |
$services->getModuleRegistry(), |
| 44 |
); |
| 45 |
} |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
public function testPageLoads() { |
| 51 |
$this->executeSpecialPage( |
| 52 |
'', |
| 53 |
null, |
| 54 |
null, |
| 55 |
$this->getTestUser()->getAuthority(), |
| 56 |
); |
| 57 |
|
| 58 |
$this->addToAssertionCount( 1 ); |
| 59 |
} |
| 60 |
} |