Skip to content
Permalink
Browse files

Adding test to form helper to increase code coverage.

  • Loading branch information...
markstory committed Nov 13, 2009
1 parent d302ed1 commit 8d407ac9152e587347457461487bf7e0a7ee0012
Showing with 15 additions and 0 deletions.
  1. +15 −0 cake/tests/cases/libs/view/helpers/form.test.php
@@ -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 (&)

0 comments on commit 8d407ac

Please sign in to comment.
You can’t perform that action at this time.