public function createService(ServiceLocatorInterface $serviceLocator) { return $this($serviceLocator, DynamoDbSaveHandler::class); }
/** * @expectedException \Zend\ServiceManager\Exception\ServiceNotCreatedException */ public function testExceptionThrownWhenSaveHandlerConfigurationDoesNotExist() { $serviceLocator = $this->getMock(ServiceLocatorInterface::class); $serviceLocator->expects($this->once())->method('get')->with('Config')->willReturn([]); $saveHandlerFactory = new DynamoDbSessionSaveHandlerFactory(); $saveHandlerFactory->createService($serviceLocator); }