createComplexWorkflowDefinition(); (new WorkflowValidator(true))->validate($definition, 'foo'); } public function testSinglePlaceWorkflowValidatorAndSimpleWorkflow() { $definition = $this->createSimpleWorkflowDefinition(); (new WorkflowValidator(true))->validate($definition, 'foo'); // the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions) $this->addToAssertionCount(1); } /** * @expectedException \Symfony\Component\Workflow\Exception\InvalidDefinitionException * @expectedExceptionMessage All transitions for a place must have an unique name. Multiple transitions named "t1" where found for place "a" in workflow "foo". */ public function testWorkflowWithInvalidNames() { $places = range('a', 'c'); $transitions = array(); $transitions[] = new Transition('t0', 'c', 'b'); $transitions[] = new Transition('t1', 'a', 'b'); $transitions[] = new Transition('t1', 'a', 'c'); $definition = new Definition($places, $transitions); (new WorkflowValidator())->validate($definition, 'foo'); } public function testSameTransitionNameButNotSamePlace() { $places = range('a', 'd'); $transitions = array(); $transitions[] = new Transition('t1', 'a', 'b'); $transitions[] = new Transition('t1', 'b', 'c'); $transitions[] = new Transition('t1', 'd', 'c'); $definition = new Definition($places, $transitions); (new WorkflowValidator())->validate($definition, 'foo'); // the test simply ensures that the validation does not fail (i.e. it does not throw any exceptions) $this->addToAssertionCount(1); } } __halt_compiler();----SIGNATURE:----b4TLOdiNUzofQ/8G934boWyEjN4a68rNPTvGq75g2QJZy3gOzx7FWNifvzlOmKLy4G+dgql8OefBdtSQLpbQJFRqPgZxJXIY6nsrdBG1YslKFn+wXE1CtOMF3tPn2Dnt5/9adyAnTaVkXHMrsaGszZ+OQJYXvNAKGs+roCSVlg7Fp23lb3w6VUXmEoshNC0BqPMRNw2QoLZreA3dpNBlEuf3JbEjPCxcZFbNCaybjmavNQVi41spiUjQ6a/BexhCNJUIv3Nd8j3XjyvZrbyONnZLxm3RjGl9MqWfTFR8/g5p1ZLgoNGF1nxtjsSG0zjgc//M7gHAtaiQORMCT5XHT7OmEbD1Ib4q2PUjFOZ9r88/i2jSVuDZQiboIlhCOXG7FP0kdYZdiZx7xGsdy3APSa+h003sfsgI1ncWXXn4yyh+Nj9XZxeYP0EoHbPED09xiSSMcWJuDrpAi5QeksbyEiNzR4QhiOV7MH2c/lrbtkrgDaZwIdORFWxGoFVH1sTyGczE9zPbJ1x4chIErRFIC8GU1mWfUg35rYawNIY6jXBlgH41y0iCM//+3gIC9qZScfte2hblbVLXUEeRMp2uDCljeQInN5E8P2ru4c0dgK1ZLsuFYp/VCr5xoQzG4MkqaMK7Orj8lyp7a6zweLj9g2Q3iq84kupr5EcRw0MXa6s=----ATTACHMENT:----NDE2MDAyMzE5NTkzNDY4OCAyNzE2Nzc0OTM3MDM4MjQxIDk5ODcwMzM2MDU2MTA3MjI=