Permalink
Browse files

Adding test case for #867.

  • Loading branch information...
1 parent 637ab82 commit 08ce636bf44c116dc3f167ca242e7882f5d0c6b3 @markstory markstory committed Jun 29, 2010
Showing with 14 additions and 1 deletion.
  1. +14 −1 cake/tests/cases/libs/view/helpers/form.test.php
@@ -1798,6 +1798,19 @@ function testInputCheckboxesInLoop() {
}
}
/**
+ * test input name with leading integer, ensure attributes are generated correctly.
+ *
+ * @return void
+ */
+ function testInputWithLeadingInteger() {
+ $result = $this->Form->text('0.Node.title');
+ $expected = array(
+ 'input' => array('name' => 'data[0][Node][title]', 'id' => '0NodeTitle', 'type' => 'text')
+ );
+ $this->assertTags($result, $expected);
+ }
+
+/**
* test form->input() with select type inputs.
*
* @return void
@@ -5380,4 +5393,4 @@ function testBrokenness() {
$this->assertTags($result, $expected);
}
}
-?>
+?>

0 comments on commit 08ce636

Please sign in to comment.