Merge "Update docs/hooks.txt for ShowSearchHitTitle"
[mediawiki.git] / tests / phpunit / includes / auth / AbstractAuthenticationProviderTest.php
blob89e48f723534699ce121d550c3c0e5b285db96e8
1 <?php
3 namespace MediaWiki\Auth;
5 /**
6 * @group AuthManager
7 * @covers MediaWiki\Auth\AbstractAuthenticationProvider
8 */
9 class AbstractAuthenticationProviderTest extends \MediaWikiTestCase {
10 public function testAbstractAuthenticationProvider() {
11 $provider = $this->getMockForAbstractClass( AbstractAuthenticationProvider::class );
12 $providerPriv = \TestingAccessWrapper::newFromObject( $provider );
14 $obj = $this->getMockForAbstractClass( 'Psr\Log\LoggerInterface' );
15 $provider->setLogger( $obj );
16 $this->assertSame( $obj, $providerPriv->logger, 'setLogger' );
18 $obj = AuthManager::singleton();
19 $provider->setManager( $obj );
20 $this->assertSame( $obj, $providerPriv->manager, 'setManager' );
22 $obj = $this->getMockForAbstractClass( 'Config' );
23 $provider->setConfig( $obj );
24 $this->assertSame( $obj, $providerPriv->config, 'setConfig' );
26 $this->assertType( 'string', $provider->getUniqueId(), 'getUniqueId' );