3 namespace MediaWiki\Auth
;
7 * @covers MediaWiki\Auth\AbstractAuthenticationProvider
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' );