Permalink
Browse files

Moving time tests into a separate method.

  • Loading branch information...
1 parent 1cdf55f commit 922595c77a3494540e4a95447fa4c60a34055b24 @markstory markstory committed May 10, 2011
Showing with 11 additions and 3 deletions.
  1. +11 −3 cake/tests/cases/libs/view/helpers/form.test.php
@@ -1887,11 +1887,10 @@ function testInputCheckbox() {
}
/**
- * test form->input() with datetime, date and time types
+ * test form->input() with time types.
*
- * @return void
*/
- function testInputDatetime() {
+ function testInputTime() {
extract($this->dateRegex);
$result = $this->Form->input('Contact.created', array('type' => 'time', 'timeFormat' => 24));
$result = explode(':', $result);
@@ -1929,6 +1928,15 @@ function testInputDatetime() {
$this->assertPattern('#<option value="15"[^>]*>15</option>#', $result[1]);
$this->assertPattern('#<option value="30"[^>]*>30</option>#', $result[1]);
+ }
+
+/**
+ * test form->input() with datetime, date and time types
+ *
+ * @return void
+ */
+ function testInputDatetime() {
+ extract($this->dateRegex);
$result = $this->Form->input('prueba', array(
'type' => 'datetime', 'timeFormat'=> 24 , 'dateFormat'=>'DMY' , 'minYear' => 2008,
'maxYear' => date('Y') + 1 ,'interval' => 15

0 comments on commit 922595c

Please sign in to comment.