예제 #1
0
 /**
  * @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;
 }
예제 #2
0
 /**
  * @param  MvcEvent $e
  */
 public function process(MvcEvent $e)
 {
     $wizard = $this->resolver->resolve();
     if (!$wizard) {
         return;
     }
     $instance = $this->factory->create($wizard);
     $instance->process();
 }
예제 #3
0
 /**
  * @expectedException \Wizard\Exception\RuntimeException
  */
 public function testCreateInvalidWizard()
 {
     $wizardFactory = new WizardFactory([]);
     $wizardFactory->create('invalid');
 }