Skip to content

Commit

Permalink
Adding test to form helper to increase code coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 13, 2009
1 parent d302ed1 commit 8d407ac
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cake/tests/cases/libs/view/helpers/form.test.php
Expand Up @@ -4633,6 +4633,21 @@ function testFormCreate() {
'/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 (&)
Expand Down

0 comments on commit 8d407ac

Please sign in to comment.