예제 #1
0
 function testLoadFromConfig()
 {
     $form = new QForm('form1', self::URL1, QForm::POST);
     $this->assertEquals('form1', $form->id);
     $this->assertEquals('form1', $form->name);
     $this->assertEquals(self::URL1, $form->action);
     $this->assertEquals(QForm::POST, $form->method);
     $config = Helper_YAML::load(FIXTURE_DIR . '/form/form1.yaml');
     $form->loadFromConfig($config);
     $this->assertEquals('form1', $form->id);
     $this->assertEquals('form1-name', $form->name);
     $this->assertEquals(self::URL2, $form->action);
     $this->assertEquals(QForm::GET, $form->method);
 }