示例#1
0
 function testCreatingForm2()
 {
     $form1 = new QForm('form1', self::URL1, QForm::POST);
     $this->assertEquals('form1', $form1->id);
     $this->assertEquals('form1', $form1->name);
     $form2 = new QForm();
     $form2->id = 'form2';
     $form2->name = 'form2-name';
     $this->assertEquals('form2', $form2->id);
     $this->assertEquals('form2-name', $form2->name);
     $form3 = new QForm();
     $form3->set('id', 'form3')->set('name', 'form3-name');
     $this->assertEquals('form3', $form3->id);
     $this->assertEquals('form3-name', $form3->name);
 }