Permalink
Browse files

Adding test to form helper to increase code coverage.

  • Loading branch information...
1 parent 13f9b79 commit bfde6b81fefd882f7bec8c365dbb4bbf8cb320fb @markstory markstory committed Nov 13, 2009
Showing with 15 additions and 0 deletions.
  1. +15 −0 cake/tests/cases/libs/view/helpers/form.test.php
@@ -5049,6 +5049,21 @@ function testCreate() {
'/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);
+
}
/**

0 comments on commit bfde6b8

Please sign in to comment.