summaryrefslogtreecommitdiff
path: root/www/wiki/tests/phpunit/includes/auth/AbstractAuthenticationProviderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/tests/phpunit/includes/auth/AbstractAuthenticationProviderTest.php')
-rw-r--r--www/wiki/tests/phpunit/includes/auth/AbstractAuthenticationProviderTest.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/www/wiki/tests/phpunit/includes/auth/AbstractAuthenticationProviderTest.php b/www/wiki/tests/phpunit/includes/auth/AbstractAuthenticationProviderTest.php
new file mode 100644
index 00000000..b271b701
--- /dev/null
+++ b/www/wiki/tests/phpunit/includes/auth/AbstractAuthenticationProviderTest.php
@@ -0,0 +1,30 @@
+<?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' );
+ }
+}