Ejemplo n.º 1
0
 public function testIdAndMethodAreReadonly()
 {
     $form = new HTML_QuickForm2('foo', 'get');
     try {
         $form->removeAttribute('id');
     } catch (HTML_QuickForm2_InvalidArgumentException $e) {
         try {
             $form->setAttribute('method', 'post');
         } catch (HTML_QuickForm2_InvalidArgumentException $e) {
             try {
                 $form->setId('newId');
             } catch (HTML_QuickForm2_InvalidArgumentException $e) {
                 return;
             }
         }
     }
     $this->fail('Expected HTML_QuickForm2_InvalidArgumentException was not thrown');
 }