diff --git a/module/VuFind/src/VuFindTest/Unit/TestCase.php b/module/VuFind/src/VuFindTest/Unit/TestCase.php index 3dd9ff53eef41bea5a587a9f056cc2bc9301b3f7..eed2055534bf532694622cdb8dd858780b752557 100644 --- a/module/VuFind/src/VuFindTest/Unit/TestCase.php +++ b/module/VuFind/src/VuFindTest/Unit/TestCase.php @@ -145,56 +145,57 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase $this->serviceManager, [ 'abstract_factories' => - ['VuFind\Search\Options\PluginFactory'], + [\VuFind\Search\Options\PluginFactory::class], ] ); $this->serviceManager->setService( - 'VuFind\Search\Options\PluginManager', $optionsFactory + \VuFind\Search\Options\PluginManager::class, $optionsFactory ); $paramsFactory = new \VuFind\Search\Params\PluginManager( $this->serviceManager, [ 'abstract_factories' => - ['VuFind\Search\Params\PluginFactory'], + [\VuFind\Search\Params\PluginFactory::class], ] ); $this->serviceManager->setService( - 'VuFind\Search\Params\PluginManager', $paramsFactory + \VuFind\Search\Params\PluginManager::class, $paramsFactory ); $resultsFactory = new \VuFind\Search\Results\PluginManager( $this->serviceManager, [ 'abstract_factories' => - ['VuFind\Search\Results\PluginFactory'], + [\VuFind\Search\Results\PluginFactory::class], ] ); $this->serviceManager->setService( - 'VuFind\Search\Results\PluginManager', $resultsFactory + \VuFind\Search\Results\PluginManager::class, $resultsFactory ); $recordDriverFactory = new \VuFind\RecordDriver\PluginManager( $this->serviceManager, [ 'abstract_factories' => - ['VuFind\RecordDriver\PluginFactory'] + [\VuFind\RecordDriver\PluginFactory::class] ] ); $this->serviceManager->setService( - 'VuFind\RecordDriver\PluginManager', $recordDriverFactory + \VuFind\RecordDriver\PluginManager::class, $recordDriverFactory ); $this->serviceManager->setService( - 'VuFind\Config\SearchSpecsReader', + \VuFind\Config\SearchSpecsReader::class, new \VuFind\Config\SearchSpecsReader() ); $this->serviceManager->setService( - 'VuFind\Log\Logger', $this->createMock(\VuFind\Log\Logger::class) + \VuFind\Log\Logger::class, + $this->createMock(\VuFind\Log\Logger::class) ); $this->serviceManager->setService( - 'VuFindHttp\HttpService', new \VuFindHttp\HttpService() + \VuFindHttp\HttpService::class, new \VuFindHttp\HttpService() ); $this->setupSearchService(); - $cfg = ['abstract_factories' => ['VuFind\Config\PluginFactory']]; + $cfg = ['abstract_factories' => [\VuFind\Config\PluginFactory::class]]; $this->serviceManager->setService( - 'VuFind\Config\PluginManager', + \VuFind\Config\PluginManager::class, new \VuFind\Config\PluginManager($this->serviceManager, $cfg) ); $this->serviceManager->setService( @@ -203,7 +204,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase $driverManager = $this->serviceManager ->get(\VuFind\RecordDriver\PluginManager::class); $this->serviceManager->setService( - 'VuFind\Record\Loader', new \VuFind\Record\Loader( + \VuFind\Record\Loader::class, new \VuFind\Record\Loader( $this->serviceManager->get(\VuFindSearch\Service::class), $driverManager ) @@ -211,7 +212,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase $this->serviceManager->setService('Config', []); $factory = new \Zend\Mvc\I18n\TranslatorFactory(); $this->serviceManager->setService( - 'Zend\Mvc\I18n\Translator', + \Zend\Mvc\I18n\Translator::class, $factory->createService($this->serviceManager) ); }