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:----r2j9MXSqFSdt4jaJh9TxhWw0UguqZbVGewgeXA7wBaW1LTjXx42zdM5fRqWDtHHtE9r4biHRQXV670r1tD6mTBu6URMPUzU6w4XbrS8wrd9qVJ897p3QBeIDu1foDC/LcVpNncWUbZ6EDCK4NJG+1Bi7JvU5RBcxSldjfIoFOPpOcvp5jpXkXNhdhGylBCPJgcPpehqhkIoMUo5avyKwMLXsIh2od+0qNFoUkqZQ7A+rXgyjR1RJoMBY6xJaOlH68CfcbQeI2qLUsnn+lY4Af5p8h1mNX2nIvW8LmX3sXa5HdG3qyTVe0XGwlq0bgvKd778eN8gVvqf+kADgtSzTHQDmSrOabDj40n2EOUIod89apYBosUg0Q36zn2Oyv53EXZ9fgQutCb9vj7TH0glqoSmZA9DE41rkUU3I5ypndKCTfWbzg+58x2JZMFq7Aiz7TwPN9LxQAP1oErZFl0wV7ihbH2G3R+C1wLfNjKNtj7xg0ghxO5e5P5mNtZdDubq/L00983JXwRE+8/0GbH8AP1KAtv83EObBBSWpY31sJnMObbIsf+vvLZDrj3v72OfrAEsqEpUzkzPdt2tFYNI4jUOBIxSvMuXnEmHorAezzn/UXAfngLpkmRHBCcbNytwbw6Xb3nsCrckJFGcPiUEhoX9IYT3kdGls/55IURaEdsk=----ATTACHMENT:----NjMyMjkxMzI5NDM0MjU0NCA2OTMxMDAxMjc5MDM1NTA4IDQyMTEzOTkwMTExNDg1MDI=