wiki.techinc.nl/tests/phpunit/includes/auth/AbstractAuthenticationProviderTest.php
Gergő Tisza 854a462dc0 Remove $wgDisableAuthManager
Change-Id: I2b2c9693a275fcc026916bd97f303e7a5c8df341
2016-08-09 23:00:27 +00:00

28 lines
938 B
PHP

<?php
namespace MediaWiki\Auth;
/**
* @group AuthManager
* @covers MediaWiki\Auth\AbstractAuthenticationProvider
*/
class AbstractAuthenticationProviderTest extends \MediaWikiTestCase {
public function testAbstractAuthenticationProvider() {
$provider = $this->getMockForAbstractClass( AbstractAuthenticationProvider::class );
$providerPriv = \TestingAccessWrapper::newFromObject( $provider );
$obj = $this->getMockForAbstractClass( 'Psr\Log\LoggerInterface' );
$provider->setLogger( $obj );
$this->assertSame( $obj, $providerPriv->logger, 'setLogger' );
$obj = AuthManager::singleton();
$provider->setManager( $obj );
$this->assertSame( $obj, $providerPriv->manager, 'setManager' );
$obj = $this->getMockForAbstractClass( 'Config' );
$provider->setConfig( $obj );
$this->assertSame( $obj, $providerPriv->config, 'setConfig' );
$this->assertType( 'string', $provider->getUniqueId(), 'getUniqueId' );
}
}