3 namespace MediaWiki\Auth
;
5 use Wikimedia\TestingAccessWrapper
;
9 * @covers MediaWiki\Auth\AbstractAuthenticationProvider
11 class AbstractAuthenticationProviderTest
extends \MediaWikiTestCase
{
12 public function testAbstractAuthenticationProvider() {
13 $provider = $this->getMockForAbstractClass( AbstractAuthenticationProvider
::class );
14 $providerPriv = TestingAccessWrapper
::newFromObject( $provider );
16 $obj = $this->getMockForAbstractClass( 'Psr\Log\LoggerInterface' );
17 $provider->setLogger( $obj );
18 $this->assertSame( $obj, $providerPriv->logger
, 'setLogger' );
20 $obj = AuthManager
::singleton();
21 $provider->setManager( $obj );
22 $this->assertSame( $obj, $providerPriv->manager
, 'setManager' );
24 $obj = $this->getMockForAbstractClass( 'Config' );
25 $provider->setConfig( $obj );
26 $this->assertSame( $obj, $providerPriv->config
, 'setConfig' );
28 $this->assertType( 'string', $provider->getUniqueId(), 'getUniqueId' );