wiki.techinc.nl/tests/phpunit/includes/auth/AbstractAuthenticationProviderTest.php
Alangi Derick b86593a2da Fix undefined NS with @covers tags in /includes/auth/
Should MW Codesniffer also handle these as well?

Change-Id: Ieb493bddd5f3674fb889b4a780d51b50d89c4f65
2018-11-01 12:48:52 +01:00

30 lines
987 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->assertType( 'string', $provider->getUniqueId(), 'getUniqueId' );
}
}