public function testProperty() { $t1 = new Transition('t1', 's1', 's2'); $t1->addProperty('color', 'blue')->addProperty('height', ''); $this->assertEquals('blue', $t1->getProperty('color')); $this->assertEmpty($t1->getProperty('heigth')); $this->assertNull($t1->getProperty('width')); $this->assertEquals('123', $t1->getProperty('width', '123')); $this->assertFalse($t1->getProperty('width', false)); $this->assertEmpty($t1->getProperty('jasvd', '')); }
function printTransition(Transition $transition) { printf('Transition <%s> from state <%s> to state <%s> completed%s', $transition->getName(), $transition->getFromStateName(), $transition->getToStateName(), PHP_EOL); }