public function testCurrentStepName() { $this->assertNull($this->workflowItem->getCurrentStepName()); $value = 'foo'; $this->workflowItem->setCurrentStepName($value); $this->assertEquals($value, $this->workflowItem->getCurrentStepName()); }
/** * @param Workflow $workflow * @param string $currentStepName * @return WorkflowItem */ protected function createWorkflowItem(Workflow $workflow, $currentStepName = null) { $result = new WorkflowItem(); $result->setCurrentStepName($currentStepName); $result->setWorkflowName($workflow->getName()); return $result; }
/** * @expectedException \Oro\Bundle\WorkflowBundle\Exception\UnknownStepException * @expectedExceptionMessage Step "unknown_step" not found */ public function testGetAllowedTransitionsUnknownStepException() { $workflowItem = new WorkflowItem(); $workflowItem->setCurrentStepName('unknown_step'); $workflow = $this->createWorkflow(); $workflow->getTransitionsByWorkflowItem($workflowItem); }