submit() public method

Used when there is only one button or it is unimportant.
public submit ( $additional = false ) : hash
return hash Submitted values.
示例#1
0
 function testPost()
 {
     $form = new SimpleForm(new SimpleFormTag(array('method' => 'post')), $this->page('C:\\Users\\Garen\\Documents\\CS580\\Recipes\\RecipesInLaravel\\public\\testtt.html'));
     $select = new SimpleSelectionTag(array('name' => 'a'));
     $select->addTag(new SimpleOptionTag(array('value' => 'aaa', 'selected' => '')));
     $form->addWidget($select);
     $this->assertIdentical($form->submit(), new SimplePostEncoding(array('a' => 'aaa')));
 }
 function testSingleSelectFieldSubmittedWithPost()
 {
     $form = new SimpleForm(new SimpleFormTag(array('method' => 'post')), new SimpleUrl('htp://host'));
     $select = new SimpleSelectionTag(array('name' => 'a'));
     $select->addTag(new SimpleOptionTag(array('value' => 'aaa', 'selected' => '')));
     $form->addWidget($select);
     $this->assertIdentical($form->submit(), new SimplePostEncoding(array('a' => 'aaa')));
 }