/**
  * @param  ServiceLocatorInterface $serviceLocator
  * @return WizardFactory
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $config = $serviceLocator->get('Wizard\\Config');
     $wizardFactory = new WizardFactory($config);
     $stepFactory = $serviceLocator->get('Wizard\\Step\\StepFactory');
     $wizardFactory->setStepFactory($stepFactory);
     return $wizardFactory;
 }
Exemple #2
0
 /**
  * @param  MvcEvent $e
  */
 public function process(MvcEvent $e)
 {
     $wizard = $this->resolver->resolve();
     if (!$wizard) {
         return;
     }
     $instance = $this->factory->create($wizard);
     $instance->process();
 }
Exemple #3
0
 /**
  * @expectedException \Wizard\Exception\RuntimeException
  */
 public function testCreateInvalidWizard()
 {
     $wizardFactory = new WizardFactory([]);
     $wizardFactory->create('invalid');
 }