Moving time tests into a separate method.

This commit is contained in:
mark_story 2011-05-09 22:14:06 -04:00
parent 1cdf55f8b2
commit 922595c77a

View file

@ -1887,11 +1887,10 @@ class FormHelperTest extends CakeTestCase {
}
/**
* 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 @@ class FormHelperTest extends CakeTestCase {
$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