wiki.techinc.nl/tests/phpunit/includes/auth/AbstractAuthenticationProviderTest.php
addshore 959bc315f2 MediaWikiTestCase to MediaWikiIntegrationTestCase
The name change happened some time ago, and I think its
about time to start using the name name!
(Done with a find and replace)

My personal motivation for doing this is that I have started
trying out vscode as an IDE for mediawiki development, and
right now it doesn't appear to handle php aliases very well
or at all.

Change-Id: I412235d91ae26e4c1c6a62e0dbb7e7cf3c5ed4a6
2020-06-30 17:02:22 +01:00

31 lines
1 KiB
PHP

<?php
namespace MediaWiki\Auth;
use MediaWiki\MediaWikiServices;
use Wikimedia\TestingAccessWrapper;
/**
* @group AuthManager
* @covers \MediaWiki\Auth\AbstractAuthenticationProvider
*/
class AbstractAuthenticationProviderTest extends \MediaWikiIntegrationTestCase {
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 = MediaWikiServices::getInstance()->getAuthManager();
$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' );
}
}