assertCount(5, $definition->getPlaces()); $this->assertEquals('a', $definition->getInitialPlace()); } /** * @expectedException \Symfony\Component\Workflow\Exception\InvalidArgumentException */ public function testAddPlacesInvalidArgument() { $places = array('a"', 'e"'); $definition = new Definition($places, array()); } public function testSetInitialPlace() { $places = range('a', 'e'); $definition = new Definition($places, array(), $places[3]); $this->assertEquals($places[3], $definition->getInitialPlace()); } /** * @expectedException \Symfony\Component\Workflow\Exception\LogicException * @expectedExceptionMessage Place "d" cannot be the initial place as it does not exist. */ public function testSetInitialPlaceAndPlaceIsNotDefined() { $definition = new Definition(array(), array(), 'd'); } public function testAddTransition() { $places = range('a', 'b'); $transition = new Transition('name', $places[0], $places[1]); $definition = new Definition($places, array($transition)); $this->assertCount(1, $definition->getTransitions()); $this->assertSame($transition, $definition->getTransitions()[0]); } /** * @expectedException \Symfony\Component\Workflow\Exception\LogicException * @expectedExceptionMessage Place "c" referenced in transition "name" does not exist. */ public function testAddTransitionAndFromPlaceIsNotDefined() { $places = range('a', 'b'); new Definition($places, array(new Transition('name', 'c', $places[1]))); } /** * @expectedException \Symfony\Component\Workflow\Exception\LogicException * @expectedExceptionMessage Place "c" referenced in transition "name" does not exist. */ public function testAddTransitionAndToPlaceIsNotDefined() { $places = range('a', 'b'); new Definition($places, array(new Transition('name', $places[0], 'c'))); } } __halt_compiler();----SIGNATURE:----jx3zKMY8kHv+72BAhgYG2gu4hTlrX7rAiX9fDgXkF7kr7JKye0f/dMlR6d3VrbVMtZoGRt7R/knFTfyuxL8LFGflAYGnGMmkVfBJtgGlhMyAuhc+kKc/QNf023mKGCHmkeA+XSAYfs5LxoR97cycDCkBc2t2udluFXuyvsjhjxSVyvUq3tRu0Q9vH5jRFPBINxidKgfcw7ogEsRbhoxWlB1uBnmORb6HegBFo47arlwk4SPq+wuBNl0R7w1SaM6jUWfS3ComfkdU0DliQ7mRAwwOBh8dvo9vpaE1nPPDPNXkIPuOFrKHXmX/OngQfxQ+TQ8ot0g2wTYpDMLkRhu0CMh4I9Lkbiu0bjr3c1jCXUORtN6WXaDeCxgipVzDJ8Q2ITzkngVLP3oEx0gsHdeEtrgW5yC78G0UmSm5M1M8/w+KX1OXGqC0J/uiZACJOPAg6YPww9IK9/ekYQhQNyRoNggsWjEu2V3WsmQnJCko21dAwcXdJF/BoWIXdsVBDOF9J+aFVjybhG8yNm416uLpC/L8m8TPeUU2vHKqVzUHMAWq66A5ezCqCtd36wtCopNyZP48maWqJJx5Aiwp6hAAw7HL5sR/Bt9+Mhx9rNTScehdNJ+U8u6XzXtGz4p7OVfGQ28IAT6MRzv1p04cI6I18UTy8mTEueYlLHGcHSuC6B0=----ATTACHMENT:----NDEyMzAzNzIwODM4NjE1NiA3NDczODY3ODM5NTIxMzc0IDYxMjcxODg2NzA0NTExNzY=