/**
  * Интеграционный тест. Берется простой workflow. Запускается процесс. Проверяется что произошел переход в нужный шаг.
  * В качестве хранилища используется база данных.
  *
  * @return array
  */
 public function testIntegrationWorkflowDoctrineZF2()
 {
     /** @noinspection PhpIncludeInspection */
     $this->setApplicationConfig(include Paths::getPathToAppConfig());
     /** @var BasicWorkflow $wfManager */
     $wfManager = $this->getApplicationServiceLocator()->get('workflow.manager.testWorkflowManager');
     $entryId = $wfManager->initialize('test', 1);
     $currentSteps = $wfManager->getCurrentSteps($entryId);
     static::assertCount(1, $currentSteps);
     /** @var Step $step */
     $currentSteps->rewind();
     $step = $currentSteps->current();
     static::assertInstanceOf(Step::class, $step);
     static::assertEquals(2, $step->getStepId());
 }
Exemplo n.º 2
0
 public function testLoadModule()
 {
     /** @noinspection PhpIncludeInspection */
     $this->setApplicationConfig(include Paths::getPathToAppConfig());
     $this->assertModulesLoaded(['OldTown\\Workflow\\Doctrine\\ZF2']);
 }