mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
bf51cabb50
commit
cdaa7fcce3
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue