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 13f9b79 commit bfde6b8
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 @@ -5049,6 +5049,21 @@ function testCreate() {
'/fieldset' '/fieldset'
); );
$this->assertTags($result, $expected); $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);

} }


/** /**
Expand Down

0 comments on commit bfde6b8

Please sign in to comment.