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:----X0vTAMVTq8pIX/rM4Lr40e6T6SMtE0VlpSlxfCuExTGRwh5h2uzQfC5GjcSjNb6++atjtFKUFtzBK3FSnrBWLFL37lu9wtNE52MxDKChqLO94ICv9+ZNIwDOcAX1VA88Nd81osYhUWZw0Ye0cf/pZmgNsEk6cKlP5uA6/i77wFnfFkbJ5ae81bJ5+Gaa7YFxqLZ+//BQ1zIvowJgS3FnI5Mf2+ln8rNWtKzCAF6CS7FpSj6HUIKxG+pOLtHErPf+1/i3A8VHJth9XyG9QImHVkZMhPnNfnaVKJXBppKA4JsmY/uIyvdndpwLWhhxwkdw9Lg6mUqrR+RgkvTW9cRPfYfCoEOQVD3pUYadU0tU1eVrk9Yv/AmTVZQyTkwfIBx1e1m7Zq9ntW0F2LJwST7zEgZC+qT8VewYw49bTu20gWmeZhTw+l5tRlGBnnbcoWDfvAWAtAUg9EgLCX9IyQShPmM1WQkh7/Vt024310vT1OEIwYHdWbFyM5/36VEGqQdNpajPzLLxPtDq3yU2RpfWl6R8eRKz5MTj0ZAiuPdiVyt06tSCMVrTPvL2N4PNY5N2qTV23/S7tqbendg1shmF0fHZGGskagtMmJgUjbppElfZaTaHDnpDo6gj0aQ/FKThBpsZE0YV6wNp5j+PXUZdXnULl74R0xBhvnb3lHtAWyM=----ATTACHMENT:----OTg4NTQzOTA0MDI2ODU3NSA5MTcyMjU5NDAyNTUyMjkyIDI5NTExNjU3MjUxMzU4NjI=