public function test_createForm_postData() { global $INPUT, $ID; $ID = 'page01'; $structdata = array('schema1' => array('first' => 'first post data', 'second' => array('second post data', 'more post data', 'even more post data'), 'third' => 'third post data', 'fourth' => 'fourth post data')); $INPUT->set(mock\action_plugin_struct_entry::getVAR(), $structdata); $entry = new mock\action_plugin_struct_entry(); $test_html = $entry->createForm('schema1'); $pq = \phpQuery::newDocument($test_html); $this->assertEquals('schema1', $pq->find('legend')->text()); $this->checkField($pq, 'schema1', 'first', 'first post data'); $this->checkField($pq, 'schema1', 'second', 'second post data, more post data, even more post data'); $this->checkField($pq, 'schema1', 'third', 'third post data'); $this->checkField($pq, 'schema1', 'fourth', 'fourth post data'); }
/** * Create the form to edit schemadata * * @param string $tablename * @return string The HTML for this schema's form */ public function createForm($tablename) { return parent::createForm($tablename); }