| @@ 72-82 (lines=11) @@ | ||
| 69 | $this->assertEquals($step2, $stepManager->getStep('step2')); |
|
| 70 | } |
|
| 71 | ||
| 72 | protected function getStepMock($name) |
|
| 73 | { |
|
| 74 | $step = $this->getMockBuilder('Oro\Bundle\WorkflowBundle\Model\Step') |
|
| 75 | ->disableOriginalConstructor() |
|
| 76 | ->getMock(); |
|
| 77 | $step->expects($this->any()) |
|
| 78 | ->method('getName') |
|
| 79 | ->will($this->returnValue($name)); |
|
| 80 | ||
| 81 | return $step; |
|
| 82 | } |
|
| 83 | ||
| 84 | public function testStartStep() |
|
| 85 | { |
|
| @@ 177-186 (lines=10) @@ | ||
| 174 | return 'Start ' . $workflowLabel; |
|
| 175 | } |
|
| 176 | ||
| 177 | protected function getStepMock($name) |
|
| 178 | { |
|
| 179 | $step = $this->getMockBuilder('Oro\Bundle\WorkflowBundle\Model\Step') |
|
| 180 | ->disableOriginalConstructor() |
|
| 181 | ->getMock(); |
|
| 182 | $step->expects($this->any()) |
|
| 183 | ->method('getName') |
|
| 184 | ->will($this->returnValue($name)); |
|
| 185 | return $step; |
|
| 186 | } |
|
| 187 | ||
| 188 | protected function getTransitionMock($isStart, $name) |
|
| 189 | { |
|
| @@ 202-212 (lines=11) @@ | ||
| 199 | return $transition; |
|
| 200 | } |
|
| 201 | ||
| 202 | protected function getAttributeMock($name) |
|
| 203 | { |
|
| 204 | $attributeMock = $this->getMockBuilder('Oro\Bundle\ActionBundle\Model\Attribute') |
|
| 205 | ->disableOriginalConstructor() |
|
| 206 | ->getMock(); |
|
| 207 | $attributeMock->expects($this->any()) |
|
| 208 | ->method('getName') |
|
| 209 | ->will($this->returnValue($name)); |
|
| 210 | ||
| 211 | return $attributeMock; |
|
| 212 | } |
|
| 213 | ||
| 214 | /** |
|
| 215 | * @param array $configuration |
|
| @@ 481-491 (lines=11) @@ | ||
| 478 | ); |
|
| 479 | } |
|
| 480 | ||
| 481 | protected function getStepMock($name) |
|
| 482 | { |
|
| 483 | $step = $this->getMockBuilder('Oro\Bundle\WorkflowBundle\Model\Step') |
|
| 484 | ->disableOriginalConstructor() |
|
| 485 | ->getMock(); |
|
| 486 | $step->expects($this->any()) |
|
| 487 | ->method('getName') |
|
| 488 | ->will($this->returnValue($name)); |
|
| 489 | ||
| 490 | return $step; |
|
| 491 | } |
|
| 492 | ||
| 493 | protected function getTransitionMock($name, $isStart = false, $step = null) |
|
| 494 | { |
|