function testCheckingTheFormIsSubmitted()
 {
     $form = new SimpleForm_Form();
     $form->parse($this->getFormHtml('inputform.html'));
     $this->assertFalse($form->isSubmitted());
     // fake the submission of the form
     $_GET[SimpleForm_Form::SUBMIT_MARKER] = 'inputform';
     $this->assertEqual('inputform', $form->getId());
     $this->assertTrue($form->isSubmitted());
 }
Beispiel #2
0
 /**
  * Should be able to extract form attributes from the form
  */
 function testFormAttributes()
 {
     $form = new SimpleForm_Form();
     $form->parse($this->getFormHtml('hiddenelementform.html'));
     $this->assertEqual($form->getMethod(), 'post');
     $this->assertEqual($form->getId(), 'testform');
     $this->assertEqual($form->getAction(), 'someurl');
 }