Add sslCAFile option to DatabaseMysqli
[mediawiki.git] / tests / phpunit / includes / auth / AbstractAuthenticationProviderTest.php
bloba3b0df529de242199707751889a2ae4946546ba8
1 <?php
3 namespace MediaWiki\Auth;
5 use Wikimedia\TestingAccessWrapper;
7 /**
8 * @group AuthManager
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' );