Beispiel #1
0
 /**
  * Get a mock plugin manager.
  *
  * @return PluginManager
  */
 protected function getMockPluginManager()
 {
     $pm = new PluginManager();
     $mockDb = $this->getMockBuilder('VuFind\\Auth\\Database')->disableOriginalConstructor()->getMock();
     $mockShib = $this->getMockBuilder('VuFind\\Auth\\Shibboleth')->disableOriginalConstructor()->getMock();
     $pm->setService('Database', $mockDb);
     $pm->setService('Shibboleth', $mockShib);
     return $pm;
 }
Beispiel #2
0
 /**
  * Get a mock plugin manager.
  *
  * @return PluginManager
  */
 protected function getMockPluginManager()
 {
     $pm = new PluginManager();
     $mockChoice = $this->getMockBuilder('VuFind\\Auth\\ChoiceAuth')->disableOriginalConstructor()->getMock();
     $mockChoice->expects($this->any())->method('getSelectableAuthOptions')->will($this->returnValue(['Database', 'Shibboleth']));
     $mockDb = $this->getMockBuilder('VuFind\\Auth\\Database')->disableOriginalConstructor()->getMock();
     $mockMulti = $this->getMockBuilder('VuFind\\Auth\\MultiILS')->disableOriginalConstructor()->getMock();
     $mockShib = $this->getMockBuilder('VuFind\\Auth\\Shibboleth')->disableOriginalConstructor()->getMock();
     $pm->setService('ChoiceAuth', $mockChoice);
     $pm->setService('Database', $mockDb);
     $pm->setService('MultiILS', $mockMulti);
     $pm->setService('Shibboleth', $mockShib);
     return $pm;
 }