Example #1
0
 public function testHasForm()
 {
     $obj = new Transition();
     $this->assertFalse($obj->hasForm());
     // by default transition has form
     $obj->setFormOptions(array('key' => 'value'));
     $this->assertFalse($obj->hasForm());
     $obj->setFormOptions(array('attribute_fields' => array()));
     $this->assertFalse($obj->hasForm());
     $obj->setFormOptions(array('attribute_fields' => array('key' => 'value')));
     $this->assertTrue($obj->hasForm());
 }