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'))); }