mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Correcting timehelper tests to use correct timestamp for indicated times. Making timezone output more resilient.
This commit is contained in:
parent
f1276ce337
commit
0e09fee3b1
1 changed files with 3 additions and 3 deletions
|
@ -661,7 +661,7 @@ class TimeHelperTest extends CakeTestCase {
|
|||
'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS)
|
||||
), true);
|
||||
Configure::write('Config.language', 'time_test');
|
||||
$time = 1263485619; // Thu Jan 14 11:43:39 2010
|
||||
$time = 1263487419; // Thu Jan 14 11:43:39 2010
|
||||
|
||||
$result = $this->Time->convertSpecifiers('%a', $time);
|
||||
$expected = 'jue';
|
||||
|
@ -751,14 +751,14 @@ class TimeHelperTest extends CakeTestCase {
|
|||
'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS)
|
||||
), true);
|
||||
Configure::write('Config.language', 'time_test');
|
||||
$time = 1263493768; //Thu Jan 14 13:59:28 2010
|
||||
$time = 1263495568; //Thu Jan 14 13:59:28 2010
|
||||
|
||||
$result = $this->Time->i18nFormat($time);
|
||||
$expected = '14/01/10';
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->Time->i18nFormat($time, '%c');
|
||||
$expected = 'jue 14 ene 2010 13:59:28 VET';
|
||||
$expected = 'jue 14 ene 2010 13:59:28 ' . strftime('%Z');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->Time->i18nFormat($time, 'Time is %r, and date is %x');
|
||||
|
|
Loading…
Reference in a new issue