*assertType is marked as deprecated, and should ideally be removed soon (i.e. no hard deprecation to follow) *Most usages of assertType in core were autofixed by using I8ef556b630812aeea77c5606713f53d9af609f1b *assertTypeOrValue was removed because only used in SiteTest (codesearch: https://codesearch.wmflabs.org/search/?q=assertTypeOrValue&i=nope&files=&repos=) *SiteTest::assertTypeOrFalse was removed because unused Bug: T192167 Change-Id: Icb3014b8fe7d1c43e64a37e0bdaaffec18bb482f
30 lines
981 B
PHP
30 lines
981 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Auth;
|
|
|
|
use Wikimedia\TestingAccessWrapper;
|
|
|
|
/**
|
|
* @group AuthManager
|
|
* @covers \MediaWiki\Auth\AbstractAuthenticationProvider
|
|
*/
|
|
class AbstractAuthenticationProviderTest extends \MediaWikiTestCase {
|
|
public function testAbstractAuthenticationProvider() {
|
|
$provider = $this->getMockForAbstractClass( AbstractAuthenticationProvider::class );
|
|
$providerPriv = TestingAccessWrapper::newFromObject( $provider );
|
|
|
|
$obj = $this->getMockForAbstractClass( \Psr\Log\LoggerInterface::class );
|
|
$provider->setLogger( $obj );
|
|
$this->assertSame( $obj, $providerPriv->logger, 'setLogger' );
|
|
|
|
$obj = AuthManager::singleton();
|
|
$provider->setManager( $obj );
|
|
$this->assertSame( $obj, $providerPriv->manager, 'setManager' );
|
|
|
|
$obj = $this->getMockForAbstractClass( \Config::class );
|
|
$provider->setConfig( $obj );
|
|
$this->assertSame( $obj, $providerPriv->config, 'setConfig' );
|
|
|
|
$this->assertIsString( $provider->getUniqueId(), 'getUniqueId' );
|
|
}
|
|
}
|