Adding test to form helper to increase code coverage.

This commit is contained in:
mark_story 2009-11-13 09:45:25 -05:00
parent d302ed1bfa
commit 8d407ac915

View file

@ -4633,6 +4633,21 @@ class FormHelperTest extends CakeTestCase {
'/fieldset'
);
$this->assertTags($result, $expected);
$this->Form->data = array();
$this->Form->params['controller'] = 'contacts';
$this->Form->params['models'] = array('Contact');
$result = $this->Form->create(array('url' => array('action' => 'index', 'param')));
$expected = array(
'form' => array(
'id' => 'ContactAddForm', 'method' => 'post', 'action' => '/contacts/index/param'
),
'fieldset' => array('style' => 'preg:/display\s*\:\s*none;\s*/'),
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
'/fieldset'
);
$this->assertTags($result, $expected);
}
/**
* Test base form url when url param is passed with multiple parameters (&)