mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
More time helper test jiggering. Some peope still experiencing issues.
This commit is contained in:
parent
e2b5470d19
commit
4982705d07
1 changed files with 2 additions and 6 deletions
|
@ -661,9 +661,7 @@ class TimeHelperTest extends CakeTestCase {
|
||||||
'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS)
|
'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS)
|
||||||
), true);
|
), true);
|
||||||
Configure::write('Config.language', 'time_test');
|
Configure::write('Config.language', 'time_test');
|
||||||
$time = 1263487419; // Thu Jan 14 11:43:39 2010
|
$time = strtotime('Thu Jan 14 11:43:39 2010');
|
||||||
$offset = 5 * 60 * 60;
|
|
||||||
$time = $time - date('Z') - $offset - (date('I', $time) * 60 * 60);
|
|
||||||
|
|
||||||
$result = $this->Time->convertSpecifiers('%a', $time);
|
$result = $this->Time->convertSpecifiers('%a', $time);
|
||||||
$expected = 'jue';
|
$expected = 'jue';
|
||||||
|
@ -753,9 +751,7 @@ class TimeHelperTest extends CakeTestCase {
|
||||||
'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS)
|
'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS)
|
||||||
), true);
|
), true);
|
||||||
Configure::write('Config.language', 'time_test');
|
Configure::write('Config.language', 'time_test');
|
||||||
$time = 1263495568; //Thu Jan 14 13:59:28 2010
|
$time = strtotime('Thu Jan 14 13:59:28 2010');
|
||||||
$offset = 5 * 60 * 60;
|
|
||||||
$time = $time - date('Z') - $offset - (date('I', $time) * 60 * 60);
|
|
||||||
|
|
||||||
$result = $this->Time->i18nFormat($time);
|
$result = $this->Time->i18nFormat($time);
|
||||||
$expected = '14/01/10';
|
$expected = '14/01/10';
|
||||||
|
|
Loading…
Add table
Reference in a new issue