MediaWiki REL1_32
AbstractAuthenticationProviderTest.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Auth;
4
5use Wikimedia\TestingAccessWrapper;
6
13 $provider = $this->getMockForAbstractClass( AbstractAuthenticationProvider::class );
14 $providerPriv = TestingAccessWrapper::newFromObject( $provider );
15
16 $obj = $this->getMockForAbstractClass( \Psr\Log\LoggerInterface::class );
17 $provider->setLogger( $obj );
18 $this->assertSame( $obj, $providerPriv->logger, 'setLogger' );
19
21 $provider->setManager( $obj );
22 $this->assertSame( $obj, $providerPriv->manager, 'setManager' );
23
24 $obj = $this->getMockForAbstractClass( \Config::class );
25 $provider->setConfig( $obj );
26 $this->assertSame( $obj, $providerPriv->config, 'setConfig' );
27
28 $this->assertType( 'string', $provider->getUniqueId(), 'getUniqueId' );
29 }
30}
assertType( $type, $actual, $message='')
Asserts the type of the provided value.
AuthManager MediaWiki\Auth\AbstractAuthenticationProvider.
static singleton()
Get the global AuthManager.