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:----jQ5fpE1HFZApGu6jpBeVhj8mJRepts1fjKScDUH+XUll5Xe6si+WoNwKGXGaYQm9dK3DQHQx94FESsGATsgkXCjV+xRKE3XlbXn/FjCgkVFt0BL8U/mOXzY1sQpvkBO68ogqouA0354TI+EmNkQdWWJFXBFzkr/q9CAbLB+7gqYQYhC2P1cLcTuOnyfW4GcrHiwDvA9P9l2id8mdkUMt5iONT/F/bN1xT93TI67WAdvldJgbB0fIM57EJbcrm1lUbhQs+erMa4btZtYHl3xwsKbKiBe6/CKKl7xe9JkPOIJNM+3vt161op9PoG0823tgTuSvmAlAEdPT3lqwNreQuFYMB2rFkh0QXfv46BLk4K0/2rKnBBjiPZImgDYiOmwmpzFzxVF2sVMYreoNOjk4uAm5K7JtC1sMGvt2/4xy7y1kRGPBmZsxsqZx7BCawiXP4wl5DW3O9p+IM2LiyM7Yf2DJycSkA0Avk8h0wPCGgWh84A7BxyuaP0PeKatyQEO1p/hK4K1vbYHayA6Ck34xCaIxXKVARqxXKD1AMSwXDPjgDOUv6qKelKDeMGldyOZ5mz/ZXlCKZucrNZQeViM1YszDF2lDRvmhA04i2hoh0XrlYioE5WmT1+5nIRPLc0R31q3s8GqE6SR7e8Dnq/u6I764Eo21bLx35UKFp59m9Og=----ATTACHMENT:----MjE0MTIxMzU3ODc5Mzk5IDk1MTM5NzM1MTg0MTQ3MzIgNjcxNjkzNjI4NTE5Mzk4NQ==