added test for cleanUpFields, closes #3191

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5689 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-09-24 10:59:46 +00:00
parent bf51cabb50
commit cdaa7fcce3

View file

@ -110,6 +110,16 @@ class ControllerTest extends CakeTestCase {
$expected = array('ControllerPost'=> array('created'=> '20:33:33'));
$this->assertEqual($Controller->data, $expected);
$Controller->data['ControllerPost']['created_hour'] = '13';
$Controller->data['ControllerPost']['created_min'] = '00';
$Controller->data['ControllerPost']['updated_hour'] = '14';
$Controller->data['ControllerPost']['updated_min'] = '40';
$Controller->cleanUpFields();
$expected = array('ControllerPost'=> array('created'=> '13:00', 'updated'=> '14:40'));
$this->assertEqual($Controller->data, $expected);
unset($Controller);
}