Skip to content
Snippets Groups Projects
Commit e43748e6 authored by Demian Katz's avatar Demian Katz
Browse files

Removed arbitrary VuFind\Cart reference in MultiAuthTest to prevent confusion;...

Removed arbitrary VuFind\Cart reference in MultiAuthTest to prevent confusion; added test involving bad service name.
parent 82a7e7ff
No related merge requests found
...@@ -109,10 +109,26 @@ class MultiAuthTest extends \VuFindTest\Unit\DbTestCase ...@@ -109,10 +109,26 @@ class MultiAuthTest extends \VuFindTest\Unit\DbTestCase
return $request; return $request;
} }
/**
* Test login with handler configured to load a service which does not exist.
*
* @return void
*/
public function testLoginWithBadService()
{
$this
->setExpectedException('Zend\ServiceManager\Exception\ServiceNotFoundException');
$config = $this->getAuthConfig();
$config->MultiAuth->method_order = 'InappropriateService,Database';
$request = $this->getLoginRequest();
$this->getAuthObject($config)->authenticate($request);
}
/** /**
* Test login with handler configured to load a class which does not conform * Test login with handler configured to load a class which does not conform
* to the appropriate authentication interface. (We'll use \VuFind\Cart as an * to the appropriate authentication interface. (We'll use this test class
* arbitrary inappropriate class). * as an arbitrary inappropriate class).
* *
* @return void * @return void
*/ */
...@@ -121,7 +137,7 @@ class MultiAuthTest extends \VuFindTest\Unit\DbTestCase ...@@ -121,7 +137,7 @@ class MultiAuthTest extends \VuFindTest\Unit\DbTestCase
$this $this
->setExpectedException('Zend\ServiceManager\Exception\RuntimeException'); ->setExpectedException('Zend\ServiceManager\Exception\RuntimeException');
$config = $this->getAuthConfig(); $config = $this->getAuthConfig();
$config->MultiAuth->method_order = 'VuFind\Cart,Database'; $config->MultiAuth->method_order = get_class($this) . ',Database';
$request = $this->getLoginRequest(); $request = $this->getLoginRequest();
$this->getAuthObject($config)->authenticate($request); $this->getAuthObject($config)->authenticate($request);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment