Exemple #1
0
 public function testFormFromXmlAction()
 {
     $xmlForm = realpath(dirname(__DIR__)) . '/data/formxml.xml';
     $form = new DxForm();
     $form->formFromXml($xmlForm);
     $this->assertTrue(file_exists($xmlForm));
     $this->assertEquals('FormName', $form->getName());
     /**
      * Check for element or fieldset 
      */
     $this->assertTrue($form->has('select'));
     /**
      * Check for element or fieldset was remove 
      */
     $this->assertFalse($form->has('selectToBeRemove'));
 }
 /**
  * Constructor
  */
 public function __construct($formName = NULL, $xmlFile = NULL, $moduleOptions = array())
 {
     parent::__construct();
     $this->setName($formName);
     $this->setXmlForm($xmlFile);
     $this->setModuleOptions($moduleOptions);
 }