|
@@ 208-220 (lines=13) @@
|
| 205 |
|
* |
| 206 |
|
* |
| 207 |
|
*/ |
| 208 |
|
public function testInitDone() |
| 209 |
|
{ |
| 210 |
|
XmlWorkflowFactory::addDefaultPathToWorkflows(Paths::getPathToCommonDataDir()); |
| 211 |
|
|
| 212 |
|
$this->xmlWorkflowFactory->getProperties()->setProperty(XmlWorkflowFactory::RESOURCE_PROPERTY, 'workflows.xml'); |
| 213 |
|
|
| 214 |
|
$this->xmlWorkflowFactory->initDone(); |
| 215 |
|
|
| 216 |
|
$workflow = $this->xmlWorkflowFactory->getWorkflow('example'); |
| 217 |
|
|
| 218 |
|
|
| 219 |
|
static::assertEquals(true, $workflow instanceof WorkflowDescriptor); |
| 220 |
|
} |
| 221 |
|
|
| 222 |
|
/** |
| 223 |
|
* @expectedException \OldTown\Workflow\Exception\InvalidParsingWorkflowException |
|
@@ 312-324 (lines=13) @@
|
| 309 |
|
* @expectedException \OldTown\Workflow\Exception\FactoryException |
| 310 |
|
* @expectedExceptionMessageRegExp /Некорректный дескрипторв workflow:.*+/ |
| 311 |
|
*/ |
| 312 |
|
public function testLoadInvalidWorkflow() |
| 313 |
|
{ |
| 314 |
|
XmlWorkflowFactory::addDefaultPathToWorkflows(Paths::getPathToInvalidWorkflowDir()); |
| 315 |
|
|
| 316 |
|
$this->xmlWorkflowFactory->getProperties()->setProperty(XmlWorkflowFactory::RESOURCE_PROPERTY, 'workflows.xml'); |
| 317 |
|
|
| 318 |
|
$this->xmlWorkflowFactory->initDone(); |
| 319 |
|
|
| 320 |
|
$workflow = $this->xmlWorkflowFactory->getWorkflow('example'); |
| 321 |
|
|
| 322 |
|
|
| 323 |
|
static::assertEquals(true, $workflow instanceof WorkflowDescriptor); |
| 324 |
|
} |
| 325 |
|
|
| 326 |
|
|
| 327 |
|
/** |