diff options
author | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
---|---|---|
committer | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
commit | fc7369835258467bf97eb64f184b93691f9a9fd5 (patch) | |
tree | daabd60089d2dd76d9f5fb416b005fbe159c799d /www/wiki/extensions/OATHAuth/tests |
first commit
Diffstat (limited to 'www/wiki/extensions/OATHAuth/tests')
-rw-r--r-- | www/wiki/extensions/OATHAuth/tests/phan/config.php | 3 | ||||
-rw-r--r-- | www/wiki/extensions/OATHAuth/tests/phpunit/TOTPAuthenticationRequestTest.php | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/www/wiki/extensions/OATHAuth/tests/phan/config.php b/www/wiki/extensions/OATHAuth/tests/phan/config.php new file mode 100644 index 00000000..f2660b8a --- /dev/null +++ b/www/wiki/extensions/OATHAuth/tests/phan/config.php @@ -0,0 +1,3 @@ +<?php + +return require __DIR__ . '/../../vendor/mediawiki/mediawiki-phan-config/src/config.php'; diff --git a/www/wiki/extensions/OATHAuth/tests/phpunit/TOTPAuthenticationRequestTest.php b/www/wiki/extensions/OATHAuth/tests/phpunit/TOTPAuthenticationRequestTest.php new file mode 100644 index 00000000..56403848 --- /dev/null +++ b/www/wiki/extensions/OATHAuth/tests/phpunit/TOTPAuthenticationRequestTest.php @@ -0,0 +1,17 @@ +<?php + +use MediaWiki\Auth\AuthenticationRequestTestCase; + +class TOTPAuthenticationRequestTest extends AuthenticationRequestTestCase { + + protected function getInstance( array $args = [] ) { + return new TOTPAuthenticationRequest(); + } + + public function provideLoadFromSubmission() { + return [ + [ [], [], false ], + [ [], [ 'OATHToken' => '123456' ], [ 'OATHToken' => '123456' ] ], + ]; + } +} |